Merge branch 'master' into upstream-merge-32249
This commit is contained in:
@@ -44131,7 +44131,6 @@
|
||||
/area/maintenance/aft)
|
||||
"cdM" = (
|
||||
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/aft)
|
||||
"cdN" = (
|
||||
|
||||
@@ -5716,7 +5716,6 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/security/brig)
|
||||
"apA" = (
|
||||
/mob/living/simple_animal/mouse/gray,
|
||||
/turf/open/floor/plating{
|
||||
icon_state = "platingdmg3"
|
||||
},
|
||||
@@ -14612,7 +14611,6 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
"aKo" = (
|
||||
/mob/living/simple_animal/mouse/gray,
|
||||
/turf/open/floor/plating{
|
||||
burnt = 1;
|
||||
icon_state = "panelscorched"
|
||||
@@ -24725,7 +24723,6 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
|
||||
dir = 4
|
||||
},
|
||||
/mob/living/simple_animal/mouse/gray,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
"biB" = (
|
||||
|
||||
+12
-8
@@ -127,15 +127,19 @@
|
||||
#define TOXINLOVER 24
|
||||
#define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
|
||||
#define NO_UNDERWEAR 26
|
||||
#define MUTCOLORS2 27
|
||||
#define MUTCOLORS3 28
|
||||
#define NOLIVER 29
|
||||
#define NOSTOMACH 30
|
||||
#define NOLIVER 27
|
||||
#define NOSTOMACH 28
|
||||
#define NO_DNA_COPY 29
|
||||
#define DRINKSBLOOD 30
|
||||
#define SPECIES_ORGANIC 31
|
||||
#define SPECIES_INORGANIC 32
|
||||
#define SPECIES_UNDEAD 33
|
||||
#define SPECIES_ROBOTIC 34
|
||||
//citadel code
|
||||
#define NOAROUSAL 29 //Stops all arousal effects
|
||||
#define NOGENITALS 30 //Cannot create, use, or otherwise have genitals
|
||||
#define NO_DNA_COPY 31
|
||||
#define DRINKSBLOOD 32
|
||||
#define MUTCOLORS2 35
|
||||
#define MUTCOLORS3 36
|
||||
#define NOAROUSAL 37 //Stops all arousal effects
|
||||
#define NOGENITALS 38 //Cannot create, use, or otherwise have genitals
|
||||
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
#define ORGAN_SLOT_APPENDIX "appendix"
|
||||
|
||||
@@ -189,3 +189,5 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
/obj/item/stack/sheet/plasmarglass)))
|
||||
|
||||
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
|
||||
|
||||
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
|
||||
@@ -1 +1 @@
|
||||
#define HID_RESTRICTED_END 101 //the first nonrestricted ID, automatically assigned on connection creation.
|
||||
#define HID_RESTRICTED_END 101 //the first nonrestricted ID, automatically assigned on connection creation.
|
||||
|
||||
@@ -49,4 +49,10 @@
|
||||
#define LOGCHAT "chat"
|
||||
#define LOGASAY "adminsay"
|
||||
#define LOGCOMMENT "comment"
|
||||
#define LOGOOC "ooc"
|
||||
#define LOGOOC "ooc"
|
||||
|
||||
|
||||
#define LINGHIVE_NONE 0
|
||||
#define LINGHIVE_OUTSIDER 1
|
||||
#define LINGHIVE_LING 2
|
||||
#define LINGHIVE_LINK 3
|
||||
@@ -110,6 +110,7 @@
|
||||
icon = 'icons/obj/custom.dmi'
|
||||
icon_state = "festive-w"
|
||||
item_state = "festive-i"
|
||||
icon = 'icons/obj/custom.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(networks)
|
||||
name = "Networks"
|
||||
priority = 80
|
||||
wait = 1
|
||||
stat_tag = "NET"
|
||||
flags = SS_KEEP_TIMING
|
||||
init_order = INIT_ORDER_NETWORKS
|
||||
var/datum/ntnet/station/station_network
|
||||
var/assignment_hardware_id = HID_RESTRICTED_END
|
||||
var/list/networks_by_id = list() //id = network
|
||||
var/list/interfaces_by_id = list() //hardware id = component interface
|
||||
|
||||
/datum/controller/subsystem/processing/networks/Initialize()
|
||||
station_network = new
|
||||
station_network.register_map_supremecy()
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/register_network(datum/ntnet/network)
|
||||
if(!networks_by_id[network.network_id])
|
||||
networks_by_id[network.network_id] = network
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/unregister_network(datum/ntnet/network)
|
||||
networks_by_id -= network.network_id
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/register_interface(datum/component/ntnet_interface/D)
|
||||
if(!interfaces_by_id[D.hardware_id])
|
||||
interfaces_by_id[D.hardware_id] = D
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/unregister_interface(datum/component/ntnet_interface/D)
|
||||
interfaces_by_id -= D.hardware_id
|
||||
return TRUE
|
||||
PROCESSING_SUBSYSTEM_DEF(networks)
|
||||
name = "Networks"
|
||||
priority = 80
|
||||
wait = 1
|
||||
stat_tag = "NET"
|
||||
flags = SS_KEEP_TIMING
|
||||
init_order = INIT_ORDER_NETWORKS
|
||||
var/datum/ntnet/station/station_network
|
||||
var/assignment_hardware_id = HID_RESTRICTED_END
|
||||
var/list/networks_by_id = list() //id = network
|
||||
var/list/interfaces_by_id = list() //hardware id = component interface
|
||||
|
||||
/datum/controller/subsystem/processing/networks/Initialize()
|
||||
station_network = new
|
||||
station_network.register_map_supremecy()
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/register_network(datum/ntnet/network)
|
||||
if(!networks_by_id[network.network_id])
|
||||
networks_by_id[network.network_id] = network
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/unregister_network(datum/ntnet/network)
|
||||
networks_by_id -= network.network_id
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/register_interface(datum/component/ntnet_interface/D)
|
||||
if(!interfaces_by_id[D.hardware_id])
|
||||
interfaces_by_id[D.hardware_id] = D
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/controller/subsystem/processing/networks/proc/unregister_interface(datum/component/ntnet_interface/D)
|
||||
interfaces_by_id -= D.hardware_id
|
||||
return TRUE
|
||||
|
||||
@@ -3,6 +3,13 @@ SUBSYSTEM_DEF(radio)
|
||||
flags = SS_NO_FIRE|SS_NO_INIT
|
||||
|
||||
var/list/datum/radio_frequency/frequencies = list()
|
||||
var/list/saymodes = list()
|
||||
|
||||
/datum/controller/subsystem/radio/PreInit(timeofday)
|
||||
for(var/_SM in subtypesof(/datum/saymode))
|
||||
var/datum/saymode/SM = new _SM()
|
||||
saymodes[SM.key] = SM
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/radio/proc/add_object(obj/device, new_frequency as num, filter = null as text|null)
|
||||
var/f_text = num2text(new_frequency)
|
||||
|
||||
@@ -357,6 +357,9 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
wait = max(wait, 0)
|
||||
|
||||
if(wait >= INFINITY)
|
||||
CRASH("Attempted to create timer with INFINITY delay")
|
||||
|
||||
var/hash
|
||||
|
||||
if (flags & TIMER_UNIQUE)
|
||||
|
||||
@@ -134,11 +134,11 @@
|
||||
|
||||
/datum/antagonist/rev/farewell()
|
||||
if(ishuman(owner.current))
|
||||
owner.current.visible_message("[owner.current] looks like they just remembered their real allegiance!", \
|
||||
"<span class='userdanger'><FONT size = 3>You are no longer a brainwashed revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you...</FONT></span>")
|
||||
owner.current.visible_message("[owner.current] looks like they just remembered their real allegiance!")
|
||||
to_chat(owner, "<span class='userdanger'><FONT size = 3>You are no longer a brainwashed revolutionary! Your memory is hazy from the time you were a rebel...the only thing you remember is the name of the one who brainwashed you...</FONT></span>")
|
||||
else if(issilicon(owner.current))
|
||||
owner.current.visible_message("The frame beeps contentedly, purging the hostile memory engram from the MMI before initalizing it.", \
|
||||
"<span class='userdanger'><FONT size = 3>The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.</FONT></span>")
|
||||
owner.current.visible_message("The frame beeps contentedly, purging the hostile memory engram from the MMI before initalizing it.")
|
||||
to_chat(owner, "<span class='userdanger'><FONT size = 3>The frame's firmware detects and deletes your neural reprogramming! You remember nothing but the name of the one who flashed you.</FONT></span>")
|
||||
|
||||
/datum/antagonist/rev/proc/remove_revolutionary(borged, deconverter)
|
||||
log_attack("[owner.current] (Key: [key_name(owner.current)]) has been deconverted from the revolution by [deconverter] (Key: [key_name(deconverter)])!")
|
||||
|
||||
+2
-1
@@ -29,7 +29,8 @@
|
||||
icon = beam_icon
|
||||
icon_state = beam_icon_state
|
||||
beam_type = btype
|
||||
addtimer(CALLBACK(src,.proc/End), time)
|
||||
if(time < INFINITY)
|
||||
addtimer(CALLBACK(src,.proc/End), time)
|
||||
|
||||
/datum/beam/proc/Start()
|
||||
Draw()
|
||||
|
||||
@@ -34,7 +34,7 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
|
||||
* Lazy associated list of type -> component/list of components.
|
||||
1. `/datum/component/var/enabled` (protected, boolean)
|
||||
* If the component is enabled. If not, it will not react to signals
|
||||
* `TRUE` by default
|
||||
* `FALSE` by default, set to `TRUE` when a signal is registered
|
||||
1. `/datum/component/var/dupe_mode` (protected, enum)
|
||||
* How duplicate component types are handled when added to the datum.
|
||||
* `COMPONENT_DUPE_HIGHLANDER` (default): Old component will be deleted, new component will first have `/datum/component/proc/InheritComponent(datum/component/old, FALSE)` on it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/component
|
||||
var/enabled = TRUE
|
||||
var/enabled = FALSE
|
||||
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
|
||||
var/dupe_type
|
||||
var/list/signal_procs
|
||||
@@ -24,7 +24,7 @@
|
||||
if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE)
|
||||
qdel(src, TRUE, TRUE)
|
||||
return
|
||||
|
||||
|
||||
_CheckDupesAndJoinParent(P)
|
||||
|
||||
/datum/component/proc/_CheckDupesAndJoinParent()
|
||||
@@ -53,12 +53,12 @@
|
||||
if(!old)
|
||||
//let the others know
|
||||
P.SendSignal(COMSIG_COMPONENT_ADDED, src)
|
||||
|
||||
|
||||
//lazy init the parent's dc list
|
||||
var/list/dc = P.datum_components
|
||||
if(!dc)
|
||||
P.datum_components = dc = list()
|
||||
|
||||
|
||||
//set up the typecache
|
||||
var/our_type = type
|
||||
for(var/I in _GetInverseTypeList(our_type))
|
||||
@@ -122,7 +122,7 @@
|
||||
if(!procs)
|
||||
procs = list()
|
||||
signal_procs = procs
|
||||
|
||||
|
||||
var/list/sig_types = islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types)
|
||||
for(var/sig_type in sig_types)
|
||||
if(!override)
|
||||
@@ -133,6 +133,8 @@
|
||||
if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now
|
||||
proc_or_callback = CALLBACK(src, proc_or_callback)
|
||||
procs[sig_type] = proc_or_callback
|
||||
|
||||
enabled = TRUE
|
||||
|
||||
/datum/component/proc/InheritComponent(datum/component/C, i_am_original)
|
||||
return
|
||||
@@ -172,8 +174,7 @@
|
||||
var/datum/component/C = target
|
||||
if(!C.enabled)
|
||||
return NONE
|
||||
var/list/sps = C.signal_procs
|
||||
var/datum/callback/CB = LAZYACCESS(sps, sigtype)
|
||||
var/datum/callback/CB = C.signal_procs[sigtype]
|
||||
if(!CB)
|
||||
return NONE
|
||||
. = CB.InvokeAsync(arglist(arguments))
|
||||
@@ -185,9 +186,8 @@
|
||||
for(var/I in target)
|
||||
var/datum/component/C = I
|
||||
if(!C.enabled)
|
||||
continue
|
||||
var/list/sps = C.signal_procs
|
||||
var/datum/callback/CB = LAZYACCESS(sps, sigtype)
|
||||
continue
|
||||
var/datum/callback/CB = C.signal_procs[sigtype]
|
||||
if(!CB)
|
||||
continue
|
||||
var/retval = CB.InvokeAsync(arglist(arguments))
|
||||
@@ -264,3 +264,6 @@
|
||||
target.TakeComponent(I)
|
||||
else
|
||||
target.TakeComponent(comps)
|
||||
|
||||
/datum/component/ui_host()
|
||||
return parent
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
//Thing meant for allowing datums and objects to access a NTnet network datum.
|
||||
/datum/proc/ntnet_recieve(datum/netdata/data)
|
||||
return
|
||||
|
||||
/datum/proc/ntnet_send(datum/netdata/data, netid)
|
||||
GET_COMPONENT(NIC, /datum/component/ntnet_interface)
|
||||
if(!NIC)
|
||||
return FALSE
|
||||
return NIC.__network_send(data, netid)
|
||||
|
||||
/datum/component/ntnet_interface
|
||||
var/hardware_id //text
|
||||
var/network_name = "" //text
|
||||
var/list/networks_connected_by_id = list() //id = datum/ntnet
|
||||
|
||||
/datum/component/ntnet_interface/Initialize(force_ID, force_name = "NTNet Device", autoconnect_station_network = TRUE) //Don't force ID unless you know what you're doing!
|
||||
if(!force_ID)
|
||||
hardware_id = "[SSnetworks.assignment_hardware_id++]"
|
||||
else
|
||||
hardware_id = force_ID
|
||||
network_name = force_name
|
||||
SSnetworks.register_interface(src)
|
||||
if(autoconnect_station_network)
|
||||
register_connection(SSnetworks.station_network)
|
||||
|
||||
/datum/component/ntnet_interface/Destroy()
|
||||
unregister_all_connections()
|
||||
SSnetworks.unregister_interface(src)
|
||||
return ..()
|
||||
|
||||
/datum/component/ntnet_interface/proc/__network_recieve(datum/netdata/data) //Do not directly proccall!
|
||||
parent.SendSignal(COMSIG_COMPONENT_NTNET_RECIEVE, data)
|
||||
parent.ntnet_recieve(data)
|
||||
|
||||
/datum/component/ntnet_interface/proc/__network_send(datum/netdata/data, netid) //Do not directly proccall!
|
||||
if(netid)
|
||||
if(networks_connected_by_id[netid])
|
||||
var/datum/ntnet/net = networks_connected_by_id[netid]
|
||||
return net.process_data_transmit(src, data)
|
||||
return FALSE
|
||||
for(var/i in networks_connected_by_id)
|
||||
var/datum/ntnet/net = networks_connected_by_id[i]
|
||||
net.process_data_transmit(src, data)
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/register_connection(datum/ntnet/net)
|
||||
if(net.interface_connect(src))
|
||||
networks_connected_by_id[net.network_id] = net
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/unregister_all_connections()
|
||||
for(var/i in networks_connected_by_id)
|
||||
unregister_connection(networks_connected_by_id[i])
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/unregister_connection(datum/ntnet/net)
|
||||
net.interface_disconnect(src)
|
||||
networks_connected_by_id -= net.network_id
|
||||
return TRUE
|
||||
//Thing meant for allowing datums and objects to access a NTnet network datum.
|
||||
/datum/proc/ntnet_recieve(datum/netdata/data)
|
||||
return
|
||||
|
||||
/datum/proc/ntnet_send(datum/netdata/data, netid)
|
||||
GET_COMPONENT(NIC, /datum/component/ntnet_interface)
|
||||
if(!NIC)
|
||||
return FALSE
|
||||
return NIC.__network_send(data, netid)
|
||||
|
||||
/datum/component/ntnet_interface
|
||||
var/hardware_id //text
|
||||
var/network_name = "" //text
|
||||
var/list/networks_connected_by_id = list() //id = datum/ntnet
|
||||
|
||||
/datum/component/ntnet_interface/Initialize(force_ID, force_name = "NTNet Device", autoconnect_station_network = TRUE) //Don't force ID unless you know what you're doing!
|
||||
if(!force_ID)
|
||||
hardware_id = "[SSnetworks.assignment_hardware_id++]"
|
||||
else
|
||||
hardware_id = force_ID
|
||||
network_name = force_name
|
||||
SSnetworks.register_interface(src)
|
||||
if(autoconnect_station_network)
|
||||
register_connection(SSnetworks.station_network)
|
||||
|
||||
/datum/component/ntnet_interface/Destroy()
|
||||
unregister_all_connections()
|
||||
SSnetworks.unregister_interface(src)
|
||||
return ..()
|
||||
|
||||
/datum/component/ntnet_interface/proc/__network_recieve(datum/netdata/data) //Do not directly proccall!
|
||||
parent.SendSignal(COMSIG_COMPONENT_NTNET_RECIEVE, data)
|
||||
parent.ntnet_recieve(data)
|
||||
|
||||
/datum/component/ntnet_interface/proc/__network_send(datum/netdata/data, netid) //Do not directly proccall!
|
||||
if(netid)
|
||||
if(networks_connected_by_id[netid])
|
||||
var/datum/ntnet/net = networks_connected_by_id[netid]
|
||||
return net.process_data_transmit(src, data)
|
||||
return FALSE
|
||||
for(var/i in networks_connected_by_id)
|
||||
var/datum/ntnet/net = networks_connected_by_id[i]
|
||||
net.process_data_transmit(src, data)
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/register_connection(datum/ntnet/net)
|
||||
if(net.interface_connect(src))
|
||||
networks_connected_by_id[net.network_id] = net
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/unregister_all_connections()
|
||||
for(var/i in networks_connected_by_id)
|
||||
unregister_connection(networks_connected_by_id[i])
|
||||
return TRUE
|
||||
|
||||
/datum/component/ntnet_interface/proc/unregister_connection(datum/ntnet/net)
|
||||
net.interface_disconnect(src)
|
||||
networks_connected_by_id -= net.network_id
|
||||
return TRUE
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
*
|
||||
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
||||
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
||||
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
||||
**/
|
||||
/datum/component/uplink
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/name = "syndicate uplink"
|
||||
var/active = FALSE
|
||||
var/lockable = TRUE
|
||||
var/locked = TRUE
|
||||
var/telecrystals
|
||||
var/selected_cat
|
||||
var/owner = null
|
||||
var/datum/game_mode/gamemode
|
||||
var/spent_telecrystals = 0
|
||||
var/datum/uplink_purchase_log/purchase_log
|
||||
var/list/uplink_items
|
||||
var/hidden_crystals = 0
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||
owner = _owner
|
||||
if(owner)
|
||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
||||
else
|
||||
purchase_log = new(owner, src)
|
||||
lockable = _lockable
|
||||
active = _enabled
|
||||
gamemode = _gamemode
|
||||
telecrystals = starting_tc
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
|
||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||
lockable |= U.lockable
|
||||
active |= U.active
|
||||
if(!gamemode)
|
||||
gamemode = U.gamemode
|
||||
telecrystals += U.telecrystals
|
||||
if(purchase_log && U.purchase_log)
|
||||
purchase_log.MergeWithAndDel(U.purchase_log)
|
||||
|
||||
/datum/component/uplink/Destroy()
|
||||
GLOB.uplinks -= src
|
||||
gamemode = null
|
||||
return ..()
|
||||
|
||||
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
||||
var/amt = TC.amount
|
||||
telecrystals += amt
|
||||
TC.use(amt)
|
||||
|
||||
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
||||
gamemode = _gamemode
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
|
||||
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
|
||||
if(!active)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
for(var/item in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/UI = item
|
||||
var/path = null
|
||||
if(initial(UI.refund_path))
|
||||
path = initial(UI.refund_path)
|
||||
else
|
||||
path = initial(UI.item)
|
||||
var/cost = 0
|
||||
if(initial(UI.refund_amount))
|
||||
cost = initial(UI.refund_amount)
|
||||
else
|
||||
cost = initial(UI.cost)
|
||||
var/refundable = initial(UI.refundable)
|
||||
if(I.type == path && refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
spent_telecrystals -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/datum/component/uplink/proc/interact(mob/user)
|
||||
if(locked)
|
||||
return
|
||||
active = TRUE
|
||||
if(user)
|
||||
ui_interact(user)
|
||||
|
||||
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
active = TRUE
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
/datum/component/uplink/ui_data(mob/user)
|
||||
if(!user.mind)
|
||||
return
|
||||
var/list/data = list()
|
||||
data["telecrystals"] = telecrystals
|
||||
data["lockable"] = lockable
|
||||
|
||||
data["categories"] = list()
|
||||
for(var/category in uplink_items)
|
||||
var/list/cat = list(
|
||||
"name" = category,
|
||||
"items" = (category == selected_cat ? list() : null))
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
data["categories"] += list(cat)
|
||||
return data
|
||||
|
||||
/datum/component/uplink/ui_act(action, params)
|
||||
if(!active)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("buy")
|
||||
var/item = params["item"]
|
||||
|
||||
var/list/buyable_items = list()
|
||||
for(var/category in uplink_items)
|
||||
buyable_items += uplink_items[category]
|
||||
|
||||
if(item in buyable_items)
|
||||
var/datum/uplink_item/I = buyable_items[item]
|
||||
MakePurchase(usr, I)
|
||||
. = TRUE
|
||||
if("lock")
|
||||
active = FALSE
|
||||
locked = TRUE
|
||||
telecrystals += hidden_crystals
|
||||
hidden_crystals = 0
|
||||
SStgui.close_uis(src)
|
||||
if("select")
|
||||
selected_cat = params["category"]
|
||||
return TRUE
|
||||
|
||||
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
||||
if(!istype(U))
|
||||
return
|
||||
if (!user || user.incapacitated())
|
||||
return
|
||||
|
||||
if(telecrystals < U.cost || U.limited_stock == 0)
|
||||
return
|
||||
telecrystals -= U.cost
|
||||
|
||||
var/atom/A = U.spawn_item(get_turf(user), src, user)
|
||||
if(U.purchase_log_vis && purchase_log)
|
||||
var/obj/item/storage/box/B = A
|
||||
var/list/atom/logging = list()
|
||||
if(istype(B) && B.contents.len > 0)
|
||||
logging |= list(B)
|
||||
else
|
||||
logging |= A
|
||||
for(var/atom/_logging in logging)
|
||||
purchase_log.LogPurchase(_logging, U.cost)
|
||||
|
||||
if(U.limited_stock > 0)
|
||||
U.limited_stock -= 1
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
|
||||
if(ishuman(user) && istype(A, /obj/item))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.put_in_hands(A))
|
||||
to_chat(H, "[A] materializes into your hands!")
|
||||
else
|
||||
to_chat(H, "\The [A] materializes onto the floor.")
|
||||
return TRUE
|
||||
|
||||
@@ -143,14 +143,25 @@
|
||||
//Proc to use when you 100% want to infect someone, as long as they aren't immune
|
||||
/mob/proc/ForceContractDisease(datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
return FALSE
|
||||
AddDisease(D)
|
||||
|
||||
|
||||
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
|
||||
if(dna && (VIRUSIMMUNE in dna.species.species_traits) && !D.bypasses_immunity)
|
||||
return 0
|
||||
|
||||
if(dna)
|
||||
if((VIRUSIMMUNE in dna.species.species_traits) && !D.bypasses_immunity)
|
||||
return FALSE
|
||||
|
||||
var/can_infect = FALSE
|
||||
for(var/host_type in D.infectable_hosts)
|
||||
if(host_type in dna.species.species_traits)
|
||||
can_infect = TRUE
|
||||
break
|
||||
if(!can_infect)
|
||||
return FALSE
|
||||
|
||||
for(var/thing in D.required_organs)
|
||||
if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs)))
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -30,6 +30,8 @@
|
||||
var/list/required_organs = list()
|
||||
var/needs_all_cures = TRUE
|
||||
var/list/strain_data = list() //dna_spread special bullshit
|
||||
var/list/infectable_hosts = list(SPECIES_ORGANIC) //if the disease can spread on organics, synthetics, or undead
|
||||
var/process_dead = FALSE //if this ticks while the host is dead
|
||||
|
||||
/datum/disease/Destroy()
|
||||
affected_mob = null
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/datum/symptom/undead_adaptation
|
||||
name = "Necrotic Metabolism"
|
||||
desc = "The virus is able to thrive and act even within dead hosts."
|
||||
stealth = 2
|
||||
resistance = -2
|
||||
stage_speed = 1
|
||||
transmittable = 0
|
||||
level = 5
|
||||
severity = 0
|
||||
|
||||
/datum/symptom/undead_adaptation/Start(datum/disease/advance/A)
|
||||
if(!..())
|
||||
return
|
||||
A.process_dead = TRUE
|
||||
A.infectable_hosts |= SPECIES_UNDEAD
|
||||
|
||||
/datum/symptom/inorganic_adaptation
|
||||
name = "Inorganic Biology"
|
||||
desc = "The virus can survive and replicate even in an inorganic environment, increasing its resistance and infection rate."
|
||||
stealth = -1
|
||||
resistance = 4
|
||||
stage_speed = -2
|
||||
transmittable = 3
|
||||
level = 5
|
||||
severity = 0
|
||||
|
||||
/datum/symptom/inorganic_adaptation/Start(datum/disease/advance/A)
|
||||
if(!..())
|
||||
return
|
||||
A.infectable_hosts |= SPECIES_INORGANIC
|
||||
@@ -10,6 +10,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
desc = "If left untreated subject will regurgitate bees."
|
||||
severity = VIRUS_SEVERITY_MEDIUM
|
||||
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD) //bees nesting in corpses
|
||||
|
||||
/datum/disease/beesease/stage_act()
|
||||
..()
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
permeability_mod = 0.75
|
||||
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
|
||||
severity = VIRUS_SEVERITY_MEDIUM
|
||||
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_ROBOTIC)
|
||||
process_dead = TRUE
|
||||
|
||||
/datum/disease/magnitis/stage_act()
|
||||
..()
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
|
||||
severity = VIRUS_SEVERITY_MEDIUM
|
||||
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_INORGANIC, SPECIES_ROBOTIC)
|
||||
bypasses_immunity = TRUE //2spook
|
||||
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
|
||||
|
||||
/datum/disease/parrot_possession/stage_act()
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 1
|
||||
severity = VIRUS_SEVERITY_BIOHAZARD
|
||||
process_dead = TRUE
|
||||
|
||||
/datum/disease/rhumba_beat/stage_act()
|
||||
..()
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
|
||||
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
|
||||
new_form = /mob/living/silicon/robot
|
||||
|
||||
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_ROBOTIC)
|
||||
|
||||
/datum/disease/transformation/robot/stage_act()
|
||||
..()
|
||||
@@ -240,3 +240,4 @@
|
||||
stage4 = list("<span class='danger'>You're ravenous.</span>")
|
||||
stage5 = list("<span class='danger'>You have become a morph.</span>")
|
||||
new_form = /mob/living/simple_animal/hostile/morph
|
||||
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_INORGANIC, SPECIES_UNDEAD) //magic!
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#define HOLOPAD_MAX_DIAL_TIME 200
|
||||
|
||||
#define HOLORECORD_DELAY "delay"
|
||||
#define HOLORECORD_SAY "say"
|
||||
#define HOLORECORD_SOUND "sound"
|
||||
#define HOLORECORD_LANGUAGE "lang"
|
||||
#define HOLORECORD_PRESET "preset"
|
||||
#define HOLORECORD_RENAME "rename"
|
||||
|
||||
#define HOLORECORD_MAX_LENGTH 200
|
||||
|
||||
/mob/camera/aiEye/remote/holo/setLoc()
|
||||
. = ..()
|
||||
var/obj/machinery/holopad/H = origin
|
||||
@@ -184,3 +193,122 @@
|
||||
|
||||
/datum/action/innate/end_holocall/Activate()
|
||||
hcall.Disconnect(hcall.calling_holopad)
|
||||
|
||||
|
||||
//RECORDS
|
||||
/datum/holorecord
|
||||
var/caller_name = "Unknown" //Caller name
|
||||
var/image/caller_image
|
||||
var/list/entries = list()
|
||||
var/language = /datum/language/common //Initial language, can be changed by HOLORECORD_LANGUAGE entries
|
||||
|
||||
/obj/item/disk/holodisk
|
||||
name = "holorecord disk"
|
||||
desc = "Stores recorder holocalls."
|
||||
icon_state = "holodisk"
|
||||
var/datum/holorecord/record
|
||||
//Preset variables
|
||||
var/preset_image_type
|
||||
var/preset_record_text
|
||||
|
||||
/obj/item/disk/holodisk/Initialize(mapload)
|
||||
. = ..()
|
||||
if(preset_record_text)
|
||||
build_record()
|
||||
|
||||
/obj/item/disk/holodisk/Destroy()
|
||||
QDEL_NULL(record)
|
||||
return ..()
|
||||
|
||||
/obj/item/disk/holodisk/proc/build_record()
|
||||
record = new
|
||||
var/list/lines = splittext(preset_record_text,"\n")
|
||||
for(var/line in lines)
|
||||
var/prepared_line = trim(line)
|
||||
if(!length(prepared_line))
|
||||
continue
|
||||
var/splitpoint = findtext(prepared_line," ")
|
||||
if(!splitpoint)
|
||||
continue
|
||||
var/command = copytext(prepared_line,1,splitpoint)
|
||||
var/value = copytext(prepared_line,splitpoint+1)
|
||||
switch(command)
|
||||
if("DELAY")
|
||||
var/delay_value = text2num(value)
|
||||
if(!delay_value)
|
||||
continue
|
||||
record.entries += list(list(HOLORECORD_DELAY,delay_value))
|
||||
if("NAME")
|
||||
if(!record.caller_name)
|
||||
record.caller_name = value
|
||||
else
|
||||
record.entries += list(list(HOLORECORD_RENAME,value))
|
||||
if("SAY")
|
||||
record.entries += list(list(HOLORECORD_SAY,value))
|
||||
if("SOUND")
|
||||
record.entries += list(list(HOLORECORD_SOUND,value))
|
||||
if("LANGUAGE")
|
||||
var/lang_type = text2path(value)
|
||||
if(ispath(lang_type,/datum/language))
|
||||
record.entries += list(list(HOLORECORD_LANGUAGE,lang_type))
|
||||
if("PRESET")
|
||||
var/preset_type = text2path(value)
|
||||
if(ispath(preset_type,/datum/preset_holoimage))
|
||||
record.entries += list(list(HOLORECORD_PRESET,preset_type))
|
||||
if(!preset_image_type)
|
||||
record.caller_image = image('icons/mob/animal.dmi',"old")
|
||||
else
|
||||
var/datum/preset_holoimage/H = new preset_image_type
|
||||
record.caller_image = H.build_image()
|
||||
|
||||
//These build caller image from outfit and some additional data, for use by mappers for ruin holorecords
|
||||
/datum/preset_holoimage
|
||||
var/nonhuman_mobtype //Fill this if you just want something nonhuman
|
||||
var/outfit_type
|
||||
var/species_type = /datum/species/human
|
||||
|
||||
/datum/preset_holoimage/proc/build_image()
|
||||
if(nonhuman_mobtype)
|
||||
var/mob/living/L = nonhuman_mobtype
|
||||
. = image(initial(L.icon),initial(L.icon_state))
|
||||
else
|
||||
var/mob/living/carbon/human/dummy/mannequin = generate_or_wait_for_human_dummy("HOLODISK_PRESET")
|
||||
if(species_type)
|
||||
mannequin.set_species(species_type)
|
||||
if(outfit_type)
|
||||
mannequin.equipOutfit(outfit_type,TRUE)
|
||||
mannequin.setDir(SOUTH)
|
||||
COMPILE_OVERLAYS(mannequin)
|
||||
. = getFlatIcon(mannequin)
|
||||
unset_busy_human_dummy("HOLODISK_PRESET")
|
||||
|
||||
/obj/item/disk/holodisk/example
|
||||
preset_image_type = /datum/preset_holoimage/clown
|
||||
preset_record_text = {"
|
||||
NAME Clown
|
||||
DELAY 10
|
||||
SAY Why did the chaplain cross the maint ?
|
||||
DELAY 20
|
||||
SAY He wanted to get to the other side!
|
||||
SOUND clownstep
|
||||
DELAY 30
|
||||
LANGUAGE /datum/language/narsie
|
||||
SAY Helped him get there!
|
||||
DELAY 10
|
||||
SAY ALSO IM SECRETLY A GORILLA
|
||||
DELAY 10
|
||||
PRESET /datum/preset_holoimage/gorilla
|
||||
NAME Gorilla
|
||||
LANGUAGE /datum/language/common
|
||||
SAY OOGA
|
||||
DELAY 20"}
|
||||
|
||||
/datum/preset_holoimage/engineer
|
||||
outfit_type = /datum/outfit/job/engineer/gloved/rig
|
||||
|
||||
/datum/preset_holoimage/gorilla
|
||||
nonhuman_mobtype = /mob/living/simple_animal/hostile/gorilla
|
||||
|
||||
/datum/preset_holoimage/clown
|
||||
outfit_type = /datum/outfit/job/clown
|
||||
|
||||
|
||||
+9
-12
@@ -299,9 +299,7 @@
|
||||
to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
|
||||
. = 0
|
||||
else
|
||||
var/obj/item/device/uplink/U = new(uplink_loc)
|
||||
U.owner = "[traitor_mob.key]"
|
||||
uplink_loc.hidden_uplink = U
|
||||
uplink_loc.LoadComponent(/datum/component/uplink, traitor_mob.key)
|
||||
|
||||
if(uplink_loc == R)
|
||||
R.traitor_frequency = sanitize_frequency(rand(MIN_FREQ, MAX_FREQ))
|
||||
@@ -717,7 +715,7 @@
|
||||
|
||||
if(((src in SSticker.mode.traitors) || (src in SSticker.mode.syndicates)) && ishuman(current))
|
||||
text = "Uplink: <a href='?src=[REF(src)];common=uplink'>give</a>"
|
||||
var/obj/item/device/uplink/U = find_syndicate_uplink()
|
||||
var/datum/component/uplink/U = find_syndicate_uplink()
|
||||
if(U)
|
||||
text += " | <a href='?src=[REF(src)];common=takeuplink'>take</a>"
|
||||
if (check_rights(R_FUN, 0))
|
||||
@@ -1306,7 +1304,7 @@
|
||||
log_admin("[key_name(usr)] removed [current]'s uplink.")
|
||||
if("crystals")
|
||||
if(check_rights(R_FUN, 0))
|
||||
var/obj/item/device/uplink/U = find_syndicate_uplink()
|
||||
var/datum/component/uplink/U = find_syndicate_uplink()
|
||||
if(U)
|
||||
var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.telecrystals) as null | num
|
||||
if(!isnull(crystals))
|
||||
@@ -1335,15 +1333,14 @@
|
||||
|
||||
/datum/mind/proc/find_syndicate_uplink()
|
||||
var/list/L = current.GetAllContents()
|
||||
for (var/obj/item/I in L)
|
||||
if (I.hidden_uplink)
|
||||
return I.hidden_uplink
|
||||
return null
|
||||
for (var/i in L)
|
||||
var/atom/movable/I = i
|
||||
. = I.GetComponent(/datum/component/uplink)
|
||||
if(.)
|
||||
break
|
||||
|
||||
/datum/mind/proc/take_uplink()
|
||||
var/obj/item/device/uplink/H = find_syndicate_uplink()
|
||||
if(H)
|
||||
qdel(H)
|
||||
qdel(find_syndicate_uplink())
|
||||
|
||||
/datum/mind/proc/make_Traitor()
|
||||
if(!(has_antag_datum(ANTAG_DATUM_TRAITOR)))
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/datum/saymode
|
||||
var/key
|
||||
var/mode
|
||||
|
||||
//Return FALSE if you have handled the message. Otherwise, return TRUE and saycode will continue doing saycode things.
|
||||
//user = whoever said the message
|
||||
//message = the message
|
||||
//language = the language.
|
||||
/datum/saymode/proc/handle_message(mob/living/user, message, datum/language/language)
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/saymode/changeling
|
||||
key = "g"
|
||||
mode = MODE_CHANGELING
|
||||
|
||||
/datum/saymode/changeling/handle_message(mob/living/user, message, datum/language/language)
|
||||
switch(user.lingcheck())
|
||||
if(LINGHIVE_LINK)
|
||||
var/msg = "<i><font color=#800040><b>[user.mind]:</b> [message]</font></i>"
|
||||
for(var/_M in GLOB.mob_list)
|
||||
var/mob/M = _M
|
||||
if(M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [msg]")
|
||||
else
|
||||
switch(M.lingcheck())
|
||||
if(LINGHIVE_LINK, LINGHIVE_LING)
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_OUTSIDER)
|
||||
if(prob(40))
|
||||
to_chat(M, "<i><font color=#800080>We can faintly sense an outsider trying to communicate through the hivemind...</font></i>")
|
||||
if(LINGHIVE_LING)
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
var/msg = "<i><font color=#800080><b>[changeling.changelingID]:</b> [message]</font></i>"
|
||||
log_talk(src,"[changeling.changelingID]/[user.key] : [message]",LOGSAY)
|
||||
for(var/_M in GLOB.mob_list)
|
||||
var/mob/M = _M
|
||||
if(M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [msg]")
|
||||
else
|
||||
switch(M.lingcheck())
|
||||
if(LINGHIVE_LINK)
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_LING)
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_OUTSIDER)
|
||||
if(prob(40))
|
||||
to_chat(M, "<i><font color=#800080>We can faintly sense another of our kind trying to communicate through the hivemind...</font></i>")
|
||||
if(LINGHIVE_OUTSIDER)
|
||||
to_chat(user, "<i><font color=#800080>Our senses have not evolved enough to be able to communicate this way...</font></i>")
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/saymode/xeno
|
||||
key = "a"
|
||||
mode = MODE_ALIEN
|
||||
|
||||
/datum/saymode/xeno/handle_message(mob/living/user, message, datum/language/language)
|
||||
if(user.hivecheck())
|
||||
user.alien_talk(message)
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/saymode/vocalcords
|
||||
key = "x"
|
||||
mode = MODE_VOCALCORDS
|
||||
|
||||
/datum/saymode/vocalcords/handle_message(mob/living/user, message, datum/language/language)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE)
|
||||
if(V && V.can_speak_with())
|
||||
V.handle_speech(message) //message
|
||||
V.speak_with(message) //action
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/saymode/binary //everything that uses .b (silicons, drones, blobbernauts/spores, swarmers)
|
||||
key = "b"
|
||||
mode = MODE_BINARY
|
||||
|
||||
/datum/saymode/binary/handle_message(mob/living/user, message, datum/language/language)
|
||||
if(isswarmer(user))
|
||||
var/mob/living/simple_animal/hostile/swarmer/S = user
|
||||
S.swarmer_chat(message)
|
||||
return FALSE
|
||||
if(isblobmonster(user))
|
||||
var/mob/living/simple_animal/hostile/blob/B = user
|
||||
B.blob_chat(message)
|
||||
return FALSE
|
||||
if(isdrone(user))
|
||||
var/mob/living/simple_animal/drone/D = user
|
||||
D.drone_chat(message)
|
||||
return FALSE
|
||||
if(user.binarycheck())
|
||||
user.robot_talk(message)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/saymode/holopad
|
||||
key = "h"
|
||||
mode = MODE_HOLOPAD
|
||||
|
||||
/datum/saymode/holopad/handle_message(mob/living/user, message, datum/language/language)
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
AI.holopad_talk(message, language)
|
||||
return FALSE
|
||||
return FALSE
|
||||
@@ -89,43 +89,11 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
/datum/uplink_item/proc/get_discount()
|
||||
return pick(4;0.75,2;0.5,1;0.25)
|
||||
|
||||
/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
/datum/uplink_item/proc/spawn_item(turf/loc, datum/component/uplink/U, mob/user)
|
||||
if(item)
|
||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]"))
|
||||
return new item(loc)
|
||||
|
||||
/datum/uplink_item/proc/buy(mob/user, obj/item/device/uplink/U)
|
||||
if(!istype(U))
|
||||
return
|
||||
if (!user || user.incapacitated())
|
||||
return
|
||||
|
||||
if(U.telecrystals < cost || limited_stock == 0)
|
||||
return
|
||||
else
|
||||
U.telecrystals -= cost
|
||||
U.spent_telecrystals += cost
|
||||
|
||||
var/atom/A = spawn_item(get_turf(user), U)
|
||||
var/obj/item/storage/box/B = A
|
||||
if(istype(B) && B.contents.len > 0)
|
||||
for(var/obj/item/I in B)
|
||||
U.purchase_log += "<big>[icon2base64html(I)]</big>"
|
||||
else
|
||||
if(purchase_log_vis)
|
||||
U.purchase_log += "<big>[icon2base64html(A)]</big>"
|
||||
|
||||
if(limited_stock > 0)
|
||||
limited_stock -= 1
|
||||
|
||||
if(ishuman(user) && istype(A, /obj/item))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.put_in_hands(A))
|
||||
to_chat(H, "[A] materializes into your hands!")
|
||||
else
|
||||
to_chat(H, "\The [A] materializes onto the floor.")
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/Destroy()
|
||||
if(src in GLOB.uplink_items)
|
||||
GLOB.uplink_items -= src //Take us out instead of leaving a null!
|
||||
@@ -368,7 +336,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
cost = 12
|
||||
surplus = 35
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
|
||||
/datum/uplink_item/dangerous/guardian
|
||||
name = "Holoparasites"
|
||||
desc = "Though capable of near sorcerous feats via use of hardlight holograms and nanomachines, they require an \
|
||||
@@ -977,8 +945,8 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/briefcase_launchpad
|
||||
cost = 6
|
||||
|
||||
/datum/uplink_item/device_tools/briefcase_launchpad/buy(mob/user, obj/item/device/uplink/U)
|
||||
var/obj/item/device/launchpad_remote/L = new(get_turf(user)) //free remote
|
||||
/datum/uplink_item/device_tools/briefcase_launchpad/spawn_item(turf/loc, datum/component/uplink/U, mob/user)
|
||||
var/obj/item/device/launchpad_remote/L = new(loc) //free remote
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.put_in_hands(L))
|
||||
@@ -1381,7 +1349,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/surplus/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
/datum/uplink_item/badass/surplus/spawn_item(turf/loc, datum/component/uplink/U)
|
||||
var/list/uplink_items = get_uplink_items(SSticker && SSticker.mode? SSticker.mode : null)
|
||||
|
||||
var/crate_value = 50
|
||||
@@ -1397,7 +1365,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
continue
|
||||
crate_value -= I.cost
|
||||
var/obj/goods = new I.item(C)
|
||||
U.purchase_log += "<big>[icon2base64html(goods)]</big>"
|
||||
U.purchase_log.LogPurchase(goods, I.cost)
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(name)]", "[cost]"))
|
||||
return C
|
||||
@@ -1409,7 +1377,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
cost = 0
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/random/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
/datum/uplink_item/badass/random/spawn_item(turf/loc, datum/component/uplink/U)
|
||||
var/list/uplink_items = get_uplink_items(SSticker && SSticker.mode? SSticker.mode : null)
|
||||
var/list/possible_items = list()
|
||||
for(var/category in uplink_items)
|
||||
@@ -0,0 +1,64 @@
|
||||
GLOBAL_LIST(uplink_purchase_logs_by_key) //assoc key = /datum/uplink_purchase_log
|
||||
|
||||
/datum/uplink_purchase_log
|
||||
var/owner
|
||||
var/list/purchase_log //assoc path-of-item = /datum/uplink_purchase_entry
|
||||
var/datum/component/uplink/parent
|
||||
var/total_spent = 0
|
||||
|
||||
/datum/uplink_purchase_log/New(_owner, datum/component/uplink/_parent)
|
||||
owner = _owner
|
||||
parent = _parent
|
||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||
if(owner)
|
||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
stack_trace("WARNING: DUPLICATE PURCHASE LOGS DETECTED. [_owner] [_parent] [_parent.type]")
|
||||
MergeWithAndDel(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
GLOB.uplink_purchase_logs_by_key[owner] = src
|
||||
purchase_log = list()
|
||||
|
||||
/datum/uplink_purchase_log/Destroy()
|
||||
purchase_log = null
|
||||
parent = null
|
||||
return ..()
|
||||
|
||||
/datum/uplink_purchase_log/proc/MergeWithAndDel(datum/uplink_purchase_log/other)
|
||||
if(!istype(other))
|
||||
return
|
||||
. = owner == other.owner
|
||||
if(!.)
|
||||
return
|
||||
for(var/path in other.purchase_log)
|
||||
if(!purchase_log[path])
|
||||
purchase_log[path] = other.purchase_log[path]
|
||||
else
|
||||
var/datum/uplink_purchase_entry/UPE = purchase_log[path]
|
||||
var/datum/uplink_purchase_entry/UPE_O = other.purchase_log[path]
|
||||
UPE.amount_purchased += UPE_O.amount_purchased
|
||||
qdel(other)
|
||||
|
||||
/datum/uplink_purchase_log/proc/TotalTelecrystalsSpent()
|
||||
. = total_spent
|
||||
|
||||
/datum/uplink_purchase_log/proc/generate_render(show_key = TRUE)
|
||||
. = ""
|
||||
for(var/path in purchase_log)
|
||||
var/datum/uplink_purchase_entry/UPE = purchase_log[path]
|
||||
. += "<big>\[[UPE.icon_b64][show_key?"([owner])":""]\]</big>"
|
||||
|
||||
/datum/uplink_purchase_log/proc/LogPurchase(atom/A, cost)
|
||||
var/datum/uplink_purchase_entry/UPE
|
||||
if(purchase_log[A.type])
|
||||
UPE = purchase_log[A.type]
|
||||
else
|
||||
UPE = new
|
||||
purchase_log[A.type] = UPE
|
||||
UPE.path = A.type
|
||||
UPE.icon_b64 = "[icon2base64html(A)]"
|
||||
UPE.amount_purchased++
|
||||
total_spent += cost
|
||||
|
||||
/datum/uplink_purchase_entry
|
||||
var/amount_purchased = 0
|
||||
var/path
|
||||
var/icon_b64
|
||||
@@ -20,10 +20,11 @@
|
||||
|
||||
overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only
|
||||
immunity_type = "lava"
|
||||
|
||||
|
||||
/datum/weather/floor_is_lava/weather_act(mob/living/L)
|
||||
for(var/obj/structure/O in L.loc)
|
||||
if(O.density)
|
||||
for(var/obj/structure/O in L.loc)
|
||||
if(O.density || (L in O.buckled_mobs && istype(O, /obj/structure/bed)))
|
||||
return
|
||||
if(L.loc.density)
|
||||
return
|
||||
|
||||
@@ -56,13 +56,6 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
blob_chat(message)
|
||||
return 1
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/proc/blob_chat(msg)
|
||||
var/spanned_message = say_quote(msg, get_spans())
|
||||
var/rendered = "<font color=\"#EE4000\"><b>\[Blob Telepathy\] [real_name]</b> [spanned_message]</font>"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
to_chat(target, "<span class='userdanger'>A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!</span>")
|
||||
for(var/mi in GLOB.mob_list)
|
||||
var/mob/M = mi
|
||||
if(M.lingcheck() == 2)
|
||||
if(M.lingcheck() == LINGHIVE_LING)
|
||||
to_chat(M, "<i><font color=#800080>We can sense a foreign presence in the hivemind...</font></i>")
|
||||
target.mind.linglink = 1
|
||||
target.say(":g AAAAARRRRGGGGGHHHHH!!")
|
||||
|
||||
@@ -734,6 +734,33 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
owner.playsound_local(owner, "sparks", 50, 0)
|
||||
|
||||
|
||||
//Disable Emergency Lights
|
||||
/datum/AI_Module/small/emergency_lights
|
||||
module_name = "Disable Emergency Lights"
|
||||
mod_pick_name = "disable_emergency_lights"
|
||||
description = "Cuts emergency lights across the entire station. If power is lost to light fixtures, they will not attempt to fall back on emergency power reserves."
|
||||
cost = 10
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/emergency_lights
|
||||
unlock_text = "<span class='notice'>You hook into the powernet and locate the connections between light fixtures and their fallbacks.</span>"
|
||||
unlock_sound = "sparks"
|
||||
|
||||
/datum/action/innate/ai/emergency_lights
|
||||
name = "Disable Emergency Lights"
|
||||
desc = "Disables all emergency lighting. Note that emergency lights can be restored through reboot at an APC."
|
||||
button_icon_state = "emergency_lights"
|
||||
uses = 1
|
||||
|
||||
/datum/action/innate/ai/emergency_lights/Activate()
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z in GLOB.station_z_levels)
|
||||
L.no_emergency = TRUE
|
||||
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
|
||||
CHECK_TICK
|
||||
to_chat(owner, "<span class='notice'>Emergency light connections severed.</span>")
|
||||
owner.playsound_local(owner, 'sound/effects/light_flicker.ogg', 50, FALSE)
|
||||
|
||||
|
||||
//Reactivate Camera Network: Reactivates up to 30 cameras across the station.
|
||||
/datum/AI_Module/small/reactivate_cameras
|
||||
module_name = "Reactivate Camera Network"
|
||||
|
||||
@@ -121,13 +121,6 @@
|
||||
if(statpanel("Status"))
|
||||
stat("Resources:",resources)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
swarmer_chat(message)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
|
||||
@@ -264,10 +264,11 @@
|
||||
var/TC_uses = 0
|
||||
for(var/datum/mind/syndicate in syndicates)
|
||||
text += printplayer(syndicate)
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == syndicate.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
purchases += H.purchase_log
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H.purchase_log)
|
||||
purchases += H.purchase_log.generate_render()
|
||||
else
|
||||
stack_trace("WARNING: Uplink with no purchase_log in nuclear mode! Owner: [H.owner]")
|
||||
text += "<br>"
|
||||
text += "(Syndicates used [TC_uses] TC) [purchases]"
|
||||
if(TC_uses == 0 && station_was_nuked && !are_operatives_dead())
|
||||
@@ -325,9 +326,7 @@
|
||||
R.freqlock = 1
|
||||
|
||||
if(tc)
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H)
|
||||
U.hidden_uplink.owner = "[H.key]"
|
||||
U.hidden_uplink.telecrystals = tc
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, slot_in_backpack)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
|
||||
@@ -54,10 +54,7 @@
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
board.challenge = TRUE
|
||||
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(get_turf(user))
|
||||
U.hidden_uplink.owner = "[user.key]"
|
||||
U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS
|
||||
U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
new /obj/item/device/radio/uplink/nuclear(get_turf(user), user.key, CHALLENGE_TELECRYSTALS)
|
||||
CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY))
|
||||
SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1)
|
||||
|
||||
@@ -66,22 +63,22 @@
|
||||
/obj/item/device/nuclear_challenge/proc/check_allowed(mob/living/user)
|
||||
if(declaring_war)
|
||||
to_chat(user, "You are already in the process of declaring war! Make your mind up.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(GLOB.player_list.len < CHALLENGE_MIN_PLAYERS)
|
||||
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
to_chat(user, "You have to be at your base to use this.")
|
||||
return 0
|
||||
return FALSE
|
||||
if(world.time-SSticker.round_start_time > CHALLENGE_TIME_LIMIT)
|
||||
to_chat(user, "It's too late to declare hostilities. Your benefactors are already busy with other schemes. You'll have to make do with what you have on hand.")
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/V in GLOB.syndicate_shuttle_boards)
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = V
|
||||
if(board.moved)
|
||||
to_chat(user, "The shuttle has already been moved! You have forfeit the right to declare war.")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
#undef CHALLENGE_TELECRYSTALS
|
||||
#undef CHALLENGE_MIN_PLAYERS
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/device/onetankbomb, /obj/item/radio, /obj/item/device/pda/ai,
|
||||
/obj/item/device/uplink, /obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
|
||||
@@ -103,11 +103,11 @@
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = FALSE
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in GLOB.uplinks)
|
||||
for(var/datum/component/uplink/H in GLOB.uplinks)
|
||||
if(H && H.owner && H.owner == traitor.key)
|
||||
TC_uses += H.spent_telecrystals
|
||||
uplink_true = TRUE
|
||||
purchases += H.purchase_log
|
||||
purchases += H.purchase_log.generate_render(FALSE)
|
||||
|
||||
var/objectives = ""
|
||||
if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this.
|
||||
|
||||
@@ -33,7 +33,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
if(uplinkholder)
|
||||
to_chat(user, "<span class='notice'>[src] already has an uplink in it.</span>")
|
||||
return
|
||||
if(I.hidden_uplink)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
|
||||
if(hidden_uplink)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
uplinkholder = I
|
||||
@@ -56,26 +57,28 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/proc/donateTC(amt, addLog = 1)
|
||||
if(uplinkholder && linkedboss)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
if(amt < 0)
|
||||
linkedboss.storedcrystals += uplinkholder.hidden_uplink.telecrystals
|
||||
linkedboss.storedcrystals += hidden_uplink.telecrystals
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] donated [uplinkholder.hidden_uplink.telecrystals] telecrystals to [linkedboss].")
|
||||
uplinkholder.hidden_uplink.telecrystals = 0
|
||||
else if(amt <= uplinkholder.hidden_uplink.telecrystals)
|
||||
uplinkholder.hidden_uplink.telecrystals -= amt
|
||||
linkedboss.logTransfer("[src] donated [hidden_uplink.telecrystals] telecrystals to [linkedboss].")
|
||||
hidden_uplink.telecrystals = 0
|
||||
else if(amt <= hidden_uplink.telecrystals)
|
||||
hidden_uplink.telecrystals -= amt
|
||||
linkedboss.storedcrystals += amt
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] donated [amt] telecrystals to [linkedboss].")
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/proc/giveTC(amt, addLog = 1)
|
||||
if(uplinkholder && linkedboss)
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
if(amt < 0)
|
||||
uplinkholder.hidden_uplink.telecrystals += linkedboss.storedcrystals
|
||||
hidden_uplink.telecrystals += linkedboss.storedcrystals
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] received [linkedboss.storedcrystals] telecrystals from [linkedboss].")
|
||||
linkedboss.storedcrystals = 0
|
||||
else if(amt <= linkedboss.storedcrystals)
|
||||
uplinkholder.hidden_uplink.telecrystals += amt
|
||||
hidden_uplink.telecrystals += amt
|
||||
linkedboss.storedcrystals -= amt
|
||||
if(addLog)
|
||||
linkedboss.logTransfer("[src] received [amt] telecrystals from [linkedboss].")
|
||||
@@ -95,7 +98,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
dat += "No linked management consoles detected. Scan for uplink stations using the management console.<BR><BR>"
|
||||
|
||||
if(uplinkholder)
|
||||
dat += "[uplinkholder.hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder)
|
||||
dat += "[hidden_uplink.telecrystals] telecrystals remain in this uplink.<BR>"
|
||||
if(linkedboss)
|
||||
dat += "Donate TC: <a href='byond://?src=[REF(src)];donate=1'>1</a> | <a href='byond://?src=[REF(src)];donate=5'>5</a> | <a href='byond://?src=[REF(src)];donate=-1'>All</a>"
|
||||
dat += "<br><a href='byond://?src=[REF(src)];eject=1'>Eject Uplink</a>"
|
||||
@@ -175,7 +179,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
for(var/obj/machinery/computer/telecrystals/uplinker/A in TCstations)
|
||||
dat += "[A.name] | "
|
||||
if(A.uplinkholder)
|
||||
dat += "[A.uplinkholder.hidden_uplink.telecrystals] telecrystals."
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, A.uplinkholder)
|
||||
dat += "[hidden_uplink.telecrystals] telecrystals."
|
||||
if(storedcrystals)
|
||||
dat+= "<BR>Add TC: <a href ='?src=[REF(src)];target=[REF(A)];give=1'>1</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=5'>5</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=10'>10</a> | <a href ='?src=[REF(src)];target=[REF(A)];give=-1'>All</a>"
|
||||
dat += "<BR>"
|
||||
|
||||
@@ -47,6 +47,12 @@ Possible to do for anyone motivated enough:
|
||||
var/temp = ""
|
||||
var/list/holo_calls //array of /datum/holocalls
|
||||
var/datum/holocall/outgoing_call //do not modify the datums only check and call the public procs
|
||||
var/obj/item/disk/holodisk/disk //Record disk
|
||||
var/replay_mode = FALSE //currently replaying a recording
|
||||
var/record_mode = FALSE //currently recording
|
||||
var/record_start = 0 //recording start time
|
||||
var/record_user //user that inititiated the recording
|
||||
var/obj/effect/overlay/holo_pad_hologram/replay_holo //replay hologram
|
||||
var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
|
||||
var/static/list/holopads = list()
|
||||
|
||||
@@ -64,6 +70,14 @@ Possible to do for anyone motivated enough:
|
||||
|
||||
for (var/I in masters)
|
||||
clear_holo(I)
|
||||
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
if(record_mode)
|
||||
record_stop()
|
||||
|
||||
QDEL_NULL(disk)
|
||||
|
||||
holopads -= src
|
||||
return ..()
|
||||
|
||||
@@ -72,6 +86,10 @@ Possible to do for anyone motivated enough:
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
if(record_mode)
|
||||
record_stop()
|
||||
if(outgoing_call)
|
||||
outgoing_call.ConnectionFailure(src)
|
||||
|
||||
@@ -101,6 +119,18 @@ Possible to do for anyone motivated enough:
|
||||
|
||||
if(default_deconstruction_crowbar(P))
|
||||
return
|
||||
|
||||
if(istype(P,/obj/item/disk/holodisk))
|
||||
if(disk)
|
||||
to_chat(user,"<span class='notice'>There's already a disk inside [src]</span>")
|
||||
return
|
||||
if (!user.transferItemToLoc(P,src))
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You insert [P] into [src]</span>")
|
||||
disk = P
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/AltClick(mob/living/carbon/human/user)
|
||||
@@ -122,6 +152,17 @@ Possible to do for anyone motivated enough:
|
||||
else
|
||||
dat = "<a href='?src=[REF(src)];AIrequest=1'>Request an AI's presence.</a><br>"
|
||||
dat += "<a href='?src=[REF(src)];Holocall=1'>Call another holopad.</a><br>"
|
||||
if(disk)
|
||||
if(disk.record)
|
||||
//Replay
|
||||
dat += "<a href='?src=[REF(src)];replay_start=1'>Replay disk recording.</a><br>"
|
||||
//Clear
|
||||
dat += "<a href='?src=[REF(src)];record_clear=1'>Clear disk recording.</a><br>"
|
||||
else
|
||||
//Record
|
||||
dat += "<a href='?src=[REF(src)];record_start=1'>Start new recording.</a><br>"
|
||||
//Eject
|
||||
dat += "<a href='?src=[REF(src)];disk_eject=1'>Eject disk.</a><br>"
|
||||
|
||||
if(LAZYLEN(holo_calls))
|
||||
dat += "=====================================================<br>"
|
||||
@@ -145,7 +186,7 @@ Possible to do for anyone motivated enough:
|
||||
dat += "<a href='?src=[REF(src)];disconnectcall=[REF(HC)]'>Disconnect call from [HC.user].</a><br>"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "holopad", name, 300, 130)
|
||||
var/datum/browser/popup = new(user, "holopad", name, 300, 150)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
@@ -215,6 +256,22 @@ Possible to do for anyone motivated enough:
|
||||
temp = ""
|
||||
if(outgoing_call)
|
||||
outgoing_call.Disconnect()
|
||||
|
||||
else if(href_list["disk_eject"])
|
||||
if(disk && !replay_mode)
|
||||
disk.forceMove(drop_location())
|
||||
disk = null
|
||||
|
||||
else if(href_list["replay_stop"])
|
||||
replay_stop()
|
||||
else if(href_list["replay_start"])
|
||||
replay_start()
|
||||
else if(href_list["record_start"])
|
||||
record_start(usr)
|
||||
else if(href_list["record_stop"])
|
||||
record_stop()
|
||||
else if(href_list["record_clear"])
|
||||
record_clear()
|
||||
|
||||
updateDialog()
|
||||
|
||||
@@ -269,6 +326,7 @@ Possible to do for anyone motivated enough:
|
||||
else
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
|
||||
|
||||
/obj/machinery/holopad/proc/activate_holo(mob/living/user)
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(!istype(AI))
|
||||
@@ -321,15 +379,24 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(outgoing_call && speaker == outgoing_call.user)
|
||||
outgoing_call.hologram.say(raw_message)
|
||||
|
||||
if(record_mode && speaker == record_user)
|
||||
record_message(speaker,raw_message,message_language)
|
||||
|
||||
/obj/machinery/holopad/proc/SetLightsAndPower()
|
||||
var/total_users = masters.len + LAZYLEN(holo_calls)
|
||||
use_power = total_users > 0 ? ACTIVE_POWER_USE : IDLE_POWER_USE
|
||||
active_power_usage = HOLOPAD_PASSIVE_POWER_USAGE + (HOLOGRAM_POWER_USAGE * total_users)
|
||||
if(total_users)
|
||||
if(total_users || replay_mode)
|
||||
set_light(2)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/holopad/update_icon()
|
||||
var/total_users = masters.len + LAZYLEN(holo_calls)
|
||||
if(total_users || replay_mode)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
icon_state = "holopad0"
|
||||
|
||||
/obj/machinery/holopad/proc/set_holo(mob/living/user, var/obj/effect/overlay/holo_pad_hologram/h)
|
||||
@@ -365,6 +432,128 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
clear_holo(user)
|
||||
return TRUE
|
||||
|
||||
// RECORDED MESSAGES
|
||||
|
||||
/obj/machinery/holopad/proc/setup_replay_holo(datum/holorecord/record)
|
||||
var/obj/effect/overlay/holo_pad_hologram/Hologram = new(loc)//Spawn a blank effect at the location.
|
||||
Hologram.add_overlay(record.caller_image)
|
||||
Hologram.alpha = 170
|
||||
Hologram.add_atom_colour("#77abff", FIXED_COLOUR_PRIORITY)
|
||||
Hologram.dir = SOUTH //for now
|
||||
Hologram.grant_all_languages(omnitongue=TRUE)
|
||||
var/datum/language_holder/holder = Hologram.get_language_holder()
|
||||
holder.selected_default_language = record.language
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.anchored = TRUE//So space wind cannot drag it.
|
||||
Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message("<span class='notice'>A holographic image of [record.caller_name] flickers to life before your eyes!</span>")
|
||||
return Hologram
|
||||
|
||||
/obj/machinery/holopad/proc/replay_start()
|
||||
if(!replay_mode)
|
||||
replay_mode = TRUE
|
||||
replay_holo = setup_replay_holo(disk.record)
|
||||
temp = "Replaying...<br>"
|
||||
temp += "<A href='?src=[REF(src)];replay_stop=1'>End replay.</A>"
|
||||
SetLightsAndPower()
|
||||
replay_entry(1)
|
||||
return
|
||||
|
||||
/obj/machinery/holopad/proc/replay_stop()
|
||||
if(replay_mode)
|
||||
replay_mode = FALSE
|
||||
temp = null
|
||||
QDEL_NULL(replay_holo)
|
||||
SetLightsAndPower()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/holopad/proc/record_start(mob/living/user)
|
||||
if(!user || !disk || disk.record)
|
||||
return
|
||||
disk.record = new
|
||||
record_mode = TRUE
|
||||
record_start = world.time
|
||||
record_user = user
|
||||
disk.record.caller_image = get_record_icon(user)
|
||||
temp = "Recording...<br>"
|
||||
temp += "<A href='?src=[REF(src)];record_stop=1'>End recording.</A>"
|
||||
|
||||
/obj/machinery/holopad/proc/get_record_icon(mob/living/user)
|
||||
var/olddir = user.dir
|
||||
user.setDir(SOUTH)
|
||||
. = getFlatIcon(user)
|
||||
user.setDir(olddir)
|
||||
|
||||
/obj/machinery/holopad/proc/record_message(mob/living/speaker,message,language)
|
||||
if(!record_mode)
|
||||
return
|
||||
//make this command so you can have multiple languages in single record
|
||||
if(!disk.record.caller_name && istype(speaker))
|
||||
disk.record.caller_name = speaker.name
|
||||
if(!disk.record.language)
|
||||
disk.record.language = language
|
||||
else if(language != disk.record.language)
|
||||
disk.record.entries += list(list(HOLORECORD_LANGUAGE,language))
|
||||
|
||||
var/current_delay = 0
|
||||
for(var/E in disk.record.entries)
|
||||
var/list/entry = E
|
||||
if(entry[1] != HOLORECORD_DELAY)
|
||||
continue
|
||||
current_delay += entry[2]
|
||||
|
||||
var/time_delta = world.time - record_start - current_delay
|
||||
|
||||
if(time_delta >= 1)
|
||||
disk.record.entries += list(list(HOLORECORD_DELAY,time_delta))
|
||||
disk.record.entries += list(list(HOLORECORD_SAY,message))
|
||||
if(disk.record.entries.len >= HOLORECORD_MAX_LENGTH)
|
||||
record_stop()
|
||||
|
||||
/obj/machinery/holopad/proc/replay_entry(entry_number)
|
||||
if(!replay_mode)
|
||||
return
|
||||
if(disk.record.entries.len < entry_number)
|
||||
replay_stop()
|
||||
return
|
||||
var/list/entry = disk.record.entries[entry_number]
|
||||
var/command = entry[1]
|
||||
switch(command)
|
||||
if(HOLORECORD_SAY)
|
||||
var/message = entry[2]
|
||||
if(replay_holo)
|
||||
replay_holo.say(message)
|
||||
if(HOLORECORD_SOUND)
|
||||
playsound(src,entry[2],50,1)
|
||||
if(HOLORECORD_DELAY)
|
||||
addtimer(CALLBACK(src,.proc/replay_entry,entry_number+1),entry[2])
|
||||
return
|
||||
if(HOLORECORD_LANGUAGE)
|
||||
var/datum/language_holder/holder = replay_holo.get_language_holder()
|
||||
holder.selected_default_language = entry[2]
|
||||
if(HOLORECORD_PRESET)
|
||||
var/preset_type = entry[2]
|
||||
var/datum/preset_holoimage/H = new preset_type
|
||||
replay_holo.cut_overlays()
|
||||
replay_holo.add_overlay(H.build_image())
|
||||
if(HOLORECORD_RENAME)
|
||||
replay_holo.name = entry[2] + " (Hologram)"
|
||||
.(entry_number+1)
|
||||
|
||||
/obj/machinery/holopad/proc/record_stop()
|
||||
if(record_mode)
|
||||
record_mode = FALSE
|
||||
temp = null
|
||||
record_user = null
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/holopad/proc/record_clear()
|
||||
if(disk && disk.record)
|
||||
QDEL_NULL(disk.record)
|
||||
updateDialog()
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram
|
||||
var/mob/living/Impersonation
|
||||
var/datum/holocall/HC
|
||||
|
||||
@@ -242,15 +242,17 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity<max_integrity)
|
||||
if (WT.remove_fuel(0,user))
|
||||
if(WT.remove_fuel(1, user))
|
||||
if (internal_damage & MECHA_INT_TANK_BREACH)
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>")
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>", "<span class='notice'>You repair some damage to [src].</span>")
|
||||
obj_integrity += min(10, max_integrity-obj_integrity)
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
to_chat(user, "<span class='warning'>[WT] needs to be on for this task!</span>")
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
|
||||
|
||||
@@ -57,7 +57,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/armour_penetration = 0 //percentage of armour effectiveness to remove
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden_uplink = null
|
||||
var/equip_delay_self = 0 //In deciseconds, how long an item takes to equip; counts only for normal clothing slots, not pockets etc.
|
||||
var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person
|
||||
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
|
||||
@@ -224,9 +223,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
/obj/item/interact(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.interact(user)
|
||||
return 1
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/ui_act(action, params)
|
||||
|
||||
@@ -545,6 +545,7 @@
|
||||
H.set_heartattack(FALSE)
|
||||
H.revive()
|
||||
H.emote("gasp")
|
||||
H.Jitter(100)
|
||||
if(tplus > tloss)
|
||||
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
|
||||
add_logs(user, H, "revived", defib)
|
||||
|
||||
@@ -155,15 +155,17 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
|
||||
/obj/item/device/pda/attack_self(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/pda)
|
||||
assets.send(user)
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.interact(user)
|
||||
return
|
||||
|
||||
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}a img{padding-right: 9px;}</style>"
|
||||
|
||||
|
||||
@@ -496,7 +498,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if("Ringtone")
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if(in_range(src, U) && loc == U && t)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(U)
|
||||
to_chat(U, "The PDA softly beeps.")
|
||||
U << browse(null, "window=pda")
|
||||
@@ -822,8 +826,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/obj/item/photo/P = C
|
||||
photo = P.img
|
||||
to_chat(user, "<span class='notice'>You scan \the [C].</span>")
|
||||
else if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.attackby(C, user, params)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/obj/item/cartridge/virus/message_header()
|
||||
return "<b>[charges] viral files left.</b><HR>"
|
||||
|
||||
|
||||
/obj/item/cartridge/virus/message_special(obj/item/device/pda/target)
|
||||
if (!istype(loc, /obj/item/device/pda))
|
||||
return "" //Sanity check, this shouldn't be possible.
|
||||
@@ -67,11 +67,12 @@
|
||||
var/difficulty = 0
|
||||
if(target.cartridge)
|
||||
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
if(!target.detonatable || prob(difficulty * 15) || (target.hidden_uplink))
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
|
||||
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
|
||||
else
|
||||
U.show_message("<span class='notice'>Success!</span>", 1)
|
||||
@@ -92,14 +93,14 @@
|
||||
charges--
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
if(!target.hidden_uplink)
|
||||
var/obj/item/device/uplink/uplink = new(target)
|
||||
target.hidden_uplink = uplink
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!hidden_uplink)
|
||||
hidden_uplink = target.LoadComponent(/datum/component/uplink)
|
||||
target.lock_code = lock_code
|
||||
else
|
||||
target.hidden_uplink.hidden_crystals += target.hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
|
||||
target.hidden_uplink.telecrystals = telecrystals
|
||||
hidden_uplink.hidden_crystals += hidden_uplink.telecrystals //Temporarially hide the PDA's crystals, so you can't steal telecrystals.
|
||||
hidden_uplink.telecrystals = telecrystals
|
||||
telecrystals = 0
|
||||
target.hidden_uplink.active = TRUE
|
||||
hidden_uplink.active = TRUE
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
|
||||
@@ -155,7 +155,9 @@
|
||||
if(.)
|
||||
frequency = sanitize_frequency(tune, freerange)
|
||||
set_frequency(frequency)
|
||||
if(frequency == traitor_frequency && hidden_uplink)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && (frequency == traitor_frequency))
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(usr)
|
||||
ui.close()
|
||||
if("listen")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
// A collection of pre-set uplinks, for admin spawns.
|
||||
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||
|
||||
/obj/item/device/radio/uplink/nuclear/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
|
||||
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
|
||||
|
||||
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink)
|
||||
traitor_unlock_degrees = 360
|
||||
|
||||
/obj/item/device/radio/uplink/old
|
||||
name = "dusty radio"
|
||||
desc = "A dusty looking radio."
|
||||
|
||||
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
|
||||
. = ..()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
hidden_uplink.name = "dusty radio"
|
||||
@@ -1,42 +1,48 @@
|
||||
/obj/item/implant/uplink
|
||||
name = "uplink implant"
|
||||
desc = "Sneeki breeki."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
|
||||
var/starting_tc = 0
|
||||
|
||||
/obj/item/implant/uplink/New()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.telecrystals = starting_tc
|
||||
..()
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/imp_e = X
|
||||
imp_e.hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
if(..())
|
||||
hidden_uplink.owner = "[user.key]"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/implant/uplink/activate()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.interact(usr)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
imp_type = /obj/item/implant/uplink
|
||||
|
||||
/obj/item/implanter/uplink/precharged
|
||||
name = "implanter (precharged uplink)"
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
/obj/item/implant/uplink
|
||||
name = "uplink implant"
|
||||
desc = "Sneeki breeki."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
var/starting_tc = 0
|
||||
|
||||
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/imp_e = X
|
||||
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
|
||||
if(their_hidden_uplink)
|
||||
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
qdel(imp_e) //INFERIOR AND EMPTY!
|
||||
|
||||
if(..())
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.owner = "[user.key]"
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implant/uplink/activate()
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.interact(usr)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
imp_type = /obj/item/implant/uplink
|
||||
|
||||
/obj/item/implanter/uplink/precharged
|
||||
name = "implanter (precharged uplink)"
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
|
||||
@@ -9,13 +9,91 @@
|
||||
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
|
||||
var/stuffed = TRUE //If the plushie has stuffing in it
|
||||
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
|
||||
//--love ~<3--
|
||||
gender = NEUTER
|
||||
var/obj/item/toy/plush/lover
|
||||
var/obj/item/toy/plush/partner
|
||||
var/obj/item/toy/plush/plush_child
|
||||
var/obj/item/toy/plush/paternal_parent //who initiated creation
|
||||
var/obj/item/toy/plush/maternal_parent //who owns, see love()
|
||||
var/list/scorned = list() //who the plush hates
|
||||
var/list/scorned_by = list() //who hates the plush, to remove external references on Destroy()
|
||||
var/heartbroken = FALSE
|
||||
var/vowbroken = FALSE
|
||||
var/young = FALSE
|
||||
var/mood_message
|
||||
var/list/love_message
|
||||
var/list/partner_message
|
||||
var/list/heartbroken_message
|
||||
var/list/vowbroken_message
|
||||
var/list/parent_message
|
||||
var/normal_desc
|
||||
//--end of love :'(--
|
||||
|
||||
/obj/item/toy/plush/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, squeak_override)
|
||||
|
||||
//have we decided if Pinocchio goes in the blue or pink aisle yet?
|
||||
if(gender == NEUTER)
|
||||
if(prob(50))
|
||||
gender = FEMALE
|
||||
else
|
||||
gender = MALE
|
||||
|
||||
love_message = list("\n[src] is so happy, \he could rip a seam!")
|
||||
partner_message = list("\n[src] has a ring on \his finger! It says bound to my dear [partner].")
|
||||
heartbroken_message = list("\n[src] looks so sad.")
|
||||
vowbroken_message = list("\n[src] lost \his ring...")
|
||||
parent_message = list("\n[src] can't remember what sleep is.")
|
||||
|
||||
normal_desc = desc
|
||||
|
||||
/obj/item/toy/plush/Destroy()
|
||||
QDEL_NULL(grenade)
|
||||
|
||||
//inform next of kin and... acquaintances
|
||||
if(partner)
|
||||
partner.bad_news(src)
|
||||
partner = null
|
||||
lover = null
|
||||
else if(lover)
|
||||
lover.bad_news(src)
|
||||
lover = null
|
||||
|
||||
if(paternal_parent)
|
||||
paternal_parent.bad_news(src)
|
||||
paternal_parent = null
|
||||
|
||||
if(maternal_parent)
|
||||
maternal_parent.bad_news(src)
|
||||
maternal_parent = null
|
||||
|
||||
if(plush_child)
|
||||
plush_child.bad_news(src)
|
||||
plush_child = null
|
||||
|
||||
var/i
|
||||
var/obj/item/toy/plush/P
|
||||
for(i=1, i<=scorned.len, i++)
|
||||
P = scorned[i]
|
||||
P.bad_news(src)
|
||||
scorned = null
|
||||
|
||||
for(i=1, i<=scorned_by.len, i++)
|
||||
P = scorned_by[i]
|
||||
P.bad_news(src)
|
||||
scorned_by = null
|
||||
|
||||
//null remaining lists
|
||||
squeak_override = null
|
||||
|
||||
love_message = null
|
||||
partner_message = null
|
||||
heartbroken_message = null
|
||||
vowbroken_message = null
|
||||
parent_message = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/handle_atom_del(atom/A)
|
||||
@@ -66,8 +144,221 @@
|
||||
var/turf/T = get_turf(user)
|
||||
log_game("[key_name(user)] added a grenade ([I.name]) to [src] at [COORD(T)].")
|
||||
return
|
||||
if(istype(I, /obj/item/toy/plush))
|
||||
love(I, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plush/proc/love(obj/item/toy/plush/Kisser, mob/living/user) //~<3
|
||||
var/chance = 100 //to steal a kiss, surely there's a 100% chance no-one would reject a plush such as I?
|
||||
var/concern = 20 //perhaps something might cloud true love with doubt
|
||||
var/loyalty = 30 //why should another get between us?
|
||||
var/duty = 50 //conquering another's is what I live for
|
||||
|
||||
//we are not catholic
|
||||
if(young == TRUE || Kisser.young == TRUE)
|
||||
user.show_message("<span class='notice'>[src] plays tag with [Kisser].</span>", 1,
|
||||
"<span class='notice'>They're happy.</span>", 0)
|
||||
Kisser.cheer_up()
|
||||
cheer_up()
|
||||
|
||||
//never again
|
||||
else if(Kisser in scorned)
|
||||
//message, visible, alternate message, neither visible nor audible
|
||||
user.show_message("<span class='notice'>[src] rejects the advances of [Kisser]!</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked.</span>", 0)
|
||||
else if(src in Kisser.scorned)
|
||||
user.show_message("<span class='notice'>[Kisser] realises who [src] is and turns away.</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked.</span>", 0)
|
||||
|
||||
//first comes love
|
||||
else if(Kisser.lover != src && Kisser.partner != src) //cannot be lovers or married
|
||||
if(Kisser.lover) //if the initiator has a lover
|
||||
Kisser.lover.heartbreak(Kisser) //the old lover can get over the kiss-and-run whilst the kisser has some fun
|
||||
chance -= concern //one heart already broken, what does another mean?
|
||||
if(lover) //if the recipient has a lover
|
||||
chance -= loyalty //mustn't... but those lips
|
||||
if(partner) //if the recipient has a partner
|
||||
chance -= duty //do we mate for life?
|
||||
|
||||
if(prob(chance)) //did we bag a date?
|
||||
user.visible_message("<span class='notice'>[user] makes [Kisser] kiss [src]!</span>",
|
||||
"<span class='notice'>You make [Kisser] kiss [src]!</span>")
|
||||
if(lover) //who cares for the past, we live in the present
|
||||
lover.heartbreak(src)
|
||||
new_lover(Kisser)
|
||||
Kisser.new_lover(src)
|
||||
else
|
||||
user.show_message("<span class='notice'>[src] rejects the advances of [Kisser], maybe next time?</span>", 1,
|
||||
"<span class='notice'>That didn't feel like it worked, this time.</span>", 0)
|
||||
|
||||
//then comes marriage
|
||||
else if(Kisser.lover == src && Kisser.partner != src) //need to be lovers (assumes loving is a two way street) but not married (also assumes similar)
|
||||
user.visible_message("<span class='notice'>[user] pronounces [Kisser] and [src] married! D'aw.</span>",
|
||||
"<span class='notice'>You pronounce [Kisser] and [src] married!</span>")
|
||||
new_partner(Kisser)
|
||||
Kisser.new_partner(src)
|
||||
|
||||
//then comes a baby in a baby's carriage, or an adoption in an adoption's orphanage
|
||||
else if(Kisser.partner == src && !plush_child) //the one advancing does not take ownership of the child and we have a one child policy in the toyshop
|
||||
user.visible_message("<span class='notice'>[user] is going to break [Kisser] and [src] by bashing them like that.</span>",
|
||||
"<span class='notice'>[Kisser] passionately embraces [src] in your hands. Look away you perv!</span>")
|
||||
plop(Kisser)
|
||||
user.visible_message("<span class='notice'>Something drops at the feet of [user].</span>",
|
||||
"<span class='notice'>The miracle of oh god did that just come out of [src]?!</span>")
|
||||
|
||||
//then comes protection, or abstinence if we are catholic
|
||||
else if(Kisser.partner == src && plush_child)
|
||||
user.visible_message("<span class='notice'>[user] makes [Kisser] nuzzle [src]!</span>",
|
||||
"<span class='notice'>You make [Kisser] nuzzle [src]!</span>")
|
||||
|
||||
//then oh fuck something unexpected happened
|
||||
else
|
||||
user.show_message("<span class='warning'>[Kisser] and [src] don't know what to do with one another.</span>", 0)
|
||||
|
||||
/obj/item/toy/plush/proc/heartbreak(obj/item/toy/plush/Brutus)
|
||||
if(lover != Brutus)
|
||||
to_chat(world, "lover != Brutus")
|
||||
return //why are we considering someone we don't love?
|
||||
|
||||
scorned.Add(Brutus)
|
||||
Brutus.scorned_by(src)
|
||||
|
||||
lover = null
|
||||
Brutus.lover = null //feeling's mutual
|
||||
|
||||
heartbroken = TRUE
|
||||
mood_message = pick(heartbroken_message)
|
||||
|
||||
if(partner == Brutus) //oh dear...
|
||||
partner = null
|
||||
Brutus.partner = null //it'd be weird otherwise
|
||||
vowbroken = TRUE
|
||||
mood_message = pick(vowbroken_message)
|
||||
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/scorned_by(obj/item/toy/plush/Outmoded)
|
||||
scorned_by.Add(Outmoded)
|
||||
|
||||
/obj/item/toy/plush/proc/new_lover(obj/item/toy/plush/Juliet)
|
||||
if(lover == Juliet)
|
||||
return //nice try
|
||||
lover = Juliet
|
||||
|
||||
cheer_up()
|
||||
lover.cheer_up()
|
||||
|
||||
mood_message = pick(love_message)
|
||||
update_desc()
|
||||
|
||||
if(partner) //who?
|
||||
partner = null //more like who cares
|
||||
|
||||
/obj/item/toy/plush/proc/new_partner(obj/item/toy/plush/Apple_of_my_eye)
|
||||
if(partner == Apple_of_my_eye)
|
||||
return //double marriage is just insecurity
|
||||
if(lover != Apple_of_my_eye)
|
||||
return //union not born out of love will falter
|
||||
|
||||
partner = Apple_of_my_eye
|
||||
|
||||
heal_memories()
|
||||
partner.heal_memories()
|
||||
|
||||
mood_message = pick(partner_message)
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/plop(obj/item/toy/plush/Daddy)
|
||||
if(partner != Daddy)
|
||||
return //we do not have bastards in our toyshop
|
||||
|
||||
if(prob(50)) //it has my eyes
|
||||
plush_child = new type(get_turf(loc))
|
||||
else //it has your eyes
|
||||
plush_child = new Daddy.type(get_turf(loc))
|
||||
|
||||
plush_child.make_young(src, Daddy)
|
||||
|
||||
/obj/item/toy/plush/proc/make_young(obj/item/toy/plush/Mama, obj/item/toy/plush/Dada)
|
||||
if(Mama == Dada)
|
||||
return //cloning is reserved for plants and spacemen
|
||||
|
||||
maternal_parent = Mama
|
||||
paternal_parent = Dada
|
||||
young = TRUE
|
||||
name = "[Mama] Jr" //Icelandic naming convention pending
|
||||
normal_desc = "[src] is a little baby of [maternal_parent] and [paternal_parent]!" //original desc won't be used so the child can have moods
|
||||
update_desc()
|
||||
|
||||
Mama.mood_message = pick(Mama.parent_message)
|
||||
Mama.update_desc()
|
||||
Dada.mood_message = pick(Dada.parent_message)
|
||||
Dada.update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/bad_news(obj/item/toy/plush/Deceased) //cotton to cotton, sawdust to sawdust
|
||||
var/is_that_letter_for_me = FALSE
|
||||
if(partner == Deceased) //covers marriage
|
||||
is_that_letter_for_me = TRUE
|
||||
partner = null
|
||||
lover = null
|
||||
else if(lover == Deceased) //covers lovers
|
||||
is_that_letter_for_me = TRUE
|
||||
lover = null
|
||||
|
||||
//covers children
|
||||
if(maternal_parent == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
maternal_parent = null
|
||||
|
||||
if(paternal_parent == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
paternal_parent = null
|
||||
|
||||
//covers parents
|
||||
if(plush_child == Deceased)
|
||||
is_that_letter_for_me = TRUE
|
||||
plush_child = null
|
||||
|
||||
//covers bad memories
|
||||
if(Deceased in scorned)
|
||||
scorned.Remove(Deceased)
|
||||
cheer_up() //what cold button eyes you have
|
||||
|
||||
if(Deceased in scorned_by)
|
||||
scorned_by.Remove(Deceased)
|
||||
|
||||
//all references to the departed should be cleaned up by now
|
||||
|
||||
if(is_that_letter_for_me)
|
||||
heartbroken = TRUE
|
||||
mood_message = pick(heartbroken_message)
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/cheer_up() //it'll be all right
|
||||
if(!heartbroken)
|
||||
return //you cannot make smile what is already
|
||||
if(vowbroken)
|
||||
return //it's a pretty big deal
|
||||
|
||||
heartbroken = !heartbroken
|
||||
|
||||
if(mood_message in heartbroken_message)
|
||||
mood_message = null
|
||||
update_desc()
|
||||
|
||||
/obj/item/toy/plush/proc/heal_memories() //time fixes all wounds
|
||||
if(!vowbroken)
|
||||
vowbroken = !vowbroken
|
||||
if(mood_message in vowbroken_message)
|
||||
mood_message = null
|
||||
cheer_up()
|
||||
|
||||
/obj/item/toy/plush/proc/update_desc()
|
||||
desc = normal_desc
|
||||
if(mood_message)
|
||||
desc += mood_message
|
||||
|
||||
/obj/item/toy/plush/carpplushie
|
||||
name = "space carp plushie"
|
||||
desc = "An adorable stuffed toy that resembles a space carp."
|
||||
@@ -88,6 +379,7 @@
|
||||
desc = "An adorable plushie of the clockwork justiciar himself with new and improved spring arm action."
|
||||
icon_state = "plushvar"
|
||||
var/obj/item/toy/plush/narplush/clash_target
|
||||
gender = MALE //he's a boy, right?
|
||||
|
||||
/obj/item/toy/plush/plushvar/Moved()
|
||||
. = ..()
|
||||
@@ -173,6 +465,7 @@
|
||||
desc = "A small stuffed doll of the elder god nar'sie. Who thought this was a good children's toy?"
|
||||
icon_state = "narplush"
|
||||
var/clashing
|
||||
gender = FEMALE //it's canon if the toy is
|
||||
|
||||
/obj/item/toy/plush/narplush/Moved()
|
||||
. = ..()
|
||||
@@ -198,7 +491,7 @@
|
||||
|
||||
/obj/item/toy/plush/nukeplushie
|
||||
name = "operative plushie"
|
||||
desc = "An stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
||||
desc = "A stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
||||
icon_state = "plushie_nuke"
|
||||
item_state = "plushie_nuke"
|
||||
attack_verb = list("shot", "nuked", "detonated")
|
||||
@@ -210,4 +503,5 @@
|
||||
icon_state = "plushie_slime"
|
||||
item_state = "plushie_slime"
|
||||
attack_verb = list("blorbled", "slimed", "absorbed")
|
||||
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|
||||
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|
||||
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
|
||||
|
||||
@@ -13,18 +13,16 @@
|
||||
if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
|
||||
for(var/obj/item/implant/uplink/I in target)
|
||||
if(I && I.imp_in)
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I)
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(isitem(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into [I] and charge its internal uplink.</span>")
|
||||
else if(istype(I, /obj/item/cartridge/virus/frame))
|
||||
if(istype(I, /obj/item/cartridge/virus/frame))
|
||||
var/obj/item/cartridge/virus/frame/cart = I
|
||||
if(!cart.charges)
|
||||
to_chat(user, "<span class='notice'>[cart] is out of charges, it's refusing to accept [src].</span>")
|
||||
@@ -32,6 +30,8 @@
|
||||
cart.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into [cart]. The next time it's used, it will also give telecrystals.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/telecrystal/five
|
||||
amount = 5
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
icon_state = "pod_g"
|
||||
|
||||
/obj/structure/showcase/machinery/oldpod
|
||||
name = "damaged cyrogenic pod"
|
||||
desc = "A damaged cyrogenic pod long since lost to time, including its former occupant..."
|
||||
name = "damaged cryogenic pod"
|
||||
desc = "A damaged cryogenic pod long since lost to time, including its former occupant..."
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper-open"
|
||||
|
||||
/obj/structure/showcase/machinery/oldpod/used
|
||||
name = "opened cyrogenic pod"
|
||||
desc = "Cyrogenic pod that has recently discharged its occupand. The pod appears non-functional."
|
||||
name = "opened cryogenic pod"
|
||||
desc = "A cryogenic pod that has recently discharged its occupant. The pod appears non-functional."
|
||||
|
||||
/obj/structure/showcase/cyborg/old
|
||||
name = "Cyborg Statue"
|
||||
|
||||
@@ -177,8 +177,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn()
|
||||
atmos_spawn_air("plasma=400;TEMP=1000")
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn(exposed_temperature)
|
||||
atmos_spawn_air("plasma=[oreAmount*10];TEMP=[exposed_temperature]")
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE)
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE)
|
||||
if(isarea(source))
|
||||
throw EXCEPTION("playsound(): source is an area")
|
||||
return
|
||||
@@ -11,7 +11,10 @@
|
||||
// Looping through the player list has the added bonus of working for mobs inside containers
|
||||
var/sound/S = sound(get_sfx(soundin))
|
||||
var/maxdistance = (world.view + extrarange) * 3
|
||||
for(var/P in GLOB.player_list)
|
||||
var/list/listeners = GLOB.player_list
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
|
||||
@@ -214,7 +214,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
if(heard_by_no_admins && usr && usr.ckey != initiator_ckey)
|
||||
heard_by_no_admins = FALSE
|
||||
send2irc(initiator_ckey, "Ticket #[id]: Answered by [key_name(usr)]")
|
||||
_interactions += "[gameTimestamp()]: [formatted_message]"
|
||||
_interactions += "[time_stamp()]: [formatted_message]"
|
||||
|
||||
//Removes the ahelp verb and returns it after 2 minutes
|
||||
/datum/admin_help/proc/TimeoutVerb()
|
||||
|
||||
@@ -218,15 +218,6 @@
|
||||
desc = "This wand uses healing magics to heal and revive. The years of the cold have weakened the magic inside the wand."
|
||||
max_charges = 5
|
||||
|
||||
/obj/item/device/radio/uplink/old
|
||||
name = "dusty radio"
|
||||
desc = "A dusty looking radio."
|
||||
|
||||
/obj/item/device/radio/uplink/old/Initialize()
|
||||
. = ..()
|
||||
hidden_uplink.name = "dusty radio"
|
||||
hidden_uplink.telecrystals = 10
|
||||
|
||||
/obj/effect/mob_spawn/human/syndicatesoldier/coldres
|
||||
name = "Syndicate Snow Operative"
|
||||
outfit = /datum/outfit/snowsyndie/corpse
|
||||
|
||||
@@ -196,10 +196,6 @@
|
||||
for(var/I in assembly_components)
|
||||
var/obj/item/integrated_circuit/IC = I
|
||||
IC.external_examine(user)
|
||||
if(istype(IC, /obj/item/integrated_circuit/output/screen))
|
||||
var/obj/item/integrated_circuit/output/screen/S
|
||||
if(S.stuff_to_display)
|
||||
to_chat(user, "There's a little screen labeled '[S]', which displays '[S.stuff_to_display]'.")
|
||||
if(opened)
|
||||
interact(user)
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
desc = "This somewhat complicated system allows one to slot in a gun, direct it towards a position, and remotely fire it."
|
||||
extended_desc = "The firing mechanism can slot in any energy weapon. \
|
||||
The first and second inputs need to be numbers. They are coordinates for the gun to fire at, relative to the machine itself. \
|
||||
The 'fire' activator will cause the mechanism to attempt to fire the weapon at the coordinates, if possible. Mode is switch between\
|
||||
letal(TRUE) or stun(FALSE) modes.It uses internal battery of weapon."
|
||||
The 'fire' activator will cause the mechanism to attempt to fire the weapon at the coordinates, if possible. Mode is switch between \
|
||||
lethal (TRUE) or stun (FALSE) modes.It uses internal battery of weapon."
|
||||
complexity = 20
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
size = 3
|
||||
@@ -302,15 +302,15 @@
|
||||
var/max_items = 10
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/grabber/do_work()
|
||||
var/turf/T = get_turf(src)
|
||||
var/atom/movable/acting_object = get_object()
|
||||
var/turf/T = get_turf(acting_object)
|
||||
var/obj/item/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/item)
|
||||
if(AM)
|
||||
var/turf/P = get_turf(AM)
|
||||
var/mode = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
if(mode == 1)
|
||||
if(P.Adjacent(T))
|
||||
if((contents.len < max_items) && AM && (AM.w_class <= max_w_class))
|
||||
if(AM.Adjacent(acting_object) && isturf(AM.loc))
|
||||
if((contents.len < max_items) && (!max_w_class || AM.w_class <= max_w_class))
|
||||
AM.forceMove(src)
|
||||
if(mode == 0)
|
||||
if(contents.len)
|
||||
@@ -372,11 +372,14 @@
|
||||
var/target_y_rel = round(get_pin_data(IC_INPUT, 2))
|
||||
var/obj/item/A = get_pin_data_as_type(IC_INPUT, 3, /obj/item)
|
||||
|
||||
if(!A || A.anchored || (A.w_class > max_w_class))
|
||||
if(!A || A.anchored || A.throwing)
|
||||
return
|
||||
|
||||
if(max_w_class && (A.w_class > max_w_class))
|
||||
return
|
||||
|
||||
var/atom/movable/acting_object = get_object()
|
||||
if(!A.Adjacent(acting_object) && !(A in acting_object.GetAllContents()))
|
||||
if(!(A.Adjacent(acting_object) && isturf(A.loc)) && !(A in acting_object.GetAllContents()))
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(acting_object)
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
stuff_to_display = null
|
||||
|
||||
/obj/item/integrated_circuit/output/screen/any_examine(mob/user)
|
||||
to_chat(user, "There is a little screen labeled '[name]', which displays [!isnull(stuff_to_display) ? "'[stuff_to_display]'" : "nothing"].")
|
||||
var/shown_label = ""
|
||||
if(displayed_name && displayed_name != name)
|
||||
shown_label = " labeled '[displayed_name]'"
|
||||
|
||||
to_chat(user, "There is \a [src][shown_label], which displays [!isnull(stuff_to_display) ? "'[stuff_to_display]'" : "nothing"].")
|
||||
|
||||
/obj/item/integrated_circuit/output/screen/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
/mob/living/brain/lingcheck()
|
||||
return 0
|
||||
return LINGHIVE_NONE
|
||||
|
||||
/mob/living/brain/treat_message(message)
|
||||
message = capitalize(message)
|
||||
|
||||
@@ -453,9 +453,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
|
||||
if(!(H.disabilities & HUSK))
|
||||
if(HD && !(H.disabilities & HUSK))
|
||||
// lipstick
|
||||
if(H.lip_style && (LIPS in species_traits) && HD)
|
||||
if(H.lip_style && (LIPS in species_traits))
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
|
||||
lip_overlay.color = H.lip_color
|
||||
if(OFFSET_FACE in H.dna.species.offset_features)
|
||||
@@ -464,13 +464,18 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
standing += lip_overlay
|
||||
|
||||
// eyes
|
||||
if((EYECOLOR in species_traits) && HD)
|
||||
var/mutable_appearance/eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes", -BODY_LAYER)
|
||||
var/has_eyes = H.getorganslot(ORGAN_SLOT_EYES)
|
||||
var/mutable_appearance/eye_overlay
|
||||
if(!has_eyes)
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes_missing", -BODY_LAYER)
|
||||
else
|
||||
eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes", -BODY_LAYER)
|
||||
if((EYECOLOR in species_traits) && has_eyes)
|
||||
eye_overlay.color = "#" + H.eye_color
|
||||
if(OFFSET_FACE in H.dna.species.offset_features)
|
||||
eye_overlay.pixel_x += H.dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += H.dna.species.offset_features[OFFSET_FACE][2]
|
||||
standing += eye_overlay
|
||||
if(OFFSET_FACE in H.dna.species.offset_features)
|
||||
eye_overlay.pixel_x += H.dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += H.dna.species.offset_features[OFFSET_FACE][2]
|
||||
standing += eye_overlay
|
||||
|
||||
//Underwear, Undershirts & Socks
|
||||
if(!(NO_UNDERWEAR in species_traits))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
id = "abductor"
|
||||
say_mod = "gibbers"
|
||||
sexes = FALSE
|
||||
species_traits = list(NOBLOOD,NOBREATH,VIRUSIMMUNE,NOGUNS,NOHUNGER)
|
||||
species_traits = list(SPECIES_ORGANIC,NOBLOOD,NOBREATH,VIRUSIMMUNE,NOGUNS,NOHUNGER)
|
||||
mutanttongue = /obj/item/organ/tongue/abductor
|
||||
var/scientist = FALSE // vars to not pollute spieces list with castes
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Android"
|
||||
id = "android"
|
||||
say_mod = "states"
|
||||
species_traits = list(NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOBLOOD,VIRUSIMMUNE,PIERCEIMMUNE,NOHUNGER,EASYLIMBATTACHMENT)
|
||||
species_traits = list(SPECIES_ROBOTIC,NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOBLOOD,PIERCEIMMUNE,NOHUNGER,EASYLIMBATTACHMENT)
|
||||
meat = null
|
||||
damage_overlay_type = "synth"
|
||||
mutanttongue = /obj/item/organ/tongue/robot
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Angel"
|
||||
id = "angel"
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
species_traits = list(SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
mutant_bodyparts = list("tail_human", "ears", "wings")
|
||||
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "Angel")
|
||||
use_skintones = 1
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
attack_sound = 'sound/weapons/resonator_blast.ogg'
|
||||
blacklisted = 1
|
||||
use_skintones = 0
|
||||
species_traits = list(RADIMMUNE,VIRUSIMMUNE,NOBLOOD,PIERCEIMMUNE,EYECOLOR,NODISMEMBER,NOHUNGER)
|
||||
sexes = 0
|
||||
species_traits = list(SPECIES_ORGANIC,RADIMMUNE,VIRUSIMMUNE,NOBLOOD,PIERCEIMMUNE,EYECOLOR,NODISMEMBER,NOHUNGER)
|
||||
sexes = 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "dullahan"
|
||||
id = "dullahan"
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOBREATH,NOHUNGER)
|
||||
species_traits = list(SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS,NOBREATH,NOHUNGER)
|
||||
mutant_bodyparts = list("tail_human", "ears", "wings")
|
||||
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None")
|
||||
use_skintones = TRUE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Flyperson"
|
||||
id = "fly"
|
||||
say_mod = "buzzes"
|
||||
species_traits = list(SPECIES_ORGANIC)
|
||||
mutanttongue = /obj/item/organ/tongue/fly
|
||||
mutantliver = /obj/item/organ/liver/fly
|
||||
mutantstomach = /obj/item/organ/stomach/fly
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Mammal"
|
||||
id = "mammal"
|
||||
default_color = "4B4B4B"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "snout", "taur")
|
||||
default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "body_markings" = "None", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "None", "taur" = "None")
|
||||
attack_verb = "claw"
|
||||
@@ -24,7 +24,7 @@
|
||||
id = "avian"
|
||||
say_mod = "chirps"
|
||||
default_color = "BCAC9B"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("snout", "wings", "taur", "mam_tail", "mam_body_markings", "taur")
|
||||
default_features = list("snout" = "Sharp", "wings" = "None", "taur" = "None", "mam_body_markings" = "Hawk")
|
||||
attack_verb = "peck"
|
||||
@@ -45,7 +45,7 @@
|
||||
name = "Aquatic"
|
||||
id = "aquatic"
|
||||
default_color = "BCAC9B"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("mam_tail", "mam_body_markings", "mam_ears", "taur")
|
||||
default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF","mam_tail" = "shark", "mam_body_markings" = "None", "mam_ears" = "None")
|
||||
attack_verb = "bite"
|
||||
@@ -66,7 +66,7 @@
|
||||
name = "Insect"
|
||||
id = "insect"
|
||||
default_color = "BCAC9B"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("mam_body_markings", "mam_ears", "mam_tail", "taur")
|
||||
default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_body_markings" = "moth", "mam_tail" = "None", "mam_ears" = "None")
|
||||
attack_verb = "flutter" //wat?
|
||||
@@ -90,7 +90,7 @@
|
||||
id = "xeno"
|
||||
say_mod = "hisses"
|
||||
default_color = "00FF00"
|
||||
species_traits = list(MUTCOLORS,LIPS,DIGITIGRADE,PIERCEIMMUNE)
|
||||
species_traits = list(MUTCOLORS,LIPS,DIGITIGRADE,PIERCEIMMUNE,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("xenotail", "xenohead", "xenodorsal", "taur","mam_body_markings")
|
||||
default_features = list("xenotail"="xeno","xenohead"="standard","xenodorsal"="standard","mcolor" = "0F0","mcolor2" = "0F0","mcolor3" = "0F0","taur" = "None","mam_body_markings" = "xeno")
|
||||
heatmod = 1.3
|
||||
@@ -220,7 +220,7 @@
|
||||
name = "DataShark"
|
||||
id = "datashark"
|
||||
default_color = "BCAC9B"
|
||||
species_traits = list(MUTCOLORS_PARTSONLY,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS_PARTSONLY,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("mam_tail", "mam_body_markings")
|
||||
default_features = list("mam_tail" = "datashark", "mam_body_markings" = "None")
|
||||
attack_verb = "bite"
|
||||
@@ -234,7 +234,7 @@
|
||||
name = "Guilmon"
|
||||
id = "guilmon"
|
||||
default_color = "4B4B4B"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR)
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings")
|
||||
default_features = list("mcolor" = "FFF", "mcolor2" = "FFF", "mcolor3" = "FFF", "mam_tail" = "guilmon", "mam_ears" = "guilmon", "mam_body_markings" = "guilmon")
|
||||
attack_verb = "claw"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Animated beings of stone. They have increased defenses, and do not need to breathe. They're also slow as fuuuck.
|
||||
name = "Golem"
|
||||
id = "iron golem"
|
||||
species_traits = list(NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
species_traits = list(SPECIES_INORGANIC,NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
mutant_organs = list(/obj/item/organ/adamantine_resonator)
|
||||
speedmod = 2
|
||||
armor = 55
|
||||
@@ -76,7 +76,7 @@
|
||||
fixed_mut_color = "a3d"
|
||||
meat = /obj/item/ore/plasma
|
||||
//Can burn and takes damage from heat
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
species_traits = list(SPECIES_INORGANIC,NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
info_text = "As a <span class='danger'>Plasma Golem</span>, you burn easily. Be careful, if you get hot enough while burning, you'll blow up!"
|
||||
heatmod = 0 //fine until they blow up
|
||||
prefix = "Plasma"
|
||||
@@ -242,7 +242,7 @@
|
||||
fixed_mut_color = "49311c"
|
||||
meat = /obj/item/stack/sheet/mineral/wood
|
||||
//Can burn and take damage from heat
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
species_traits = list(SPECIES_ORGANIC,NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
|
||||
armor = 30
|
||||
burnmod = 1.25
|
||||
heatmod = 1.5
|
||||
@@ -549,7 +549,7 @@
|
||||
limbs_id = "cultgolem"
|
||||
sexes = FALSE
|
||||
info_text = "As a <span class='danger'>Runic Golem</span>, you possess eldritch powers granted by the Elder God Nar'Sie."
|
||||
species_traits = list(NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR) //no mutcolors
|
||||
species_traits = list(SPECIES_INORGANIC,NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOFIRE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR) //no mutcolors
|
||||
prefix = "Runic"
|
||||
|
||||
var/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift/golem/phase_shift
|
||||
@@ -602,7 +602,7 @@
|
||||
limbs_id = "clockgolem"
|
||||
info_text = "<span class='bold alloy'>As a </span><span class='bold brass'>clockwork golem</span><span class='bold alloy'>, you are faster than \
|
||||
other types of golem (being a machine), and are immune to electric shocks.</span>"
|
||||
species_traits = list(NO_UNDERWEAR, NOTRANSSTING, NOBREATH, NOZOMBIE, VIRUSIMMUNE, RADIMMUNE, NOBLOOD, RESISTCOLD, RESISTPRESSURE, PIERCEIMMUNE)
|
||||
species_traits = list(SPECIES_INORGANIC,NO_UNDERWEAR, NOTRANSSTING, NOBREATH, NOZOMBIE, RADIMMUNE, NOBLOOD, RESISTCOLD, RESISTPRESSURE, PIERCEIMMUNE)
|
||||
armor = 20 //Reinforced, but much less so to allow for fast movement
|
||||
attack_verb = "smash"
|
||||
attack_sound = 'sound/magic/clockwork/anima_fragment_attack.ogg'
|
||||
@@ -653,7 +653,7 @@
|
||||
limbs_id = "clothgolem"
|
||||
sexes = FALSE
|
||||
info_text = "As a <span class='danger'>Cloth Golem</span>, you are able to reform yourself after death, provided your remains aren't burned or destroyed. You are, of course, very flammable."
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR) //no mutcolors, and can burn
|
||||
species_traits = list(SPECIES_UNDEAD,NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR) //no mutcolors, and can burn
|
||||
armor = 15 //feels no pain, but not too resistant
|
||||
burnmod = 2 // don't get burned
|
||||
speedmod = 1 // not as heavy as stone
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
name = "Human"
|
||||
id = "human"
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(MUTCOLORS_PARTSONLY,EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
mutant_bodyparts = list("tail_human", "ears", "taur")
|
||||
default_features = list("tail_human" = "None", "ears" = "None", "taur" = "none")
|
||||
species_traits = list(MUTCOLORS_PARTSONLY,SPECIES_ORGANIC,EYECOLOR,HAIR,FACEHAIR,LIPS)
|
||||
mutant_bodyparts = list("tail_human", "ears", "wings", "taur")
|
||||
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None", "taur" = "none")
|
||||
use_skintones = 1
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/human
|
||||
disliked_food = GROSS | RAW
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
id = "jelly"
|
||||
default_color = "00FF90"
|
||||
say_mod = "chirps"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER)
|
||||
species_traits = list(SPECIES_ORGANIC,MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER)
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime
|
||||
exotic_blood = "slimejelly"
|
||||
damage_overlay_type = ""
|
||||
@@ -101,7 +101,7 @@
|
||||
name = "Slimeperson"
|
||||
id = "slime"
|
||||
default_color = "00FFFF"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD,VIRUSIMMUNE, TOXINLOVER)
|
||||
species_traits = list(SPECIES_ORGANIC,MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD,VIRUSIMMUNE, TOXINLOVER)
|
||||
say_mod = "says"
|
||||
hair_color = "mutcolor"
|
||||
hair_alpha = 150
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
id = "lizard"
|
||||
say_mod = "hisses"
|
||||
default_color = "00FF00"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,FACEHAIR)
|
||||
species_traits = list(SPECIES_ORGANIC,MUTCOLORS,EYECOLOR,LIPS, HAIR, FACEHAIR)
|
||||
mutant_bodyparts = list("tail_lizard", "snout", "spines", "horns", "frills", "body_markings", "legs", "taur")
|
||||
mutanttongue = /obj/item/organ/tongue/lizard
|
||||
mutanttail = /obj/item/organ/tail/lizard
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
say_mod = "rattles"
|
||||
sexes = 0
|
||||
meat = /obj/item/stack/sheet/mineral/plasma
|
||||
species_traits = list(NOBLOOD,RESISTCOLD,RADIMMUNE,NOTRANSSTING,VIRUSIMMUNE,NOHUNGER)
|
||||
species_traits = list(SPECIES_INORGANIC,NOBLOOD,RESISTCOLD,RADIMMUNE,NOTRANSSTING,NOHUNGER)
|
||||
mutantlungs = /obj/item/organ/lungs/plasmaman
|
||||
mutanttongue = /obj/item/organ/tongue/bone/plasmaman
|
||||
mutantliver = /obj/item/organ/liver/plasmaman
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "Podperson"
|
||||
id = "pod"
|
||||
default_color = "59CE00"
|
||||
species_traits = list(MUTCOLORS,EYECOLOR)
|
||||
species_traits = list(SPECIES_ORGANIC,MUTCOLORS,EYECOLOR)
|
||||
attack_verb = "slash"
|
||||
attack_sound = 'sound/weapons/slice.ogg'
|
||||
miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
blacklisted = 1
|
||||
ignored_by = list(/mob/living/simple_animal/hostile/faithless)
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/shadow
|
||||
species_traits = list(NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE)
|
||||
species_traits = list(SPECIES_ORGANIC,NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE)
|
||||
|
||||
dangerous_existence = 1
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
blacklisted = 1
|
||||
sexes = 0
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton
|
||||
species_traits = list(NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NOHUNGER,EASYDISMEMBER,EASYLIMBATTACHMENT)
|
||||
species_traits = list(SPECIES_UNDEAD,NOBREATH,RESISTHOT,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NOHUNGER,EASYDISMEMBER,EASYLIMBATTACHMENT)
|
||||
mutanttongue = /obj/item/organ/tongue/bone
|
||||
damage_overlay_type = ""//let's not show bloody wounds or burns over bones.
|
||||
disliked_food = NONE
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
id = "synth"
|
||||
say_mod = "beep boops" //inherited from a user's real species
|
||||
sexes = 0
|
||||
species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER) //all of these + whatever we inherit from the real species
|
||||
species_traits = list(SPECIES_ROBOTIC,NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER) //all of these + whatever we inherit from the real species
|
||||
dangerous_existence = 1
|
||||
blacklisted = 1
|
||||
meat = null
|
||||
damage_overlay_type = "synth"
|
||||
limbs_id = "synth"
|
||||
var/list/initial_species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER,NO_DNA_COPY) //for getting these values back for assume_disguise()
|
||||
var/list/initial_species_traits = list(SPECIES_ROBOTIC,NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER,NO_DNA_COPY) //for getting these values back for assume_disguise()
|
||||
var/disguise_fail_health = 75 //When their health gets to this level their synthflesh partially falls off
|
||||
var/datum/species/fake_species = null //a species to do most of our work for us, unless we're damaged
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
say_mod = S.say_mod
|
||||
sexes = S.sexes
|
||||
species_traits = initial_species_traits.Copy()
|
||||
species_traits.Add(S.species_traits)
|
||||
species_traits |= S.species_traits
|
||||
species_traits -= list(SPECIES_ORGANIC, SPECIES_INORGANIC, SPECIES_UNDEAD)
|
||||
attack_verb = S.attack_verb
|
||||
attack_sound = S.attack_sound
|
||||
miss_sound = S.miss_sound
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "vampire"
|
||||
id = "vampire"
|
||||
default_color = "FFFFFF"
|
||||
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOHUNGER,NOBREATH,DRINKSBLOOD)
|
||||
species_traits = list(SPECIES_UNDEAD,EYECOLOR,HAIR,FACEHAIR,LIPS,NOHUNGER,NOBREATH,DRINKSBLOOD)
|
||||
mutant_bodyparts = list("tail_human", "ears", "wings")
|
||||
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None")
|
||||
exotic_bloodtype = "U"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
sexes = 0
|
||||
blacklisted = 1
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/zombie
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,NOZOMBIE,EASYDISMEMBER,EASYLIMBATTACHMENT,NOTRANSSTING)
|
||||
species_traits = list(SPECIES_UNDEAD,NOBREATH,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,NOZOMBIE,EASYDISMEMBER,EASYLIMBATTACHMENT,NOTRANSSTING)
|
||||
mutanttongue = /obj/item/organ/tongue/zombie
|
||||
var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg')
|
||||
disliked_food = NONE
|
||||
@@ -73,6 +73,7 @@
|
||||
id = "goofzombies"
|
||||
limbs_id = "zombie" //They look like zombies
|
||||
sexes = 0
|
||||
species_traits = list(SPECIES_ORGANIC)
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/zombie
|
||||
mutanttongue = /obj/item/organ/tongue/zombie
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
if(prob(D.infectivity))
|
||||
D.spread()
|
||||
|
||||
if(stat != DEAD)
|
||||
if(stat != DEAD && !D.process_dead)
|
||||
D.stage_act()
|
||||
|
||||
//todo generalize this and move hud out
|
||||
|
||||
@@ -1016,4 +1016,15 @@
|
||||
|
||||
/mob/living/proc/add_abilities_to_panel()
|
||||
for(var/obj/effect/proc_holder/A in abilities)
|
||||
statpanel("[A.panel]",A.get_panel_text(),A)
|
||||
statpanel("[A.panel]",A.get_panel_text(),A)
|
||||
|
||||
/mob/living/lingcheck()
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling)
|
||||
if(changeling.changeling_speak)
|
||||
return LINGHIVE_LING
|
||||
return LINGHIVE_OUTSIDER
|
||||
if(mind && mind.linglink)
|
||||
return LINGHIVE_LINK
|
||||
return LINGHIVE_NONE
|
||||
|
||||
@@ -72,6 +72,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE)
|
||||
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/key = get_key(message)
|
||||
|
||||
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE)
|
||||
|
||||
@@ -134,8 +135,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
// AIs use inherent channels for the holopad. Most inherent channels
|
||||
// ignore the language argument however.
|
||||
|
||||
if(handle_inherent_channels(message, message_mode, language)) //Hiveminds, binary chat & holopad.
|
||||
return
|
||||
var/datum/saymode/SM = SSradio.saymodes[key]
|
||||
if(key && SM)
|
||||
if(!SM.handle_message(src, message, language))
|
||||
return
|
||||
|
||||
|
||||
if(!can_speak_vocal(message))
|
||||
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
|
||||
@@ -264,7 +268,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30)
|
||||
|
||||
/mob/proc/binarycheck()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/can_speak(message) //For use outside of Say()
|
||||
if(can_speak_basic(message) && can_speak_vocal(message))
|
||||
@@ -307,6 +311,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
var/key_symbol = lowertext(copytext(message, 2, 3))
|
||||
return GLOB.department_radio_keys[key_symbol]
|
||||
|
||||
/mob/living/proc/get_key(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key in GLOB.department_radio_prefixes)
|
||||
return lowertext(copytext(message, 2, 3))
|
||||
|
||||
/mob/living/proc/get_message_language(message)
|
||||
if(copytext(message, 1, 2) == ",")
|
||||
var/key = copytext(message, 2, 3)
|
||||
@@ -316,60 +325,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return LD
|
||||
return null
|
||||
|
||||
/mob/living/proc/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_CHANGELING)
|
||||
switch(lingcheck())
|
||||
if(3)
|
||||
var/msg = "<i><font color=#800040><b>[src.mind]:</b> [message]</font></i>"
|
||||
for(var/_M in GLOB.mob_list)
|
||||
var/mob/M = _M
|
||||
if(M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
to_chat(M, "[link] [msg]")
|
||||
else
|
||||
switch(M.lingcheck())
|
||||
if(3)
|
||||
to_chat(M, msg)
|
||||
if(2)
|
||||
to_chat(M, msg)
|
||||
if(1)
|
||||
if(prob(40))
|
||||
to_chat(M, "<i><font color=#800080>We can faintly sense an outsider trying to communicate through the hivemind...</font></i>")
|
||||
if(2)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
var/msg = "<i><font color=#800080><b>[changeling.changelingID]:</b> [message]</font></i>"
|
||||
log_talk(src,"[changeling.changelingID]/[key] : [message]",LOGSAY)
|
||||
for(var/_M in GLOB.mob_list)
|
||||
var/mob/M = _M
|
||||
if(M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
to_chat(M, "[link] [msg]")
|
||||
else
|
||||
switch(M.lingcheck())
|
||||
if(3)
|
||||
to_chat(M, msg)
|
||||
if(2)
|
||||
to_chat(M, msg)
|
||||
if(1)
|
||||
if(prob(40))
|
||||
to_chat(M, "<i><font color=#800080>We can faintly sense another of our kind trying to communicate through the hivemind...</font></i>")
|
||||
if(1)
|
||||
to_chat(src, "<i><font color=#800080>Our senses have not evolved enough to be able to communicate this way...</font></i>")
|
||||
return TRUE
|
||||
if(message_mode == MODE_ALIEN)
|
||||
if(hivecheck())
|
||||
alien_talk(message)
|
||||
return TRUE
|
||||
if(message_mode == MODE_VOCALCORDS)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE)
|
||||
if(V && V.can_speak_with())
|
||||
V.handle_speech(message) //message
|
||||
V.speak_with(message) //action
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/treat_message(message)
|
||||
if(getBrainLoss() >= 60)
|
||||
message = derpspeech(message, stuttering)
|
||||
@@ -408,22 +363,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_BINARY)
|
||||
if(binarycheck())
|
||||
robot_talk(message)
|
||||
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
|
||||
return 0
|
||||
|
||||
/mob/living/lingcheck() //1 is ling w/ no hivemind. 2 is ling w/hivemind. 3 is ling victim being linked into hivemind.
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling)
|
||||
if(changeling.changeling_speak)
|
||||
return 2
|
||||
return 1
|
||||
if(mind && mind.linglink)
|
||||
return 3
|
||||
return 0
|
||||
|
||||
/mob/living/say_mod(input, message_mode)
|
||||
if(message_mode == MODE_WHISPER)
|
||||
. = verb_whisper
|
||||
|
||||
@@ -31,15 +31,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/handle_inherent_channels(message, message_mode, language)
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
if(message_mode == MODE_HOLOPAD)
|
||||
holopad_talk(message, language)
|
||||
return 1
|
||||
|
||||
//For holopads only. Usable by AI.
|
||||
/mob/living/silicon/ai/proc/holopad_talk(message, language)
|
||||
|
||||
|
||||
@@ -57,14 +57,3 @@
|
||||
return MODE_ROBOT
|
||||
else
|
||||
return .
|
||||
|
||||
/mob/living/silicon/handle_inherent_channels(message, message_mode)
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
if(message_mode == MODE_BINARY)
|
||||
if(binarycheck())
|
||||
robot_talk(message)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Initialize()
|
||||
. = ..()
|
||||
internal_storage.hidden_uplink.telecrystals = 10
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage)
|
||||
hidden_uplink.telecrystals = 10
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Login()
|
||||
..()
|
||||
@@ -47,7 +48,8 @@
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/badass/Initialize()
|
||||
. = ..()
|
||||
internal_storage.hidden_uplink.telecrystals = 30
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage)
|
||||
hidden_uplink.telecrystals = 30
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src)
|
||||
W.implant(src)
|
||||
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
/////////////
|
||||
//Drone speach
|
||||
|
||||
/mob/living/simple_animal/drone/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
drone_chat(message)
|
||||
return 1
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/mob/living/simple_animal/hostile/creature
|
||||
name = "creature"
|
||||
desc = "A sanity-destroying otherthing."
|
||||
icon_state = "otherthing"
|
||||
icon_living = "otherthing"
|
||||
icon_dead = "otherthing-dead"
|
||||
health = 80
|
||||
maxHealth = 80
|
||||
obj_damage = 100
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 50
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = list("creature")
|
||||
speak_emote = list("screams")
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
/mob/living/simple_animal/hostile/creature
|
||||
name = "creature"
|
||||
desc = "A sanity-destroying otherthing."
|
||||
icon_state = "otherthing"
|
||||
icon_living = "otherthing"
|
||||
icon_dead = "otherthing-dead"
|
||||
health = 80
|
||||
maxHealth = 80
|
||||
obj_damage = 100
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 50
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = list("creature")
|
||||
speak_emote = list("screams")
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/mob/proc/whisper(message, datum/language/language=null)
|
||||
say(message, language) //only living mobs actually whisper, everything else just talks
|
||||
|
||||
/mob/verb/me_verb(message as message)
|
||||
/mob/verb/me_verb(message as text)
|
||||
set name = "Me"
|
||||
set category = "IC"
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
var/list/replace_chars = list("\n"=" ","\t"=" ")
|
||||
message = copytext(sanitize(message, replace_chars), 1, (MAX_MESSAGE_LEN*2))
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
usr.emote("me",1,message)
|
||||
|
||||
@@ -80,4 +79,4 @@
|
||||
return 0
|
||||
|
||||
/mob/proc/lingcheck()
|
||||
return 0
|
||||
return LINGHIVE_NONE
|
||||
|
||||
@@ -99,19 +99,13 @@
|
||||
if(deg && (deg > 0 && deg <= 360))
|
||||
degrees = deg
|
||||
to_chat(user, "<span class='notice'>You rotate the top of the pen to [degrees] degrees.</span>")
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && degrees == traitor_unlock_degrees)
|
||||
to_chat(user, "<span class='warning'>Your pen makes a clicking noise, before quickly rotating back to 0 degrees!</span>")
|
||||
degrees = 0
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(user)
|
||||
|
||||
|
||||
/obj/item/pen/attackby(obj/item/I, mob/user, params)
|
||||
if(hidden_uplink)
|
||||
return hidden_uplink.attackby(I, user, params)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/pen/attack(mob/living/M, mob/user,stealth)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
var/auto_name = 0
|
||||
var/failure_timer = 0
|
||||
var/force_update = 0
|
||||
var/emergency_lights = FALSE
|
||||
var/update_state = -1
|
||||
var/update_overlay = -1
|
||||
var/icon_update_needed = FALSE
|
||||
@@ -760,6 +761,7 @@
|
||||
"coverLocked" = coverlocked,
|
||||
"siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console(),
|
||||
"malfStatus" = get_malf_status(user),
|
||||
"emergencyLights" = !emergency_lights,
|
||||
|
||||
"powerChannels" = list(
|
||||
list(
|
||||
@@ -899,6 +901,14 @@
|
||||
failure_timer = 0
|
||||
update_icon()
|
||||
update()
|
||||
if("emergency_lighting")
|
||||
emergency_lights = !emergency_lights
|
||||
for(var/area/A in area.related)
|
||||
for(var/obj/machinery/light/L in A)
|
||||
if(!initial(L.no_emergency)) //If there was an override set on creation, keep that override
|
||||
L.no_emergency = emergency_lights
|
||||
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
|
||||
CHECK_TICK
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/apc/proc/toggle_breaker()
|
||||
|
||||
@@ -343,3 +343,17 @@
|
||||
|
||||
/obj/item/stock_parts/cell/beam_rifle/emp_act(severity)
|
||||
charge = Clamp((charge-(10000/severity)),0,maxcharge)
|
||||
|
||||
/obj/item/stock_parts/cell/emergency_light
|
||||
name = "miniature power cell"
|
||||
desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage."
|
||||
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
|
||||
materials = list(MAT_GLASS = 20)
|
||||
rating = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/stock_parts/cell/emergency_light/Initialize()
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(!A.lightswitch || !A.light_power)
|
||||
charge = 0 //For naturally depowered areas, we start with no power
|
||||
|
||||
@@ -49,12 +49,22 @@
|
||||
var/fixture_type = "tube"
|
||||
var/sheets_refunded = 2
|
||||
var/obj/machinery/light/newlight = null
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
|
||||
/obj/structure/light_construct/New(loc, ndir, building)
|
||||
..()
|
||||
var/cell_connectors = TRUE
|
||||
|
||||
/obj/structure/light_construct/Initialize(mapload, ndir, building)
|
||||
. = ..()
|
||||
if(building)
|
||||
setDir(ndir)
|
||||
|
||||
/obj/structure/light_construct/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/structure/light_construct/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/structure/light_construct/examine(mob/user)
|
||||
..()
|
||||
switch(src.stage)
|
||||
@@ -64,9 +74,38 @@
|
||||
to_chat(user, "It's wired.")
|
||||
if(3)
|
||||
to_chat(user, "The casing is closed.")
|
||||
if(cell_connectors)
|
||||
if(cell)
|
||||
to_chat(user, "You see [cell] inside the casing.")
|
||||
else
|
||||
to_chat(user, "The casing has no power cell for backup power.")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>This casing doesn't support power cells for backup power.</span>")
|
||||
return
|
||||
|
||||
/obj/structure/light_construct/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(!cell_connectors)
|
||||
to_chat(user, "<span class='warning'>This [name] can't support a power cell!</span>")
|
||||
return
|
||||
if(W.flags_1 & NODROP_1)
|
||||
to_chat(user, "<span class='warning'>[W] is stuck to your hand!</span>")
|
||||
return
|
||||
user.dropItemToGround(W)
|
||||
if(cell)
|
||||
user.visible_message("<span class='notice'>[user] swaps [W] out for [src]'s cell.</span>", \
|
||||
"<span class='notice'>You swap [src]'s power cells.</span>")
|
||||
cell.forceMove(drop_location())
|
||||
user.put_in_hands(cell)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] hooks up [W] to [src].</span>", \
|
||||
"<span class='notice'>You add [W] to [src].</span>")
|
||||
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
||||
W.forceMove(src)
|
||||
cell = W
|
||||
add_fingerprint(user)
|
||||
return
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
@@ -124,6 +163,10 @@
|
||||
newlight = new /obj/machinery/light/small/built(loc)
|
||||
newlight.setDir(dir)
|
||||
transfer_fingerprints_to(newlight)
|
||||
if(cell)
|
||||
newlight.cell = cell
|
||||
cell.forceMove(newlight)
|
||||
cell = null
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
@@ -173,6 +216,11 @@
|
||||
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/start_with_cell = TRUE // if true, this fixture generates a very weak cell at roundstart
|
||||
var/emergency_mode = FALSE // if true, the light is in emergency mode
|
||||
var/no_emergency = FALSE // if true, this light cannot ever have an emergency mode
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
@@ -192,8 +240,10 @@
|
||||
|
||||
/obj/machinery/light/built
|
||||
icon_state = "tube-empty"
|
||||
start_with_cell = FALSE
|
||||
|
||||
/obj/machinery/light/built/New()
|
||||
/obj/machinery/light/built/Initialize()
|
||||
. = ..()
|
||||
status = LIGHT_EMPTY
|
||||
update(0)
|
||||
..()
|
||||
@@ -208,8 +258,10 @@
|
||||
|
||||
|
||||
// create a new lighting fixture
|
||||
/obj/machinery/light/New()
|
||||
..()
|
||||
/obj/machinery/light/Initialize()
|
||||
. = ..()
|
||||
if(start_with_cell && !no_emergency)
|
||||
cell = new/obj/item/stock_parts/cell/emergency_light(src)
|
||||
spawn(2)
|
||||
switch(fitting)
|
||||
if("tube")
|
||||
@@ -228,13 +280,17 @@
|
||||
if(A)
|
||||
on = FALSE
|
||||
// A.update_lights()
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
icon_state = "[base_state][on]"
|
||||
if(emergency_mode)
|
||||
icon_state = "[base_state]_emergency"
|
||||
else
|
||||
icon_state = "[base_state][on]"
|
||||
if(LIGHT_EMPTY)
|
||||
icon_state = "[base_state]-empty"
|
||||
on = FALSE
|
||||
@@ -249,7 +305,7 @@
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
/obj/machinery/light/proc/update(trigger = 1)
|
||||
|
||||
update_icon()
|
||||
emergency_mode = FALSE
|
||||
if(on)
|
||||
if(!light || light.light_range != brightness)
|
||||
switchcount++
|
||||
@@ -261,10 +317,14 @@
|
||||
burn_out()
|
||||
else
|
||||
use_power = ACTIVE_POWER_USE
|
||||
set_light(brightness)
|
||||
set_light(brightness, 1, "#FFFFFF")
|
||||
else if(has_emergency_power() && !turned_off())
|
||||
use_power = IDLE_POWER_USE
|
||||
emergency_mode = TRUE
|
||||
else
|
||||
use_power = IDLE_POWER_USE
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
active_power_usage = (brightness * 10)
|
||||
if(on != on_gs)
|
||||
@@ -276,6 +336,12 @@
|
||||
removeStaticPower(static_power_used, STATIC_LIGHT)
|
||||
|
||||
|
||||
/obj/machinery/light/process()
|
||||
if(has_power() && cell)
|
||||
cell.charge = min(cell.maxcharge, cell.charge + 0.2) //Recharge emergency power automatically while not using it
|
||||
if(emergency_mode && !use_emergency_power(0.2))
|
||||
update(FALSE) //Disables emergency mode and sets the color to normal
|
||||
|
||||
/obj/machinery/light/proc/burn_out()
|
||||
if(status == LIGHT_OK)
|
||||
status = LIGHT_BURNED
|
||||
@@ -289,6 +355,9 @@
|
||||
on = (s && status == LIGHT_OK)
|
||||
update()
|
||||
|
||||
/obj/machinery/light/get_cell()
|
||||
return cell
|
||||
|
||||
// examine verb
|
||||
/obj/machinery/light/examine(mob/user)
|
||||
..()
|
||||
@@ -301,6 +370,8 @@
|
||||
to_chat(user, "The [fitting] is burnt out.")
|
||||
if(LIGHT_BROKEN)
|
||||
to_chat(user, "The [fitting] has been smashed.")
|
||||
if(cell)
|
||||
to_chat(user, "Its backup power charge meter reads [(cell.charge / cell.maxcharge) * 100]%.")
|
||||
|
||||
|
||||
|
||||
@@ -384,6 +455,10 @@
|
||||
drop_light_tube()
|
||||
new /obj/item/stack/cable_coil(loc, 1, "red")
|
||||
transfer_fingerprints_to(newlight)
|
||||
if(cell)
|
||||
newlight.cell = cell
|
||||
cell.forceMove(newlight)
|
||||
cell = null
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/light/attacked_by(obj/item/I, mob/living/user)
|
||||
@@ -415,6 +490,11 @@
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
// returns if the light has power /but/ is manually turned off
|
||||
// if a light is turned off, it won't activate emergency power
|
||||
/obj/machinery/light/proc/turned_off()
|
||||
var/area/A = get_area(src)
|
||||
return !A.lightswitch && A.power_light
|
||||
|
||||
// returns whether this light has power
|
||||
// true if area has power and lightswitch is on
|
||||
@@ -422,6 +502,27 @@
|
||||
var/area/A = get_area(src)
|
||||
return A.lightswitch && A.power_light
|
||||
|
||||
// returns whether this light has emergency power
|
||||
// can also return if it has access to a certain amount of that power
|
||||
/obj/machinery/light/proc/has_emergency_power(pwr)
|
||||
if(no_emergency || !cell)
|
||||
return FALSE
|
||||
if(pwr ? cell.charge >= pwr : cell.charge)
|
||||
return status == LIGHT_OK
|
||||
|
||||
// attempts to use power from the installed emergency cell, returns true if it does and false if it doesn't
|
||||
/obj/machinery/light/proc/use_emergency_power(pwr = 0.2)
|
||||
if(!has_emergency_power(pwr))
|
||||
return FALSE
|
||||
if(cell.charge > 300) //it's meant to handle 120 W, ya doofus
|
||||
visible_message("<span class='warning'>[src] short-circuits from too powerful of a power cell!</span>")
|
||||
burn_out()
|
||||
return FALSE
|
||||
cell.use(pwr)
|
||||
set_light(brightness * 0.25, max(0.5, 0.75 * (cell.charge / cell.maxcharge)), "#FF3232") //RGB: 255, 50, 50
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||
set waitfor = 0
|
||||
if(flickering)
|
||||
@@ -441,7 +542,9 @@
|
||||
// ai attack - make lights flicker, because why not
|
||||
|
||||
/obj/machinery/light/attack_ai(mob/user)
|
||||
src.flicker(1)
|
||||
no_emergency = !no_emergency
|
||||
to_chat(user, "<span class='notice'>Emergency lights for this fixture have been [no_emergency ? "disabled" : "enabled"].</span>")
|
||||
update(FALSE)
|
||||
return
|
||||
|
||||
// attack with hand - remove tube/bulb
|
||||
|
||||
@@ -344,10 +344,10 @@
|
||||
/obj/machinery/computer/turbine_computer/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["working"] = (compressor.starter && compressor && compressor.turbine && !compressor.stat && !compressor.turbine.stat)
|
||||
data["connected"] = (compressor && compressor.turbine) ? TRUE : FALSE
|
||||
data["compressor_broke"] = (!compressor || compressor.stat) ? TRUE : FALSE
|
||||
data["turbine_broke"] = (!compressor || compressor.turbine.stat) ? TRUE : FALSE
|
||||
data["compressor_broke"] = (!compressor || (compressor.stat & BROKEN)) ? TRUE : FALSE
|
||||
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.stat & BROKEN)) ? TRUE : FALSE
|
||||
data["broken"] = (data["compressor_broke"] || data["turbine_broke"])
|
||||
data["online"] = compressor.starter
|
||||
|
||||
data["power"] = DisplayPower(compressor.turbine.lastgen)
|
||||
@@ -360,9 +360,13 @@
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("power")
|
||||
if("power-on")
|
||||
if(compressor && compressor.turbine)
|
||||
compressor.starter = !compressor.starter
|
||||
compressor.starter = TRUE
|
||||
. = TRUE
|
||||
if("power-off")
|
||||
if(compressor && compressor.turbine)
|
||||
compressor.starter = FALSE
|
||||
. = TRUE
|
||||
if("reconnect")
|
||||
locate_machinery()
|
||||
|
||||
@@ -799,3 +799,19 @@
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 200)
|
||||
build_path = /obj/item/device/slime_scanner
|
||||
category = list("initial", "Misc")
|
||||
|
||||
/datum/design/miniature_power_cell
|
||||
name = "Light Fixture Battery"
|
||||
id = "miniature_power_cell"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_GLASS = 20)
|
||||
build_path = /obj/item/stock_parts/cell/emergency_light
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/holodisk
|
||||
name = "Holodisk"
|
||||
id = "holodisk"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 1000)
|
||||
build_path = /obj/item/disk/holodisk
|
||||
category = list("initial", "Misc")
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
*
|
||||
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
||||
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
||||
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
||||
**/
|
||||
/obj/item/device/uplink
|
||||
name = "syndicate uplink"
|
||||
desc = "There is something wrong if you're examining this."
|
||||
var/active = FALSE
|
||||
var/lockable = TRUE
|
||||
var/telecrystals = 20
|
||||
var/selected_cat = null
|
||||
var/owner = null
|
||||
var/datum/game_mode/gamemode = null
|
||||
var/spent_telecrystals = 0
|
||||
var/purchase_log = ""
|
||||
var/list/uplink_items
|
||||
var/hidden_crystals = 0
|
||||
|
||||
/obj/item/device/uplink/Initialize()
|
||||
. = ..()
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
|
||||
/obj/item/device/uplink/proc/set_gamemode(gamemode)
|
||||
src.gamemode = gamemode
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
|
||||
/obj/item/device/uplink/Destroy()
|
||||
GLOB.uplinks -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/uplink/attackby(obj/item/I, mob/user, params)
|
||||
for(var/item in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/UI = item
|
||||
var/path = null
|
||||
if(initial(UI.refund_path))
|
||||
path = initial(UI.refund_path)
|
||||
else
|
||||
path = initial(UI.item)
|
||||
var/cost = 0
|
||||
if(initial(UI.refund_amount))
|
||||
cost = initial(UI.refund_amount)
|
||||
else
|
||||
cost = initial(UI.cost)
|
||||
var/refundable = initial(UI.refundable)
|
||||
if(I.type == path && refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
spent_telecrystals -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/uplink/interact(mob/user)
|
||||
active = TRUE
|
||||
if(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
/obj/item/device/uplink/ui_data(mob/user)
|
||||
if(!user.mind)
|
||||
return
|
||||
var/list/data = list()
|
||||
data["telecrystals"] = telecrystals
|
||||
data["lockable"] = lockable
|
||||
|
||||
data["categories"] = list()
|
||||
for(var/category in uplink_items)
|
||||
var/list/cat = list(
|
||||
"name" = category,
|
||||
"items" = (category == selected_cat ? list() : null))
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
data["categories"] += list(cat)
|
||||
return data
|
||||
|
||||
|
||||
/obj/item/device/uplink/ui_act(action, params)
|
||||
if(!active)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("buy")
|
||||
var/item = params["item"]
|
||||
|
||||
var/list/buyable_items = list()
|
||||
for(var/category in uplink_items)
|
||||
buyable_items += uplink_items[category]
|
||||
|
||||
if(item in buyable_items)
|
||||
var/datum/uplink_item/I = buyable_items[item]
|
||||
I.buy(usr, src)
|
||||
. = TRUE
|
||||
if("lock")
|
||||
active = FALSE
|
||||
telecrystals += hidden_crystals
|
||||
hidden_crystals = 0
|
||||
SStgui.close_uis(src)
|
||||
if("select")
|
||||
selected_cat = params["category"]
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/uplink/ui_host()
|
||||
return loc
|
||||
|
||||
// Refund certain items by hitting the uplink with it.
|
||||
/obj/item/device/radio/uplink/attackby(obj/item/I, mob/user, params)
|
||||
return hidden_uplink.attackby(I, user, params)
|
||||
|
||||
// A collection of pre-set uplinks, for admin spawns.
|
||||
/obj/item/device/radio/uplink/Initialize()
|
||||
. = ..()
|
||||
icon_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.active = TRUE
|
||||
hidden_uplink.lockable = FALSE
|
||||
|
||||
/obj/item/device/radio/uplink/nuclear/Initialize()
|
||||
. = ..()
|
||||
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
|
||||
/obj/item/device/multitool/uplink/Initialize()
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.active = TRUE
|
||||
hidden_uplink.lockable = FALSE
|
||||
|
||||
/obj/item/pen/uplink/Initialize()
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
traitor_unlock_degrees = 360
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "XDTM"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Added two new symptoms: one allows viruses to still work while dead, and allows infection of undead species, and one allows infection of inorganic species (such as plasmapeople or golems)."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "psykzz"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "Fixing the broken turbine computer"
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "CosmicScientist"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "You can make plushies kiss one another!"
|
||||
@@ -0,0 +1,5 @@
|
||||
author: "BeeSting12"
|
||||
delete-after: True
|
||||
changes:
|
||||
- spellcheck: "Occupand ---> Occupant on opened cryogenic pods."
|
||||
- spellcheck: "Cyrogenic ---> Cryogenic on opened cryogenic pods."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "zennerx"
|
||||
delete-after: True
|
||||
changes:
|
||||
- spellcheck: "fixed some typos in the weapon firing mechanism description"
|
||||
@@ -0,0 +1,5 @@
|
||||
author: "Xhuis"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Light fixtures now turn an ominous, dim red color when they lose power, and draw from an internal power cell to maintain it until either the cell dies (usually after 10 minutes) or power is restored."
|
||||
- rscadd: "You can override emergency light functionality from an APC. You can also click on individual lights as a cyborg or AI to override them individually. Traitor AIs also have a new ability that disables emergency lights across the entire station."
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user