mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-09 15:16:59 +00:00
Spooky Month Cleaning? Grep and stuff. (#4489)
* Painus * Yep * Moar * Let the agony begin * text.dm * scramble.dm * time.dm * fix * unsorted.dm * job_controller.dm * _legacy * computerfiles.dm * events.dm * global_iterator.dm * topic_input.dm * underwear.dm * uplink * periodic_news.dm again * areas * genes Also renamed midget to dwarfism as it's a slur. * changeling * Cult * gamemodes * machinery * mecha * effects * objects part 1 * Fine I'll commit the YAML * objects part 2 * moar * atmos * ooga * ahrde * You can tell my sanity is going down * Second-To-Last Step * Almost * Poggers * nvm we're not ready for that <.< * Test * minor
This commit is contained in:
@@ -3,6 +3,10 @@ environment = "citadel.dme"
|
||||
[langserver]
|
||||
dreamchecker = true
|
||||
|
||||
[code_standards]
|
||||
disallow_relative_type_definitions = true
|
||||
disallow_relative_proc_definitions = true
|
||||
|
||||
[dmdoc]
|
||||
use_typepath_names = true
|
||||
|
||||
|
||||
72
citadel.dme
72
citadel.dme
@@ -637,9 +637,7 @@
|
||||
#include "code\datums\wires\tesla_coil.dm"
|
||||
#include "code\datums\wires\vending.dm"
|
||||
#include "code\datums\wires\wires.dm"
|
||||
#include "code\defines\obj.dm"
|
||||
#include "code\defines\periodic_news.dm"
|
||||
#include "code\defines\obj\weapon.dm"
|
||||
#include "code\defines\procs\AStar.dm"
|
||||
#include "code\defines\procs\radio.dm"
|
||||
#include "code\defines\procs\sd_Alert.dm"
|
||||
@@ -708,8 +706,8 @@
|
||||
#include "code\game\dna\dna2_domutcheck.dm"
|
||||
#include "code\game\dna\dna2_helpers.dm"
|
||||
#include "code\game\dna\dna_modifier.dm"
|
||||
#include "code\game\dna\genes\_gene.dm"
|
||||
#include "code\game\dna\genes\disabilities.dm"
|
||||
#include "code\game\dna\genes\gene.dm"
|
||||
#include "code\game\dna\genes\powers.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -1148,16 +1146,17 @@
|
||||
#include "code\game\mecha\working\ripley_vr.dm"
|
||||
#include "code\game\mecha\working\working.dm"
|
||||
#include "code\game\objects\_items.dm"
|
||||
#include "code\game\objects\attacks.dm"
|
||||
#include "code\game\objects\banners.dm"
|
||||
#include "code\game\objects\empulse.dm"
|
||||
#include "code\game\objects\explosion.dm"
|
||||
#include "code\game\objects\explosion_recursive.dm"
|
||||
#include "code\game\objects\misc.dm"
|
||||
#include "code\game\objects\mob_spawner.dm"
|
||||
#include "code\game\objects\objs.dm"
|
||||
#include "code\game\objects\structures.dm"
|
||||
#include "code\game\objects\stumble_into_vr.dm"
|
||||
#include "code\game\objects\topic.dm"
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\donator_rewards\backpack.dm"
|
||||
#include "code\game\objects\donator_rewards\toys.dm"
|
||||
#include "code\game\objects\effects\_effect.dm"
|
||||
@@ -1241,6 +1240,34 @@
|
||||
#include "code\game\objects\items\toys.dm"
|
||||
#include "code\game\objects\items\trash.dm"
|
||||
#include "code\game\objects\items\upgradekit.dm"
|
||||
#include "code\game\objects\items\circuitboards\broken.dm"
|
||||
#include "code\game\objects\items\circuitboards\circuitboard.dm"
|
||||
#include "code\game\objects\items\circuitboards\circuitboards_vr.dm"
|
||||
#include "code\game\objects\items\circuitboards\frame.dm"
|
||||
#include "code\game\objects\items\circuitboards\mecha.dm"
|
||||
#include "code\game\objects\items\circuitboards\other.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\air_management.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\camera_monitor.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\computer.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\research.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\shuttle.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\supply.dm"
|
||||
#include "code\game\objects\items\circuitboards\computer\telecomms.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\biogenerator.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\cloning.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\engineering.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\jukebox.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\mech_recharger.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\mining_drill.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\pacman.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\papershredder.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\power.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\recharge_station.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\research.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\shieldgen.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\ships.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\telecomms.dm"
|
||||
#include "code\game\objects\items\circuitboards\machinery\unary_atmos.dm"
|
||||
#include "code\game\objects\items\devices\advnifrepair.dm"
|
||||
#include "code\game\objects\items\devices\ai_detector.dm"
|
||||
#include "code\game\objects\items\devices\aicard.dm"
|
||||
@@ -1296,6 +1323,10 @@
|
||||
#include "code\game\objects\items\devices\radio\intercom.dm"
|
||||
#include "code\game\objects\items\devices\radio\jammer.dm"
|
||||
#include "code\game\objects\items\devices\radio\radio.dm"
|
||||
#include "code\game\objects\items\id_cards\cards.dm"
|
||||
#include "code\game\objects\items\id_cards\sprite_stacks_cit.dm"
|
||||
#include "code\game\objects\items\id_cards\station_ids.dm"
|
||||
#include "code\game\objects\items\id_cards\syndicate_ids.dm"
|
||||
#include "code\game\objects\items\robot\robot_items.dm"
|
||||
#include "code\game\objects\items\robot\robot_parts.dm"
|
||||
#include "code\game\objects\items\robot\robot_upgrades.dm"
|
||||
@@ -1358,6 +1389,7 @@
|
||||
#include "code\game\objects\items\weapons\mop.dm"
|
||||
#include "code\game\objects\items\weapons\mop_deploy.dm"
|
||||
#include "code\game\objects\items\weapons\nullrod.dm"
|
||||
#include "code\game\objects\items\weapons\other.dm"
|
||||
#include "code\game\objects\items\weapons\paint.dm"
|
||||
#include "code\game\objects\items\weapons\paiwire.dm"
|
||||
#include "code\game\objects\items\weapons\RCD.dm"
|
||||
@@ -1375,34 +1407,6 @@
|
||||
#include "code\game\objects\items\weapons\trays.dm"
|
||||
#include "code\game\objects\items\weapons\weaponry.dm"
|
||||
#include "code\game\objects\items\weapons\weldbackpack.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\broken.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\circuitboard.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\circuitboards_vr.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\frame.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\mecha.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\other.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\air_management.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\camera_monitor.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\computer.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\shuttle.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\engineering.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\jukebox.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\mech_recharger.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\papershredder.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\ships.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\unary_atmos.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\anti_photon_grenade.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\chem_grenade.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\concussion.dm"
|
||||
@@ -1415,10 +1419,6 @@
|
||||
#include "code\game\objects\items\weapons\grenades\spawnergrenade.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\spawnergrenade_vr.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\supermatter.dm"
|
||||
#include "code\game\objects\items\weapons\id_cards\cards.dm"
|
||||
#include "code\game\objects\items\weapons\id_cards\sprite_stacks_cit.dm"
|
||||
#include "code\game\objects\items\weapons\id_cards\station_ids.dm"
|
||||
#include "code\game\objects\items\weapons\id_cards\syndicate_ids.dm"
|
||||
#include "code\game\objects\items\weapons\implants\implant.dm"
|
||||
#include "code\game\objects\items\weapons\implants\implantaugment.dm"
|
||||
#include "code\game\objects\items\weapons\implants\implantcase.dm"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/proc/dopage(src,target)
|
||||
/proc/dopage(src, target)
|
||||
var/href_list
|
||||
var/href
|
||||
href_list = params2list("src=\ref[src]&[target]=1")
|
||||
@@ -8,12 +8,12 @@
|
||||
src:Topic(href, href_list)
|
||||
return null
|
||||
|
||||
/proc/is_on_same_plane_or_station(var/z1, var/z2)
|
||||
if(z1 == z2)
|
||||
return 1
|
||||
if((z1 in GLOB.using_map.station_levels) && (z2 in GLOB.using_map.station_levels))
|
||||
return 1
|
||||
return 0
|
||||
/proc/is_on_same_plane_or_station(z1, z2)
|
||||
if (z1 == z2)
|
||||
return TRUE
|
||||
if ((z1 in GLOB.using_map.station_levels) && (z2 in GLOB.using_map.station_levels))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/proc/max_default_z_level()
|
||||
var/max_z = 0
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/proc/get_area(atom/A)
|
||||
RETURN_TYPE(/area)
|
||||
if(isarea(A))
|
||||
if (isarea(A))
|
||||
return A
|
||||
var/turf/T = get_turf(A)
|
||||
return T ? T.loc : null
|
||||
@@ -44,8 +44,10 @@
|
||||
return A
|
||||
|
||||
|
||||
/** Checks if any living humans are in a given area. */
|
||||
/proc/area_is_occupied(var/area/myarea)
|
||||
/**
|
||||
* Checks if any living humans are in a given area.
|
||||
*/
|
||||
/proc/area_is_occupied(area/myarea)
|
||||
// Testing suggests looping over human_mob_list is quicker than looping over area contents
|
||||
for(var/mob/living/carbon/human/H in human_mob_list)
|
||||
if(H.stat >= DEAD) //Conditions for exclusion here, like if disconnected people start blocking it.
|
||||
@@ -55,9 +57,8 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Like view but bypasses luminosity check
|
||||
|
||||
/proc/hear(var/range, var/atom/source)
|
||||
/// Like view but bypasses luminosity check.
|
||||
/proc/hear(range, atom/source)
|
||||
|
||||
var/lum = source.luminosity
|
||||
source.luminosity = 6
|
||||
@@ -92,22 +93,22 @@
|
||||
SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing, .)
|
||||
processing += A.contents
|
||||
|
||||
/proc/isStationLevel(var/level)
|
||||
/proc/isStationLevel(level)
|
||||
return level in GLOB.using_map.station_levels
|
||||
|
||||
/proc/isNotStationLevel(var/level)
|
||||
/proc/isNotStationLevel(level)
|
||||
return !isStationLevel(level)
|
||||
|
||||
/proc/isPlayerLevel(var/level)
|
||||
/proc/isPlayerLevel(level)
|
||||
return level in GLOB.using_map.player_levels
|
||||
|
||||
/proc/isAdminLevel(var/level)
|
||||
/proc/isAdminLevel(level)
|
||||
return level in GLOB.using_map.admin_levels
|
||||
|
||||
/proc/isNotAdminLevel(var/level)
|
||||
/proc/isNotAdminLevel(level)
|
||||
return !isAdminLevel(level)
|
||||
|
||||
/proc/circlerange(center=usr,radius=3)
|
||||
/proc/circlerange(center = usr, radius = 3)
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
var/list/turfs = new/list()
|
||||
@@ -122,7 +123,7 @@
|
||||
//turfs += centerturf
|
||||
return turfs
|
||||
|
||||
/proc/circleview(center=usr,radius=3)
|
||||
/proc/circleview(center = usr, radius = 3)
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
var/list/atoms = new/list()
|
||||
@@ -137,7 +138,8 @@
|
||||
//turfs += centerturf
|
||||
return atoms
|
||||
|
||||
/proc/trange(rad = 0, turf/centre = null) //alternative to range (ONLY processes turfs and thus less intensive)
|
||||
/// Alternative to range (ONLY processes turfs and thus less intensive).
|
||||
/proc/trange(rad = 0, turf/centre = null)
|
||||
if(!centre)
|
||||
return
|
||||
|
||||
@@ -145,7 +147,7 @@
|
||||
var/turf/x2y2 = locate(((centre.x+rad)>world.maxx ? world.maxx : centre.x+rad),((centre.y+rad)>world.maxy ? world.maxy : centre.y+rad),centre.z)
|
||||
return block(x1y1,x2y2)
|
||||
|
||||
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
|
||||
/proc/get_dist_euclidian(atom/Loc1, atom/Loc2)
|
||||
var/dx = Loc1.x - Loc2.x
|
||||
var/dy = Loc1.y - Loc2.y
|
||||
|
||||
@@ -153,7 +155,7 @@
|
||||
|
||||
return dist
|
||||
|
||||
/proc/circlerangeturfs(center=usr,radius=3)
|
||||
/proc/circlerangeturfs(center = usr, radius = 3)
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
var/list/turfs = new/list()
|
||||
@@ -166,7 +168,7 @@
|
||||
turfs += T
|
||||
return turfs
|
||||
|
||||
/proc/circleviewturfs(center=usr,radius=3) //Is there even a diffrence between this proc and circlerangeturfs()?
|
||||
/proc/circleviewturfs(center = usr, radius = 3) // Is there even a diffrence between this proc and circlerangeturfs()?
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
var/list/turfs = new/list()
|
||||
@@ -183,11 +185,12 @@
|
||||
|
||||
//var/debug_mob = 0
|
||||
|
||||
// Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents.
|
||||
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
|
||||
// being unable to hear people due to being in a box within a bag.
|
||||
|
||||
/proc/recursive_content_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_mobs = 1, var/include_objects = 1, var/ignore_show_messages = 0)
|
||||
/**
|
||||
* Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents.
|
||||
* It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
|
||||
* being unable to hear people due to being in a box within a bag.
|
||||
*/
|
||||
/proc/recursive_content_check(atom/O, list/L = list(), recursion_limit = 3, client_check = 1, sight_check = 1, include_mobs = 1, include_objects = 1, ignore_show_messages = 0)
|
||||
|
||||
if(!recursion_limit)
|
||||
return L
|
||||
@@ -215,9 +218,8 @@
|
||||
|
||||
return L
|
||||
|
||||
// Returns a list of mobs and/or objects in range of R from source. Used in radio and say code.
|
||||
|
||||
/proc/get_mobs_or_objects_in_view(var/R, var/atom/source, var/include_mobs = 1, var/include_objects = 1)
|
||||
/// Returns a list of mobs and/or objects in range of R from source. Used in radio and say code.
|
||||
/proc/get_mobs_or_objects_in_view(R, atom/source, include_mobs = 1, include_objects = 1)
|
||||
|
||||
var/turf/T = get_turf(source)
|
||||
var/list/hear = list()
|
||||
@@ -243,7 +245,7 @@
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios)
|
||||
/proc/get_mobs_in_radio_ranges(list/obj/item/radio/radios)
|
||||
|
||||
set background = 1
|
||||
|
||||
@@ -279,11 +281,13 @@
|
||||
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
|
||||
return .
|
||||
|
||||
//Uses dview to quickly return mobs and objects in view,
|
||||
// then adds additional mobs or objects if they are in range 'smartly',
|
||||
// based on their presence in lists of players or registered objects
|
||||
// Type: 1-audio, 2-visual, 0-neither
|
||||
/proc/get_mobs_and_objs_in_view_fast(var/turf/T, var/range, var/type = 1, var/remote_ghosts = TRUE)
|
||||
/**
|
||||
* Uses dview to quickly return mobs and objects in view,
|
||||
* then adds additional mobs or objects if they are in range 'smartly',
|
||||
* based on their presence in lists of players or registered objects
|
||||
* Type: 1-audio, 2-visual, 0-neither
|
||||
*/
|
||||
/proc/get_mobs_and_objs_in_view_fast(turf/T, range, type = 1, remote_ghosts = TRUE)
|
||||
var/list/mobs = list()
|
||||
var/list/objs = list()
|
||||
|
||||
@@ -325,36 +329,35 @@
|
||||
|
||||
return list("mobs" = mobs, "objs" = objs)
|
||||
|
||||
proc
|
||||
inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
|
||||
var/turf/T
|
||||
if(X1==X2)
|
||||
if(Y1==Y2)
|
||||
return 1 //Light cannot be blocked on same tile
|
||||
else
|
||||
var/s = SIGN(Y2-Y1)
|
||||
Y1+=s
|
||||
while(Y1!=Y2)
|
||||
T=locate(X1,Y1,Z)
|
||||
if(T.opacity)
|
||||
return 0
|
||||
Y1+=s
|
||||
/proc/inLineOfSight(X1, Y1, X2, Y2, Z=1, PX1=16.5, PY1=16.5, PX2=16.5, PY2=16.5)
|
||||
var/turf/T
|
||||
if(X1 == X2)
|
||||
if(Y1 == Y2)
|
||||
return TRUE //Light cannot be blocked on same tile
|
||||
else
|
||||
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
|
||||
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
|
||||
var/signX = SIGN(X2-X1)
|
||||
var/signY = SIGN(Y2-Y1)
|
||||
if(X1<X2)
|
||||
b+=m
|
||||
while(X1!=X2 || Y1!=Y2)
|
||||
if(round(m*X1+b-Y1))
|
||||
Y1+=signY //Line exits tile vertically
|
||||
else
|
||||
X1+=signX //Line exits tile horizontally
|
||||
T=locate(X1,Y1,Z)
|
||||
var/s = SIGN(Y2-Y1)
|
||||
Y1 += s
|
||||
while(Y1 != Y2)
|
||||
T = locate(X1, Y1, Z)
|
||||
if(T.opacity)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
Y1 += s
|
||||
else
|
||||
var/m = (32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
|
||||
var/b = (Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
|
||||
var/signX = SIGN(X2 - X1)
|
||||
var/signY = SIGN(Y2 - Y1)
|
||||
if(X1 < X2)
|
||||
b += m
|
||||
while(X1 != X2 || Y1 != Y2)
|
||||
if(round(m*X1+b-Y1))
|
||||
Y1 += signY //Line exits tile vertically
|
||||
else
|
||||
X1 += signX //Line exits tile horizontally
|
||||
T=locate(X1, Y1, Z)
|
||||
if(T.opacity)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/flick_overlay(image/I, list/show_to, duration, gc_after)
|
||||
for(var/client/C in show_to)
|
||||
@@ -365,7 +368,8 @@ proc
|
||||
for(var/client/C in show_to)
|
||||
C.images -= I
|
||||
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration, gc_after) //wrapper for the above, flicks to everyone who can see the target atom
|
||||
/// Wrapper for flick_overlay, flicks to everyone who can see the target atom.
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration, gc_after)
|
||||
var/list/viewing = list()
|
||||
for(var/m in viewers(target))
|
||||
var/mob/M = m
|
||||
@@ -373,20 +377,21 @@ proc
|
||||
viewing += M.client
|
||||
flick_overlay(I, viewing, duration, gc_after)
|
||||
|
||||
proc/isInSight(var/atom/A, var/atom/B)
|
||||
/proc/isInSight(atom/A, atom/B)
|
||||
var/turf/Aturf = get_turf(A)
|
||||
var/turf/Bturf = get_turf(B)
|
||||
|
||||
if(!Aturf || !Bturf)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z))
|
||||
return 1
|
||||
if(inLineOfSight(Aturf.x, Aturf.y, Bturf.x, Bturf.y, Aturf.z))
|
||||
return TRUE
|
||||
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
|
||||
/// Returns the position of a step from start away from finish, in one of the cardinal directions.
|
||||
/proc/get_cardinal_step_away(atom/start, atom/finish)
|
||||
//returns only NORTH, SOUTH, EAST, or WEST
|
||||
var/dx = finish.x - start.x
|
||||
var/dy = finish.y - start.y
|
||||
@@ -401,11 +406,11 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
else
|
||||
return get_step(start, EAST)
|
||||
|
||||
/proc/get_mob_by_key(var/key)
|
||||
/proc/get_mob_by_key(key)
|
||||
return GLOB.directory[ckey(key)]
|
||||
|
||||
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
|
||||
/proc/get_active_candidates(var/buffer = 1)
|
||||
/proc/get_active_candidates(buffer = 1)
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
var/i = 0
|
||||
@@ -450,7 +455,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
|
||||
datum/projectile_data
|
||||
/datum/projectile_data
|
||||
var/src_x
|
||||
var/src_y
|
||||
var/time
|
||||
@@ -460,8 +465,7 @@ datum/projectile_data
|
||||
var/dest_x
|
||||
var/dest_y
|
||||
|
||||
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
|
||||
var/power_x, var/power_y, var/dest_x, var/dest_y)
|
||||
/datum/projectile_data/New(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
|
||||
src.src_x = src_x
|
||||
src.src_y = src_y
|
||||
src.time = time
|
||||
@@ -471,7 +475,7 @@ datum/projectile_data
|
||||
src.dest_x = dest_x
|
||||
src.dest_y = dest_y
|
||||
|
||||
/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power)
|
||||
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
|
||||
|
||||
// returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle],
|
||||
// rotated at [rotation] and with the power of [power]
|
||||
@@ -499,10 +503,10 @@ datum/projectile_data
|
||||
|
||||
/proc/GetHexColors(const/hexa)
|
||||
return list(
|
||||
GetRedPart(hexa),
|
||||
GetGreenPart(hexa),
|
||||
GetBluePart(hexa)
|
||||
)
|
||||
GetRedPart(hexa),
|
||||
GetGreenPart(hexa),
|
||||
GetBluePart(hexa)
|
||||
)
|
||||
|
||||
/proc/MixColors(const/list/colors)
|
||||
var/list/reds = list()
|
||||
@@ -521,7 +525,7 @@ datum/projectile_data
|
||||
var/b = mixOneColor(weights, blues)
|
||||
return rgb(r,g,b)
|
||||
|
||||
/proc/mixOneColor(var/list/weight, var/list/color)
|
||||
/proc/mixOneColor(list/weight, list/color)
|
||||
if (!weight || !color || length(weight)!=length(color))
|
||||
return 0
|
||||
|
||||
@@ -553,7 +557,7 @@ datum/projectile_data
|
||||
* Gets the highest and lowest pressures from the tiles in cardinal directions
|
||||
* around us, then checks the difference.
|
||||
*/
|
||||
/proc/getOPressureDifferential(var/turf/loc)
|
||||
/proc/getOPressureDifferential(turf/loc)
|
||||
var/minp=16777216;
|
||||
var/maxp=0;
|
||||
for(var/dir in GLOB.cardinal)
|
||||
@@ -565,17 +569,19 @@ datum/projectile_data
|
||||
else
|
||||
if(istype(T,/turf/simulated))
|
||||
continue
|
||||
if(cp<minp)minp=cp
|
||||
if(cp>maxp)maxp=cp
|
||||
return abs(minp-maxp)
|
||||
if(cp<minp)
|
||||
minp = cp
|
||||
if(cp>maxp)
|
||||
maxp = cp
|
||||
return abs(minp - maxp)
|
||||
|
||||
/proc/convert_k2c(var/temp)
|
||||
/proc/convert_k2c(temp)
|
||||
return ((temp - T0C))
|
||||
|
||||
/proc/convert_c2k(var/temp)
|
||||
/proc/convert_c2k(temp)
|
||||
return ((temp + T0C))
|
||||
|
||||
/proc/getCardinalAirInfo(var/turf/loc, var/list/stats=list("temperature"))
|
||||
/proc/getCardinalAirInfo(turf/loc, list/stats=list("temperature"))
|
||||
var/list/temps = new/list(4)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/direction
|
||||
@@ -610,18 +616,18 @@ datum/projectile_data
|
||||
temps[direction] = rstats
|
||||
return temps
|
||||
|
||||
/proc/MinutesToTicks(var/minutes)
|
||||
/proc/MinutesToTicks(minutes)
|
||||
return SecondsToTicks(60 * minutes)
|
||||
|
||||
/proc/SecondsToTicks(var/seconds)
|
||||
/proc/SecondsToTicks(seconds)
|
||||
return seconds * 10
|
||||
|
||||
/proc/window_flash(var/client_or_usr)
|
||||
/proc/window_flash(client_or_usr)
|
||||
if (!client_or_usr)
|
||||
return
|
||||
winset(client_or_usr, "mainwindow", "flash=5")
|
||||
|
||||
// used for the multiz camera console stolen from vorestatiobn
|
||||
/// Used for the multiz camera console stolen from vorestation.
|
||||
/proc/get_bbox_of_atoms(list/atoms)
|
||||
var/list/list_x = list()
|
||||
var/list/list_y = list()
|
||||
@@ -635,7 +641,7 @@ datum/projectile_data
|
||||
max(list_x),
|
||||
max(list_y))
|
||||
|
||||
/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
|
||||
/proc/recursive_mob_check(atom/O, list/L = list(), recursion_limit = 3, client_check = 1, sight_check = 1, include_radio = 1)
|
||||
|
||||
//GLOB.debug_mob += O.contents.len
|
||||
if(!recursion_limit)
|
||||
@@ -661,7 +667,7 @@ datum/projectile_data
|
||||
L |= recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
|
||||
return L
|
||||
|
||||
/proc/get_mobs_in_view(var/R, var/atom/source, var/include_clientless = FALSE)
|
||||
/proc/get_mobs_in_view(R, atom/source, include_clientless = FALSE)
|
||||
// Returns a list of mobs in range of R from source. Used in radio and say code.
|
||||
|
||||
var/turf/T = get_turf(source)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return list(src, load)
|
||||
return src
|
||||
|
||||
/proc/mobs_in_view(var/range, var/source)
|
||||
/proc/mobs_in_view(range, source)
|
||||
var/list/mobs = list()
|
||||
for(var/atom/movable/AM in view(range, source))
|
||||
var/M = AM.get_mob()
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
return mobs
|
||||
|
||||
/proc/mobs_in_xray_view(var/range, var/source)
|
||||
/proc/mobs_in_xray_view(range, source)
|
||||
var/list/mobs = list()
|
||||
for(var/atom/movable/AM in orange(range, source))
|
||||
var/M = AM.get_mob()
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
return mobs
|
||||
|
||||
proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
var/h_style = "Bald"
|
||||
|
||||
var/list/valid_hairstyles = list()
|
||||
@@ -52,7 +52,7 @@ proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
|
||||
return h_style
|
||||
|
||||
proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
var/f_style = "Shaved"
|
||||
|
||||
var/list/valid_facialhairstyles = list()
|
||||
@@ -72,14 +72,14 @@ proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
|
||||
return f_style
|
||||
|
||||
proc/sanitize_name(name, species = SPECIES_HUMAN)
|
||||
/proc/sanitize_name(name, species = SPECIES_HUMAN)
|
||||
var/datum/species/current_species
|
||||
if(species)
|
||||
current_species = name_static_species_meta(species)
|
||||
|
||||
return current_species ? current_species.sanitize_name(name) : sanitizeName(name, MAX_NAME_LEN)
|
||||
|
||||
proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
|
||||
var/datum/species/current_species
|
||||
if(species)
|
||||
@@ -93,7 +93,7 @@ proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
else
|
||||
return current_species.get_random_name(gender)
|
||||
|
||||
proc/random_skin_tone()
|
||||
/proc/random_skin_tone()
|
||||
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
|
||||
if("caucasian") . = -10
|
||||
if("afroamerican") . = -115
|
||||
@@ -103,7 +103,7 @@ proc/random_skin_tone()
|
||||
else . = rand(-185,34)
|
||||
return min(max( .+rand(-25, 25), -185),34)
|
||||
|
||||
proc/skintone2racedescription(tone)
|
||||
/proc/skintone2racedescription(tone)
|
||||
switch (tone)
|
||||
if(30 to INFINITY) return "albino"
|
||||
if(20 to 30) return "pale"
|
||||
@@ -115,7 +115,7 @@ proc/skintone2racedescription(tone)
|
||||
if(-INFINITY to -65) return "black"
|
||||
else return "unknown"
|
||||
|
||||
proc/age2agedescription(age)
|
||||
/proc/age2agedescription(age)
|
||||
switch(age)
|
||||
if(0 to 1) return "infant"
|
||||
if(1 to 3) return "toddler"
|
||||
@@ -128,16 +128,16 @@ proc/age2agedescription(age)
|
||||
if(70 to INFINITY) return "elderly"
|
||||
else return "unknown"
|
||||
|
||||
/*
|
||||
Proc for attack log creation, because really why not
|
||||
1 argument is the actor
|
||||
2 argument is the target of action
|
||||
3 is the description of action(like punched, throwed, or any other verb)
|
||||
4 should it make adminlog note or not
|
||||
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
|
||||
6 is additional information, anything that needs to be added
|
||||
*/
|
||||
|
||||
/**
|
||||
* Proc for attack log creation, because really why not
|
||||
* 1 argument is the actor
|
||||
* 2 argument is the target of action
|
||||
* 3 is the description of action(like punched, throwed, or any other verb)
|
||||
* 4 should it make adminlog note or not
|
||||
* 5 is the tool with which the action was made(usually item)
|
||||
* ? 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
|
||||
* 6 is additional information, anything that needs to be added
|
||||
*/
|
||||
/proc/add_attack_logs(mob/user, mob/target, what_done, var/admin_notify = TRUE)
|
||||
if(islist(target)) //Multi-victim adding
|
||||
var/list/targets = target
|
||||
@@ -157,20 +157,20 @@ Proc for attack log creation, because really why not
|
||||
msg_admin_attack("[key_name_admin(user)] vs [target_str]: [what_done]")
|
||||
|
||||
//checks whether this item is a module of the robot it is located in.
|
||||
/proc/is_robot_module(var/obj/item/thing)
|
||||
/proc/is_robot_module(obj/item/thing)
|
||||
if (!thing || !istype(thing.loc, /mob/living/silicon/robot))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/R = thing.loc
|
||||
return (thing in R.module.modules)
|
||||
|
||||
/proc/get_exposed_defense_zone(var/atom/movable/target)
|
||||
/proc/get_exposed_defense_zone(atom/movable/target)
|
||||
var/obj/item/grab/G = locate() in target
|
||||
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
|
||||
return pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg")
|
||||
else
|
||||
return pick("chest", "groin")
|
||||
|
||||
/atom/proc/living_mobs(var/range = world.view)
|
||||
/atom/proc/living_mobs(range = world.view)
|
||||
var/list/viewers = oviewers(src,range)
|
||||
var/list/living = list()
|
||||
for(var/mob/living/L in viewers)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/*
|
||||
/**
|
||||
* Holds procs designed to help with filtering text
|
||||
* Contains groups:
|
||||
* SQL sanitization
|
||||
* Text sanitization
|
||||
* Text searches
|
||||
* Text modification
|
||||
* Misc
|
||||
* ! SQL sanitization
|
||||
* ! Text sanitization
|
||||
* ! Text searches
|
||||
* ! Text modification
|
||||
* ! Misc
|
||||
*/
|
||||
|
||||
/*
|
||||
* SQL sanitization
|
||||
/**
|
||||
*! SQL sanitization
|
||||
*/
|
||||
|
||||
/proc/format_table_name(table)
|
||||
@@ -18,12 +18,12 @@
|
||||
/proc/format_unified_table_name(table)
|
||||
return CONFIG_GET(string/sql_unified_prefix) + table
|
||||
|
||||
/*
|
||||
* Text sanitization
|
||||
/**
|
||||
*! Text sanitization
|
||||
*/
|
||||
|
||||
//Used for preprocessing entered text
|
||||
/proc/sanitize(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
/// Used for preprocessing entered text.
|
||||
/proc/sanitize(input, max_length = MAX_MESSAGE_LEN, encode = TRUE, trim = TRUE, extra = TRUE)
|
||||
if(!input)
|
||||
return
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
|
||||
return input
|
||||
|
||||
///have to rewrite this sanitize code :djoy:
|
||||
//TODO: Have to rewrite this sanitize code :djoy:
|
||||
/proc/sanitize_filename(t)
|
||||
return sanitize_simple_tg(t, list("\n"="", "\t"="", "/"="", "\\"="", "?"="", "%"="", "*"="", ":"="", "|"="", "\""="", "<"="", ">"=""))
|
||||
|
||||
//Removes a few problematic characters. Renamed because namespace
|
||||
/proc/sanitize_simple_tg(t,list/repl_chars = list("\n"="#","\t"="#"))
|
||||
/// Removes a few problematic characters. Renamed because namespace.
|
||||
/proc/sanitize_simple_tg(t, list/repl_chars = list("\n"="#","\t"="#"))
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
@@ -65,76 +65,86 @@
|
||||
index = findtext(t, char, index + length(char))
|
||||
return t
|
||||
|
||||
//Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode().
|
||||
//Best used for sanitize object names, window titles.
|
||||
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
|
||||
//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
|
||||
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
/**
|
||||
* Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode().
|
||||
* Best used for sanitize object names, window titles.
|
||||
* If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
|
||||
* this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
|
||||
*/
|
||||
/proc/sanitizeSafe(input, max_length = MAX_MESSAGE_LEN, encode = TRUE, trim = TRUE, extra = TRUE)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN)
|
||||
/// Filters out undesirable characters from names.
|
||||
/proc/sanitizeName(input, max_length = MAX_NAME_LEN)
|
||||
if(!input || length(input) > max_length)
|
||||
return //Rejects the input if it is null or if it is longer then the max length allowed
|
||||
|
||||
var/number_of_alphanumeric = 0
|
||||
var/last_char_group = 0
|
||||
var/number_of_alphanumeric = 0
|
||||
var/last_char_group = 0
|
||||
var/output = ""
|
||||
|
||||
for(var/i=1, i<=length(input), i++)
|
||||
var/ascii_char = text2ascii(input,i)
|
||||
switch(ascii_char)
|
||||
// A .. Z
|
||||
if(65 to 90) //Uppercase Letters
|
||||
//! Uppercase Characters: A .. Z
|
||||
if(65 to 90)
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// a .. z
|
||||
if(97 to 122) //Lowercase Letters
|
||||
if(last_char_group<2) output += ascii2text(ascii_char-32) //Force uppercase first character
|
||||
else output += ascii2text(ascii_char)
|
||||
//! Lowercase Characters: a .. z
|
||||
if(97 to 122)
|
||||
if(last_char_group<2)
|
||||
output += ascii2text(ascii_char-32) // Force uppercase first character.
|
||||
else
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// 0 .. 9
|
||||
if(48 to 57) //Numbers
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
//! Number Characters: 0 .. 9
|
||||
if(48 to 57)
|
||||
if(!last_char_group)
|
||||
continue // Suppress at start of string.
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 3
|
||||
|
||||
// ' - .
|
||||
if(39,45,46) //Common name punctuation
|
||||
//! Symbol Characters: ' - .
|
||||
if(39, 45, 46) // Common name punctuation.
|
||||
if(!last_char_group) continue
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
// ~ | @ : # $ % & * +
|
||||
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
//! Hardcoded Characters: ~ | @ : # $ % & * +
|
||||
if(126, 124, 64, 58, 35, 36, 37, 38, 42, 43) // Other symbols that we'll allow (mainly for AI).
|
||||
if(!last_char_group)
|
||||
continue // Suppress at start of string.
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
//Space
|
||||
//! Space Character
|
||||
if(32)
|
||||
if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
|
||||
if(last_char_group <= 1)
|
||||
continue // Suppress double-spaces and spaces at start of string.
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 1
|
||||
else
|
||||
return
|
||||
|
||||
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
|
||||
if(number_of_alphanumeric < 2)
|
||||
return // Protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
|
||||
|
||||
if(last_char_group == 1)
|
||||
output = copytext(output,1,length(output)) //removes the last character (in this case a space)
|
||||
output = copytext(output,1,length(output)) // Removes the last character (in this case a space).
|
||||
|
||||
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names
|
||||
if(cmptext(output,bad_name)) return //(not case sensitive)
|
||||
//TODO: Make this like a json/yaml file or something.
|
||||
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) // Prevents these common metagamey names.
|
||||
if(cmptext(output,bad_name))
|
||||
return // Not case sensitive.
|
||||
|
||||
return output
|
||||
|
||||
//Returns null if there is any bad text in the string
|
||||
/// Returns null if there is any bad text in the string.
|
||||
/proc/reject_bad_text(text, max_length = 512, ascii_only = TRUE)
|
||||
var/char_count = 0
|
||||
var/non_whitespace = FALSE
|
||||
@@ -146,31 +156,33 @@
|
||||
if(char_count > max_length)
|
||||
return
|
||||
switch(text2ascii(char))
|
||||
if(62,60,92,47) // <, >, \, /
|
||||
if(62, 60, 92, 47) // <, >, \, /
|
||||
return
|
||||
if(0 to 31)
|
||||
return
|
||||
if(32)
|
||||
continue //whitespace
|
||||
continue // Whitespace.
|
||||
if(127 to INFINITY)
|
||||
if(ascii_only)
|
||||
return
|
||||
else
|
||||
non_whitespace = TRUE
|
||||
if(non_whitespace)
|
||||
return text //only accepts the text if it has some non-spaces
|
||||
return text // Only accepts the text if it has some non-spaces.
|
||||
|
||||
// Used to get a properly sanitized input, of max_length
|
||||
// no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
|
||||
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
/**
|
||||
* Used to get a properly sanitized input, of max_length
|
||||
* no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
|
||||
*/
|
||||
/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length = MAX_MESSAGE_LEN, no_trim = FALSE)
|
||||
var/name = input(user, message, title, default) as text|null
|
||||
if(no_trim)
|
||||
return copytext(html_encode(name), 1, max_length)
|
||||
else
|
||||
return trim(html_encode(name), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into <)
|
||||
|
||||
// Used to get a properly sanitized multiline input, of max_length
|
||||
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
/// Used to get a properly sanitized multiline input, of max_length
|
||||
/proc/stripped_multiline_input(mob/user, message = "", title = "", default = "", max_length = MAX_MESSAGE_LEN, no_trim = FALSE)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
if(isnull(name)) // Return null if canceled.
|
||||
return null
|
||||
@@ -179,126 +191,137 @@
|
||||
else
|
||||
return trim(html_encode(name), max_length)
|
||||
|
||||
//Old variant. Haven't dared to replace in some places.
|
||||
/// Old variant. Haven't dared to replace in some places.
|
||||
/proc/sanitize_old(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
return html_encode(replace_characters(t,repl_chars))
|
||||
|
||||
/*
|
||||
* Text searches
|
||||
/**
|
||||
*! Text searches
|
||||
*/
|
||||
|
||||
//Checks the beginning of a string for a specified sub-string
|
||||
//Returns the position of the substring or 0 if it was not found
|
||||
/**
|
||||
* Checks the beginning of a string for a specified sub-string.
|
||||
* Returns the position of the substring or 0 if it was not found.
|
||||
*/
|
||||
/proc/dd_hasprefix(text, prefix)
|
||||
var/start = 1
|
||||
var/end = length(prefix) + 1
|
||||
return findtext(text, prefix, start, end)
|
||||
|
||||
//Checks the beginning of a string for a specified sub-string. This proc is case sensitive
|
||||
//Returns the position of the substring or 0 if it was not found
|
||||
/**
|
||||
* Checks the beginning of a string for a specified sub-string. This proc is case sensitive.
|
||||
* Returns the position of the substring or 0 if it was not found.
|
||||
*/
|
||||
/proc/dd_hasprefix_case(text, prefix)
|
||||
var/start = 1
|
||||
var/end = length(prefix) + 1
|
||||
return findtextEx(text, prefix, start, end)
|
||||
|
||||
//Checks the end of a string for a specified substring.
|
||||
//Returns the position of the substring or 0 if it was not found
|
||||
/**
|
||||
* Checks the end of a string for a specified substring.
|
||||
* Returns the position of the substring or 0 if it was not found.
|
||||
*/
|
||||
/proc/dd_hassuffix(text, suffix)
|
||||
var/start = length(text) - length(suffix)
|
||||
if(start)
|
||||
return findtext(text, suffix, start, null)
|
||||
return
|
||||
|
||||
//Checks the end of a string for a specified substring. This proc is case sensitive
|
||||
//Returns the position of the substring or 0 if it was not found
|
||||
/**
|
||||
* Checks the end of a string for a specified substring. This proc is case sensitive.
|
||||
* Returns the position of the substring or 0 if it was not found.
|
||||
*/
|
||||
/proc/dd_hassuffix_case(text, suffix)
|
||||
var/start = length(text) - length(suffix)
|
||||
if(start)
|
||||
return findtextEx(text, suffix, start, null)
|
||||
|
||||
/*
|
||||
* Text modification
|
||||
/**
|
||||
*! Text modification
|
||||
*/
|
||||
/proc/replace_characters(var/t,var/list/repl_chars)
|
||||
/proc/replace_characters(t, list/repl_chars)
|
||||
for(var/char in repl_chars)
|
||||
t = replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
/// Adds 'u' number of zeros ahead of the text 't'.
|
||||
/proc/add_zero(t, u)
|
||||
while (length(t) < u)
|
||||
t = "0[t]"
|
||||
return t
|
||||
|
||||
//Adds 'u' number of spaces ahead of the text 't'
|
||||
/// Adds 'u' number of spaces ahead of the text 't'.
|
||||
/proc/add_lspace(t, u)
|
||||
while(length(t) < u)
|
||||
t = " [t]"
|
||||
return t
|
||||
|
||||
//Adds 'u' number of spaces behind the text 't'
|
||||
/// Adds 'u' number of spaces behind the text 't'.
|
||||
/proc/add_tspace(t, u)
|
||||
while(length(t) < u)
|
||||
t = "[t] "
|
||||
return t
|
||||
|
||||
//Returns a string with reserved characters and spaces before the first letter removed
|
||||
/// Returns a string with reserved characters and spaces before the first letter removed.
|
||||
/proc/trim_left(text)
|
||||
for (var/i = 1 to length(text))
|
||||
if (text2ascii(text, i) > 32)
|
||||
return copytext(text, i)
|
||||
return ""
|
||||
|
||||
//Returns a string with reserved characters and spaces after the last letter removed
|
||||
/// Returns a string with reserved characters and spaces after the last letter removed.
|
||||
/proc/trim_right(text)
|
||||
for (var/i = length(text), i > 0, i--)
|
||||
if (text2ascii(text, i) > 32)
|
||||
return copytext(text, 1, i + 1)
|
||||
return ""
|
||||
|
||||
//Returns a string with reserved characters and spaces before the first word and after the last word removed.
|
||||
/// Returns a string with reserved characters and spaces before the first word and after the last word removed.
|
||||
/proc/trim(text)
|
||||
return trim_left(trim_right(text))
|
||||
|
||||
//Returns a string with the first element of the string capitalized.
|
||||
/proc/capitalize(var/t as text)
|
||||
/// Returns a string with the first element of the string capitalized.
|
||||
/proc/capitalize(t as text)
|
||||
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
||||
|
||||
/proc/autocorrect(var/input as text) // syntax is "stringtoreplace"="stringtoreplacewith"
|
||||
/// syntax is "stringtoreplace"="stringtoreplacewith".
|
||||
/proc/autocorrect(input as text)
|
||||
return input = replace_characters(input, list(
|
||||
" i "=" I ",
|
||||
"i'm"="I'm",
|
||||
"s's"="s'",
|
||||
"isnt"="isn't",
|
||||
"dont"="don't",
|
||||
"shouldnt"="shouldn't",
|
||||
" ive "=" I've ",
|
||||
"whove"="who've",
|
||||
"whod"="who’d",
|
||||
"whats"="what’s",
|
||||
"whatd"="what’d",
|
||||
"thats"="that’s",
|
||||
"thatll"="that’ll",
|
||||
"thatd"="that’d",
|
||||
" nows "=" now’s ",
|
||||
"isnt"="isn’t",
|
||||
" arent "=" aren’t ",
|
||||
"wasnt"="wasn’t",
|
||||
"werent"="weren’t",
|
||||
"havent"="haven’t",
|
||||
"hasnt"="hasn’t",
|
||||
"hadnt"="hadn’t",
|
||||
"doesnt"="doesn’t",
|
||||
"didnt"="didn’t",
|
||||
"couldnt"="couldn’t",
|
||||
"wouldnt"="wouldn’t",
|
||||
"mustnt"="mustn’t",
|
||||
"shouldnt"="shouldn’t"
|
||||
))
|
||||
" i "=" I ",
|
||||
"i'm"="I'm",
|
||||
"s's"="s'",
|
||||
"isnt"="isn't",
|
||||
"dont"="don't",
|
||||
"shouldnt"="shouldn't",
|
||||
" ive "=" I've ",
|
||||
"whove"="who've",
|
||||
"whod"="who’d",
|
||||
"whats"="what’s",
|
||||
"whatd"="what’d",
|
||||
"thats"="that’s",
|
||||
"thatll"="that’ll",
|
||||
"thatd"="that’d",
|
||||
" nows "=" now’s ",
|
||||
"isnt"="isn’t",
|
||||
" arent "=" aren’t ",
|
||||
"wasnt"="wasn’t",
|
||||
"werent"="weren’t",
|
||||
"havent"="haven’t",
|
||||
"hasnt"="hasn’t",
|
||||
"hadnt"="hadn’t",
|
||||
"doesnt"="doesn’t",
|
||||
"didnt"="didn’t",
|
||||
"couldnt"="couldn’t",
|
||||
"wouldnt"="wouldn’t",
|
||||
"mustnt"="mustn’t",
|
||||
"shouldnt"="shouldn’t",
|
||||
))
|
||||
|
||||
//This proc strips html properly, remove < > and all text between
|
||||
//for complete text sanitizing should be used sanitize()
|
||||
/proc/strip_html_properly(var/input)
|
||||
/**
|
||||
* This proc strips html properly, remove < > and all text between
|
||||
* for complete text sanitizing should be used sanitize()
|
||||
*/
|
||||
/proc/strip_html_properly(input)
|
||||
if(!input)
|
||||
return
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
@@ -321,10 +344,12 @@
|
||||
|
||||
return input
|
||||
|
||||
//This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
/**
|
||||
* This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
* is in the other string at the same spot (assuming it is not a replace char).
|
||||
* This is used for fingerprints.
|
||||
*/
|
||||
/proc/stringmerge(text, compare, replace = "*")
|
||||
var/newtext = text
|
||||
if(length(text) != length(compare))
|
||||
return 0
|
||||
@@ -342,9 +367,11 @@
|
||||
return 0
|
||||
return newtext
|
||||
|
||||
//This proc returns the number of chars of the string that is the character
|
||||
//This is used for detective work to determine fingerprint completion.
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
/**
|
||||
* This proc returns the number of chars of the string that is the character.
|
||||
* This is used for detective work to determine fingerprint completion.
|
||||
*/
|
||||
/proc/stringpercent(text, character = "*")
|
||||
if(!text || !character)
|
||||
return 0
|
||||
var/count = 0
|
||||
@@ -354,7 +381,7 @@
|
||||
count++
|
||||
return count
|
||||
|
||||
/proc/reverse_text(var/text = "")
|
||||
/proc/reverse_text(text = "")
|
||||
var/new_text = ""
|
||||
for(var/i = length(text); i > 0; i--)
|
||||
new_text += copytext(text, i, i+1)
|
||||
@@ -368,9 +395,11 @@
|
||||
char = text[i]
|
||||
. += char
|
||||
|
||||
//Used in preferences' SetFlavorText and human's set_flavor verb
|
||||
//Previews a string of len or less length
|
||||
proc/TextPreview(var/string,var/len=40)
|
||||
/**
|
||||
* Used in preferences' SetFlavorText and human's set_flavor verb
|
||||
* Previews a string of len or less length
|
||||
*/
|
||||
/proc/TextPreview(string, len=40)
|
||||
if(length(string) <= len)
|
||||
if(!length(string))
|
||||
return "\[...\]"
|
||||
@@ -379,13 +408,15 @@ proc/TextPreview(var/string,var/len=40)
|
||||
else
|
||||
return "[copytext_preserve_html(string, 1, 37)]..."
|
||||
|
||||
//alternative copytext() for encoded text, doesn't break html entities (" and other)
|
||||
/proc/copytext_preserve_html(var/text, var/first, var/last)
|
||||
/// Alternative copytext() for encoded text, doesn't break html entities (" and other)
|
||||
/proc/copytext_preserve_html(text, first, last)
|
||||
return html_encode(copytext(html_decode(text), first, last))
|
||||
|
||||
//For generating neat chat tag-images
|
||||
//The icon var could be local in the proc, but it's a waste of resources
|
||||
// to always create it and then throw it out.
|
||||
/**
|
||||
* For generating neat chat tag-images.
|
||||
* The icon var could be local in the proc, but it's a waste of resources
|
||||
* to always create it and then throw it out.
|
||||
*/
|
||||
GLOBAL_VAR_INIT(text_tag_icons, new /icon('./icons/chattags.dmi'))
|
||||
|
||||
/proc/create_text_tag(tagname, tagdesc = tagname, client/C)
|
||||
@@ -393,27 +424,29 @@ GLOBAL_VAR_INIT(text_tag_icons, new /icon('./icons/chattags.dmi'))
|
||||
return tagdesc
|
||||
return icon2html(GLOB.text_tag_icons, C, tagname)
|
||||
|
||||
/proc/contains_az09(var/input)
|
||||
/proc/contains_az09(input)
|
||||
for(var/i=1, i<=length(input), i++)
|
||||
var/ascii_char = text2ascii(input,i)
|
||||
switch(ascii_char)
|
||||
// A .. Z
|
||||
if(65 to 90) //Uppercase Letters
|
||||
return 1
|
||||
// a .. z
|
||||
if(97 to 122) //Lowercase Letters
|
||||
return 1
|
||||
//! Uppercase Characters: A .. Z
|
||||
if(65 to 90)
|
||||
return TRUE
|
||||
|
||||
// 0 .. 9
|
||||
if(48 to 57) //Numbers
|
||||
return 1
|
||||
return 0
|
||||
//! Lowercase Characters: a .. z
|
||||
if(97 to 122)
|
||||
return TRUE
|
||||
|
||||
//! Number Characters: 0 .. 9
|
||||
if(48 to 57)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Strip out the special beyond characters for \proper and \improper
|
||||
* from text that will be sent to the browser.
|
||||
*/
|
||||
/proc/strip_improper(var/text)
|
||||
/proc/strip_improper(text)
|
||||
return replacetext(replacetext(text, "\proper", ""), "\improper", "")
|
||||
|
||||
/proc/pencode2html(t)
|
||||
@@ -456,16 +489,16 @@ GLOBAL_VAR_INIT(text_tag_icons, new /icon('./icons/chattags.dmi'))
|
||||
t = replacetext(t, "\[editorbr\]", "")
|
||||
return t
|
||||
|
||||
// Random password generator
|
||||
/// Random password generator. // Could've just flustered a bottom.
|
||||
/proc/GenerateKey()
|
||||
//Feel free to move to Helpers.
|
||||
// Feel free to move to Helpers.
|
||||
var/newKey
|
||||
newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
|
||||
newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
|
||||
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
||||
return newKey
|
||||
|
||||
//Used for applying byonds text macros to strings that are loaded at runtime
|
||||
/// Used for applying byonds text macros to strings that are loaded at runtime.
|
||||
/proc/apply_text_macros(string)
|
||||
var/next_backslash = findtext(string, "\\")
|
||||
if(!next_backslash)
|
||||
@@ -544,9 +577,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
/proc/random_color()
|
||||
return random_string(6, GLOB.hex_characters)
|
||||
|
||||
//! ## VR FILE MERGE ## !//
|
||||
//Readds quotes and apostrophes to HTML-encoded strings
|
||||
/proc/readd_quotes(var/t)
|
||||
/// Readds quotes and apostrophes to HTML-encoded strings.
|
||||
/proc/readd_quotes(t)
|
||||
var/list/repl_chars = list(""" = "\"","'" = "'")
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
@@ -555,21 +587,21 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
|
||||
//Adds 'char' ahead of 'text' until there are 'count' characters total
|
||||
/// Adds 'char' ahead of 'text' until there are 'count' characters total.
|
||||
/proc/add_leading(text, count, char = " ")
|
||||
text = "[text]"
|
||||
var/charcount = count - length_char(text)
|
||||
var/list/chars_to_add[max(charcount + 1, 0)]
|
||||
return jointext(chars_to_add, char) + text
|
||||
|
||||
//Adds 'char' behind 'text' until there are 'count' characters total
|
||||
/// Adds 'char' behind 'text' until there are 'count' characters total.
|
||||
/proc/add_trailing(text, count, char = " ")
|
||||
text = "[text]"
|
||||
var/charcount = count - length_char(text)
|
||||
var/list/chars_to_add[max(charcount + 1, 0)]
|
||||
return text + jointext(chars_to_add, char)
|
||||
|
||||
/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
|
||||
/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts.
|
||||
/proc/sanitize_css_class_name(name)
|
||||
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
|
||||
return replacetext(name, regex, "")
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* Convert random parts of a passed in message to stars
|
||||
*
|
||||
* * phrase - the string to convert
|
||||
* * probability - probability any character doesn't gets changed
|
||||
* * max - max characters
|
||||
*
|
||||
* This proc is dangerously laggy, avoid it or die
|
||||
* On another note this is main's but probability is reversed because RP code is stupid.
|
||||
*/
|
||||
* Convert random parts of a passed in message to stars
|
||||
*
|
||||
* * phrase - the string to convert
|
||||
* * probability - probability any character doesn't gets changed
|
||||
* * max - max characters
|
||||
*
|
||||
* This proc is dangerously laggy, avoid it or die
|
||||
* On another note this is main's but probability is reversed because RP code is stupid.
|
||||
*/
|
||||
/proc/stars(phrase, probability = 25, max = 4096)
|
||||
if(probability >= 100)
|
||||
return phrase
|
||||
@@ -28,7 +28,7 @@
|
||||
. += "*"
|
||||
return sanitize(.)
|
||||
|
||||
proc/slur(phrase)
|
||||
/proc/slur(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
@@ -36,19 +36,30 @@ proc/slur(phrase)
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
if(rand(1,3)==3)
|
||||
if(lowertext(newletter)=="o") newletter="u"
|
||||
if(lowertext(newletter)=="s") newletter="ch"
|
||||
if(lowertext(newletter)=="a") newletter="ah"
|
||||
if(lowertext(newletter)=="c") newletter="k"
|
||||
if(rand(1,3) == 3)
|
||||
if(lowertext(newletter)=="o")
|
||||
newletter="u"
|
||||
if(lowertext(newletter)=="s")
|
||||
newletter="ch"
|
||||
if(lowertext(newletter)=="a")
|
||||
newletter="ah"
|
||||
if(lowertext(newletter)=="c")
|
||||
newletter="k"
|
||||
switch(rand(1,15))
|
||||
if(1,3,5,8) newletter="[lowertext(newletter)]"
|
||||
if(2,4,6,15) newletter="[uppertext(newletter)]"
|
||||
if(7) newletter+="'"
|
||||
if(9,10,11,12,13,14) newletter = newletter
|
||||
//if(9,10) newletter="<b>[newletter]</b>"
|
||||
//if(11,12) newletter="<big>[newletter]</big>"
|
||||
//if(13) newletter="<small>[newletter]</small>"
|
||||
if(1, 3, 5, 8)
|
||||
newletter="[lowertext(newletter)]"
|
||||
if(2, 4, 6, 15)
|
||||
newletter="[uppertext(newletter)]"
|
||||
if(7)
|
||||
newletter+="'"
|
||||
if(9 to 14)
|
||||
newletter = newletter
|
||||
// if(9,10)
|
||||
// newletter="<b>[newletter]</b>"
|
||||
// if(11,12)
|
||||
// newletter="<big>[newletter]</big>"
|
||||
// if(13)
|
||||
// newletter="<small>[newletter]</small>"
|
||||
newphrase+="[newletter]";counter-=1
|
||||
return newphrase
|
||||
|
||||
@@ -75,9 +86,12 @@ proc/slur(phrase)
|
||||
p++//for each letter p is increased to find where the next letter will be.
|
||||
return sanitize(t)
|
||||
|
||||
|
||||
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
|
||||
/* Turn text into complete gibberish! */
|
||||
/**
|
||||
* Turn text into complete gibberish!
|
||||
*
|
||||
* t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added.
|
||||
*/
|
||||
/proc/Gibberish(t, p)
|
||||
var/returntext = ""
|
||||
for(var/i = 1, i <= length(t), i++)
|
||||
|
||||
@@ -93,13 +107,12 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo
|
||||
|
||||
return returntext
|
||||
|
||||
|
||||
/**
|
||||
* The difference with stutter is that this proc can stutter more than 1 letter
|
||||
* The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma.
|
||||
* It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N
|
||||
*/
|
||||
/proc/ninjaspeak(n)
|
||||
/*
|
||||
The difference with stutter is that this proc can stutter more than 1 letter
|
||||
The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma.
|
||||
It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N
|
||||
*/
|
||||
var/te = html_decode(n)
|
||||
var/t = ""
|
||||
n = length(n)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
return wtime + (time_offset + wusage) * world.tick_lag
|
||||
|
||||
GLOBAL_VAR_INIT(roundstart_hour, pick(2,7,12,17))
|
||||
var/station_date = ""
|
||||
var/next_station_date_change = 1 DAY
|
||||
/var/station_date = ""
|
||||
/var/next_station_date_change = 1 DAY
|
||||
|
||||
#define duration2stationtime(time) time2text(station_time_in_ds + time, "hh:mm")
|
||||
#define worldtime2stationtime(time) time2text(GLOB.roundstart_hour HOURS + time, "hh:mm")
|
||||
@@ -41,7 +41,7 @@ var/next_station_date_change = 1 DAY
|
||||
station_date = num2text((text2num(time2text(timeofday, "YYYY"))+544)) + "-" + time2text(timeofday, "MM-DD")
|
||||
return station_date
|
||||
|
||||
//ISO 8601
|
||||
/// ISO 8601
|
||||
/proc/time_stamp()
|
||||
var/date_portion = time2text(world.timeofday, "YYYY-MM-DD")
|
||||
var/time_portion = time2text(world.timeofday, "hh:mm:ss")
|
||||
@@ -59,30 +59,32 @@ var/next_station_date_change = 1 DAY
|
||||
wtime = world.time
|
||||
return time2text(wtime - GLOB.timezoneOffset, format)
|
||||
|
||||
/* This is used for displaying the "station time" equivelent of a world.time value
|
||||
Calling it with no args will give you the current time, but you can specify a world.time-based value as an argument
|
||||
- You can use this, for example, to do "This will expire at [station_time_at(world.time + 500)]" to display a "station time" expiration date
|
||||
which is much more useful for a player)*/
|
||||
/**
|
||||
* This is used for displaying the "station time" equivelent of a world.time value
|
||||
* Calling it with no args will give you the current time, but you can specify a world.time-based value as an argument.
|
||||
* - You can use this, for example, to do "This will expire at [station_time_at(world.time + 500)]" to display a "station time" expiration date
|
||||
* which is much more useful for a player).
|
||||
*/
|
||||
/proc/station_time(time=world.time, display_only=FALSE)
|
||||
return ((((time - SSticker.round_start_time)) + GLOB.gametime_offset) % 864000) - (display_only ? GLOB.timezoneOffset : 0)
|
||||
|
||||
/proc/station_time_timestamp(format = "hh:mm:ss", time=world.time)
|
||||
return time2text(station_time(time, TRUE), format)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
proc/isDay(var/month, var/day)
|
||||
/// Returns 1 if it is the selected month and day.
|
||||
/proc/isDay(var/month, var/day)
|
||||
if(isnum(month) && isnum(day))
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // Get the current month.
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // Get the current day.
|
||||
if(month == MM && day == DD)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// Uncomment this out when debugging!
|
||||
//else
|
||||
//return 1
|
||||
// else
|
||||
// return TRUE
|
||||
|
||||
var/next_duration_update = 0
|
||||
var/last_round_duration = 0
|
||||
/var/next_duration_update = 0
|
||||
/var/last_round_duration = 0
|
||||
|
||||
/proc/roundduration2text()
|
||||
if(!SSticker.round_start_time)
|
||||
@@ -104,13 +106,14 @@ var/last_round_duration = 0
|
||||
|
||||
/var/midnight_rollovers = 0
|
||||
/var/rollovercheck_last_timeofday = 0
|
||||
|
||||
/proc/update_midnight_rollover()
|
||||
if (world.timeofday < rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
|
||||
return midnight_rollovers++
|
||||
return midnight_rollovers
|
||||
|
||||
/proc/weekdayofthemonth()
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
switch(DD)
|
||||
if(8 to 13)
|
||||
return 2
|
||||
@@ -123,8 +126,10 @@ var/last_round_duration = 0
|
||||
else
|
||||
return 1
|
||||
|
||||
//Takes a value of time in deciseconds.
|
||||
//Returns a text value of that number in hours, minutes, or seconds.
|
||||
/**
|
||||
* Takes a value of time in deciseconds.
|
||||
* Returns a text value of that number in hours, minutes, or seconds.
|
||||
*/
|
||||
/proc/DisplayTimeText(time_value, round_seconds_to = 0.1)
|
||||
var/second = round(time_value * 0.1, round_seconds_to)
|
||||
if(!second)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -18,27 +18,27 @@
|
||||
var/channel_name = "Station Announcements"
|
||||
var/announcement_type = "Announcement"
|
||||
|
||||
/datum/legacy_announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
|
||||
/datum/legacy_announcement/New(do_log = 0, new_sound = null, do_newscast = 0)
|
||||
sound = new_sound
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
|
||||
/datum/legacy_announcement/priority/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
/datum/legacy_announcement/priority/New(do_log = 1, new_sound = 'sound/misc/notice2.ogg', do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Priority Announcement"
|
||||
announcement_type = "Priority Announcement"
|
||||
|
||||
/datum/legacy_announcement/priority/command/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
/datum/legacy_announcement/priority/command/New(do_log = 1, new_sound = 'sound/misc/notice2.ogg', do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "[command_name()] Update"
|
||||
announcement_type = "[command_name()] Update"
|
||||
|
||||
/datum/legacy_announcement/priority/security/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
/datum/legacy_announcement/priority/security/New(do_log = 1, new_sound = 'sound/misc/notice2.ogg', do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Security Announcement"
|
||||
announcement_type = "Security Announcement"
|
||||
|
||||
/datum/legacy_announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, zlevel)
|
||||
/datum/legacy_announcement/proc/Announce(message as text, new_title = "", new_sound = null, do_newscast = newscast, msg_sanitized = 0, zlevel)
|
||||
if(!message)
|
||||
return
|
||||
var/message_title = new_title ? new_title : title
|
||||
@@ -60,7 +60,7 @@
|
||||
Sound(message_sound, zlevels)
|
||||
Log(message, message_title)
|
||||
|
||||
/datum/legacy_announcement/proc/Message(message as text, message_title as text, var/list/zlevels)
|
||||
/datum/legacy_announcement/proc/Message(message as text, message_title as text, list/zlevels)
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/new_player) && !isdeaf(M))
|
||||
to_chat(M, "<h2 class='alert'>[title]</h2>")
|
||||
@@ -68,19 +68,19 @@
|
||||
if (announcer)
|
||||
to_chat(M, "<span class='alert'> -[html_encode(announcer)]</span>")
|
||||
|
||||
/datum/legacy_announcement/minor/Message(message as text, message_title as text, var/list/zlevels)
|
||||
/datum/legacy_announcement/minor/Message(message as text, message_title as text, list/zlevels)
|
||||
GLOB.global_announcer.autosay(message, announcer ? announcer : ANNOUNCER_NAME, channel = "Common", zlevels = zlevels)
|
||||
|
||||
/datum/legacy_announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels)
|
||||
/datum/legacy_announcement/priority/Message(message as text, message_title as text, list/zlevels)
|
||||
GLOB.global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME, channel = "Common", zlevels = zlevels)
|
||||
|
||||
/datum/legacy_announcement/priority/command/Message(var/message as text, var/message_title as text, var/list/zlevels)
|
||||
/datum/legacy_announcement/priority/command/Message(message as text, message_title as text, list/zlevels)
|
||||
GLOB.global_announcer.autosay("<span class='alert'>[command_name()] - [message_title]:</span> [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels)
|
||||
|
||||
/datum/legacy_announcement/priority/security/Message(var/message as text, var/message_title as text, var/list/zlevels)
|
||||
/datum/legacy_announcement/priority/security/Message(message as text, message_title as text, list/zlevels)
|
||||
GLOB.global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", ANNOUNCER_NAME, channel = "Common", zlevels = zlevels)
|
||||
|
||||
datum/legacy_announcement/proc/NewsCast(message as text, message_title as text)
|
||||
/datum/legacy_announcement/proc/NewsCast(message as text, message_title as text)
|
||||
if(!newscast)
|
||||
return
|
||||
|
||||
@@ -92,7 +92,7 @@ datum/legacy_announcement/proc/NewsCast(message as text, message_title as text)
|
||||
news.can_be_redacted = 0
|
||||
announce_newscaster_news(news)
|
||||
|
||||
/datum/legacy_announcement/proc/PlaySound(var/message_sound, var/list/zlevels)
|
||||
/datum/legacy_announcement/proc/PlaySound(message_sound, list/zlevels)
|
||||
for(var/mob/M in player_list)
|
||||
if(zlevels && !(M.z in zlevels))
|
||||
continue
|
||||
@@ -109,22 +109,22 @@ datum/legacy_announcement/proc/NewsCast(message as text, message_title as text)
|
||||
if(!istype(M,/mob/new_player) && !isdeaf(M))
|
||||
SEND_SOUND(M, message_sound)
|
||||
|
||||
/datum/legacy_announcement/proc/Sound(var/message_sound, var/list/zlevels)
|
||||
/datum/legacy_announcement/proc/Sound(message_sound, list/zlevels)
|
||||
PlaySound(message_sound, zlevels)
|
||||
|
||||
datum/legacy_announcement/priority/Sound(var/message_sound)
|
||||
/datum/legacy_announcement/priority/Sound(message_sound)
|
||||
if(message_sound)
|
||||
SEND_SOUND(world, message_sound)
|
||||
|
||||
datum/legacy_announcement/priority/command/Sound(var/message_sound)
|
||||
/datum/legacy_announcement/priority/command/Sound(message_sound)
|
||||
PlaySound(message_sound)
|
||||
|
||||
datum/legacy_announcement/proc/Log(message as text, message_title as text)
|
||||
/datum/legacy_announcement/proc/Log(message as text, message_title as text)
|
||||
if(log)
|
||||
log_game("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]")
|
||||
message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1)
|
||||
|
||||
/proc/GetNameAndAssignmentFromId(var/obj/item/card/id/I)
|
||||
/proc/GetNameAndAssignmentFromId(obj/item/card/id/I)
|
||||
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
|
||||
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
|
||||
|
||||
@@ -134,11 +134,11 @@ datum/legacy_announcement/proc/Log(message as text, message_title as text)
|
||||
/proc/ion_storm_announcement()
|
||||
command_announcement.Announce("It has come to our attention that \the [station_name()] passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
|
||||
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
|
||||
/proc/AnnounceArrival(mob/living/carbon/human/character, rank, join_message)
|
||||
if (SSticker.current_state == GAME_STATE_PLAYING)
|
||||
if(character.mind.role_alt_title)
|
||||
rank = character.mind.role_alt_title
|
||||
AnnounceArrivalSimple(character.real_name, rank, join_message)
|
||||
|
||||
/proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "will arrive at the station shortly")
|
||||
/proc/AnnounceArrivalSimple(name, rank = "visitor", join_message = "will arrive at the station shortly")
|
||||
GLOB.global_announcer.autosay(join_message, "Arrivals Announcement Computer")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
datum
|
||||
computer
|
||||
var/name
|
||||
folder
|
||||
var/list/datum/computer/contents = list()
|
||||
/datum/computer
|
||||
var/name
|
||||
|
||||
file
|
||||
/datum/computer/folder
|
||||
var/list/datum/computer/contents = list()
|
||||
|
||||
/datum/computer/file
|
||||
|
||||
@@ -1,67 +1,87 @@
|
||||
/*
|
||||
/**
|
||||
* WARRANTY VOID IF CODE USED
|
||||
*/
|
||||
|
||||
// What??? Warranty? What warranty? I don't need no stinking warranty!
|
||||
|
||||
/datum/events
|
||||
var/list/events
|
||||
|
||||
New()
|
||||
..()
|
||||
events = new
|
||||
/datum/events/New()
|
||||
..()
|
||||
events = new
|
||||
|
||||
proc/addEventType(event_type as text)
|
||||
if(!(event_type in events) || !islist(events[event_type]))
|
||||
events[event_type] = list()
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
// Arguments: event_type as text, proc_holder as datum, proc_name as text
|
||||
// Returns: New event, null on error.
|
||||
proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
if(!event_type || !proc_holder || !proc_name)
|
||||
return
|
||||
addEventType(event_type)
|
||||
var/list/event = events[event_type]
|
||||
var/datum/event/E = new /datum/event(proc_holder,proc_name)
|
||||
event += E
|
||||
return E
|
||||
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
proc/fireEvent()
|
||||
//to_chat(world, "Events in [args[1]] called")
|
||||
var/list/event = SAFEACCESS(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(-1)
|
||||
for(var/datum/event/E in event)
|
||||
if(!E.Fire(arglist(args.Copy(2))))
|
||||
clearEvent(args[1],E)
|
||||
return
|
||||
|
||||
// Arguments: event_type as text, E as /datum/event
|
||||
// Returns: 1 if event cleared, null on error
|
||||
proc/clearEvent(event_type as text, datum/event/E)
|
||||
if(!event_type || !E)
|
||||
return
|
||||
var/list/event = SAFEACCESS(events, event_type)
|
||||
event -= E
|
||||
/datum/events/proc/addEventType(event_type as text)
|
||||
if(!(event_type in events) || !islist(events[event_type]))
|
||||
events[event_type] = list()
|
||||
return 1
|
||||
return
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
* * event_type - text
|
||||
* * proc_holder - datum
|
||||
* * proc_name - text
|
||||
*
|
||||
* Returns:
|
||||
* * New event
|
||||
* * null on error
|
||||
*/
|
||||
/datum/events/proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
if(!event_type || !proc_holder || !proc_name)
|
||||
return
|
||||
addEventType(event_type)
|
||||
var/list/event = events[event_type]
|
||||
var/datum/event/E = new /datum/event(proc_holder,proc_name)
|
||||
event += E
|
||||
return E
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
* * event_type - text
|
||||
* * any number of additional arguments to pass to event handler
|
||||
*
|
||||
* Returns:
|
||||
* * null
|
||||
*/
|
||||
/datum/events/proc/fireEvent()
|
||||
//to_chat(world, "Events in [args[1]] called")
|
||||
var/list/event = SAFEACCESS(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(-1)
|
||||
for(var/datum/event/E in event)
|
||||
if(!E.Fire(arglist(args.Copy(2))))
|
||||
clearEvent(args[1],E)
|
||||
return
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
* * event_type - text
|
||||
* * E - /datum/event
|
||||
*
|
||||
* Returns:
|
||||
* * 1 - if event cleared
|
||||
* * null - on error
|
||||
*/
|
||||
/datum/events/proc/clearEvent(event_type as text, datum/event/E)
|
||||
if(!event_type || !E)
|
||||
return
|
||||
var/list/event = SAFEACCESS(events, event_type)
|
||||
event -= E
|
||||
return 1
|
||||
|
||||
|
||||
/datum/event
|
||||
var/listener
|
||||
var/proc_name
|
||||
|
||||
New(tlistener,tprocname)
|
||||
listener = tlistener
|
||||
proc_name = tprocname
|
||||
return ..()
|
||||
/datum/event/New(tlistener,tprocname)
|
||||
listener = tlistener
|
||||
proc_name = tprocname
|
||||
return ..()
|
||||
|
||||
proc/Fire()
|
||||
//to_chat(world, "Event fired")
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
return 1
|
||||
return
|
||||
/datum/event/proc/Fire()
|
||||
//to_chat(world, "Event fired")
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
return 1
|
||||
return
|
||||
|
||||
@@ -1,56 +1,58 @@
|
||||
/*
|
||||
DO NOT USE THIS. THIS IS BEING DEPRECATED BY PROCESSING SUBSYSTEMS (controllers/subsystems/processing) AND TIMERS.
|
||||
*/
|
||||
/**
|
||||
*! DO NOT USE THIS. THIS IS BEING DEPRECATED BY PROCESSING SUBSYSTEMS (controllers/subsystems/processing) AND TIMERS.
|
||||
*/
|
||||
|
||||
/*
|
||||
README:
|
||||
/**
|
||||
*! README:
|
||||
*
|
||||
* The global_iterator datum is supposed to provide a simple and robust way to
|
||||
* create some constantly "looping" processes with ability to stop and restart them at will.
|
||||
* Generally, the only thing you want to play with (meaning, redefine) is the process() proc.
|
||||
* It must contain all the things you want done.
|
||||
*
|
||||
*! Control functions:
|
||||
*? new - used to create datum. First argument (optional) - var list(to use in process() proc) as list,
|
||||
|
||||
The global_iterator datum is supposed to provide a simple and robust way to
|
||||
create some constantly "looping" processes with ability to stop and restart them at will.
|
||||
Generally, the only thing you want to play with (meaning, redefine) is the process() proc.
|
||||
It must contain all the things you want done.
|
||||
|
||||
Control functions:
|
||||
new - used to create datum. First argument (optional) - var list(to use in process() proc) as list,
|
||||
second (optional) - autostart control.
|
||||
If autostart == TRUE, the loop will be started immediately after datum creation.
|
||||
|
||||
start(list/arguments) - starts the loop. Takes arguments(optional) as a list, which is then used
|
||||
by process() proc. Returns null if datum already active, 1 if loop started succesfully and 0 if there's
|
||||
an error in supplied arguments (not list or empty list).
|
||||
|
||||
stop() - stops the loop. Returns null if datum is already inactive and 1 on success.
|
||||
|
||||
set_delay(new_delay) - sets the delay between iterations. Pretty selfexplanatory.
|
||||
Returns 0 on error(new_delay is not numerical), 1 otherwise.
|
||||
|
||||
set_process_args(list/arguments) - passes the supplied arguments to the process() proc.
|
||||
|
||||
active() - Returns 1 if datum is active, 0 otherwise.
|
||||
|
||||
toggle() - toggles datum state. Returns new datum state (see active()).
|
||||
|
||||
Misc functions:
|
||||
|
||||
get_last_exec_time() - Returns the time of last iteration.
|
||||
|
||||
get_last_exec_time_as_text() - Returns the time of last iteration as text
|
||||
|
||||
|
||||
Control vars:
|
||||
|
||||
delay - delay between iterations
|
||||
|
||||
check_for_null - if equals TRUE, on each iteration the supplied arguments will be checked for nulls.
|
||||
If some varible equals null (and null only), the loop is stopped.
|
||||
Usefull, if some var unexpectedly becomes null - due to object deletion, for example.
|
||||
Of course, you can also check the variables inside process() proc to prevent runtime errors.
|
||||
|
||||
Data storage vars:
|
||||
|
||||
result - stores the value returned by process() proc
|
||||
*/
|
||||
*? second (optional) - autostart control.
|
||||
|
||||
*? If autostart == TRUE, the loop will be started immediately after datum creation.
|
||||
*
|
||||
*? start(list/arguments) - starts the loop. Takes arguments(optional) as a list, which is then used
|
||||
*? by process() proc. Returns null if datum already active, 1 if loop started succesfully and 0 if there's
|
||||
*? an error in supplied arguments (not list or empty list).
|
||||
*
|
||||
*
|
||||
*? stop() - stops the loop. Returns null if datum is already inactive and 1 on success.
|
||||
*
|
||||
*? set_delay(new_delay) - sets the delay between iterations. Pretty selfexplanatory.
|
||||
*? Returns 0 on error(new_delay is not numerical), 1 otherwise.
|
||||
*
|
||||
*? set_process_args(list/arguments) - passes the supplied arguments to the process() proc.
|
||||
*
|
||||
*? active() - Returns 1 if datum is active, 0 otherwise.
|
||||
*
|
||||
*? toggle() - toggles datum state. Returns new datum state (see active()).
|
||||
*
|
||||
*! Misc functions:
|
||||
*
|
||||
*? get_last_exec_time() - Returns the time of last iteration.
|
||||
*
|
||||
*? get_last_exec_time_as_text() - Returns the time of last iteration as text
|
||||
*
|
||||
*
|
||||
*! Control vars:
|
||||
*
|
||||
*? delay - delay between iterations
|
||||
*
|
||||
*? check_for_null - if equals TRUE, on each iteration the supplied arguments will be checked for nulls.
|
||||
*? If some varible equals null (and null only), the loop is stopped.
|
||||
*? Usefull, if some var unexpectedly becomes null - due to object deletion, for example.
|
||||
*? Of course, you can also check the variables inside process() proc to prevent runtime errors.
|
||||
*
|
||||
*! Data storage vars:
|
||||
*
|
||||
*? result - stores the value returned by process() proc
|
||||
*/
|
||||
/datum/global_iterator
|
||||
var/control_switch = 0
|
||||
var/delay = 10
|
||||
@@ -61,96 +63,95 @@ Data storage vars:
|
||||
var/result
|
||||
var/state = 0
|
||||
|
||||
New(list/arguments=null,autostart=1)
|
||||
delay = delay>0?(delay):1
|
||||
if(forbid_garbage) //prevents garbage collection with tag != null
|
||||
tag = "\ref[src]"
|
||||
set_process_args(arguments)
|
||||
if(autostart)
|
||||
INVOKE_ASYNC(src, .proc/start)
|
||||
return
|
||||
/datum/global_iterator/New(list/arguments = null, autostart = 1)
|
||||
delay = delay>0?(delay):1
|
||||
if(forbid_garbage) //prevents garbage collection with tag != null
|
||||
tag = "\ref[src]"
|
||||
set_process_args(arguments)
|
||||
if(autostart)
|
||||
INVOKE_ASYNC(src, .proc/start)
|
||||
return
|
||||
|
||||
proc/main()
|
||||
state = 1
|
||||
while(src && control_switch)
|
||||
last_exec = world.timeofday
|
||||
if(check_for_null && has_null_args())
|
||||
stop()
|
||||
/datum/global_iterator/proc/main()
|
||||
state = 1
|
||||
while(src && control_switch)
|
||||
last_exec = world.timeofday
|
||||
if(check_for_null && has_null_args())
|
||||
stop()
|
||||
return 0
|
||||
result = process(arglist(arg_list))
|
||||
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
|
||||
if(!control_switch)
|
||||
return 0
|
||||
result = process(arglist(arg_list))
|
||||
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
|
||||
if(!control_switch)
|
||||
return 0
|
||||
sleep(1)
|
||||
return 0
|
||||
|
||||
proc/start(list/arguments=null)
|
||||
if(active())
|
||||
return
|
||||
if(arguments)
|
||||
if(!set_process_args(arguments))
|
||||
return 0
|
||||
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
|
||||
return
|
||||
control_switch = 1
|
||||
spawn()
|
||||
state = main()
|
||||
return 1
|
||||
|
||||
proc/stop()
|
||||
if(!active())
|
||||
return
|
||||
control_switch = 0
|
||||
spawn(-1) //report termination error but don't wait for state_check().
|
||||
state_check()
|
||||
return 1
|
||||
|
||||
proc/state_check()
|
||||
var/lag = 0
|
||||
while(state)
|
||||
sleep(1)
|
||||
if(++lag>10)
|
||||
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
|
||||
return 0
|
||||
|
||||
/datum/global_iterator/proc/start(list/arguments = null)
|
||||
if(active())
|
||||
return
|
||||
if(arguments)
|
||||
if(!set_process_args(arguments))
|
||||
return 0
|
||||
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
|
||||
return
|
||||
control_switch = 1
|
||||
spawn()
|
||||
state = main()
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/proc/stop()
|
||||
if(!active())
|
||||
return
|
||||
control_switch = 0
|
||||
spawn(-1) //report termination error but don't wait for state_check().
|
||||
state_check()
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/proc/state_check()
|
||||
var/lag = 0
|
||||
while(state)
|
||||
sleep(1)
|
||||
if(++lag>10)
|
||||
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/proc/active()
|
||||
return control_switch
|
||||
|
||||
/datum/global_iterator/proc/has_null_args()
|
||||
if(null in arg_list)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/active()
|
||||
return control_switch
|
||||
|
||||
proc/has_null_args()
|
||||
if(null in arg_list)
|
||||
return 1
|
||||
/datum/global_iterator/proc/set_delay(new_delay)
|
||||
if(isnum(new_delay))
|
||||
delay = max(1, round(new_delay))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/global_iterator/proc/get_last_exec_time()
|
||||
return (last_exec||0)
|
||||
|
||||
proc/set_delay(new_delay)
|
||||
if(isnum(new_delay))
|
||||
delay = max(1, round(new_delay))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/datum/global_iterator/proc/get_last_exec_time_as_text()
|
||||
return (time2text(last_exec)||"Wasn't executed yet")
|
||||
|
||||
proc/get_last_exec_time()
|
||||
return (last_exec||0)
|
||||
/datum/global_iterator/proc/set_process_args(list/arguments)
|
||||
if(arguments && istype(arguments, /list) && arguments.len)
|
||||
arg_list = arguments
|
||||
return 1
|
||||
else
|
||||
// to_chat(world, "<span class='danger'>Invalid arguments supplied for [src.type], ref = \ref[src]</span>")
|
||||
return 0
|
||||
|
||||
proc/get_last_exec_time_as_text()
|
||||
return (time2text(last_exec)||"Wasn't executed yet")
|
||||
/datum/global_iterator/proc/toggle_null_checks()
|
||||
check_for_null = !check_for_null
|
||||
return check_for_null
|
||||
|
||||
proc/set_process_args(list/arguments)
|
||||
if(arguments && istype(arguments, /list) && arguments.len)
|
||||
arg_list = arguments
|
||||
return 1
|
||||
else
|
||||
// to_chat(world, "<span class='danger'>Invalid arguments supplied for [src.type], ref = \ref[src]</span>")
|
||||
return 0
|
||||
|
||||
proc/toggle_null_checks()
|
||||
check_for_null = !check_for_null
|
||||
return check_for_null
|
||||
|
||||
proc/toggle()
|
||||
if(!stop())
|
||||
start()
|
||||
return active()
|
||||
/datum/global_iterator/proc/toggle()
|
||||
if(!stop())
|
||||
start()
|
||||
return active()
|
||||
|
||||
/datum/global_iterator/Destroy()
|
||||
. = ..()
|
||||
|
||||
@@ -2,59 +2,59 @@
|
||||
var/href
|
||||
var/list/href_list
|
||||
|
||||
New(thref,list/thref_list)
|
||||
href = thref
|
||||
href_list = thref_list.Copy()
|
||||
return
|
||||
/datum/topic_input/New(thref,list/thref_list)
|
||||
href = thref
|
||||
href_list = thref_list.Copy()
|
||||
return
|
||||
|
||||
proc/get(i)
|
||||
return SAFEACCESS(href_list,i)
|
||||
/datum/topic_input/proc/get(i)
|
||||
return SAFEACCESS(href_list,i)
|
||||
|
||||
proc/getAndLocate(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = locate(t)
|
||||
return t || null
|
||||
/datum/topic_input/proc/getAndLocate(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = locate(t)
|
||||
return t || null
|
||||
|
||||
proc/getNum(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2num(t)
|
||||
return isnum(t) ? t : null
|
||||
/datum/topic_input/proc/getNum(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2num(t)
|
||||
return isnum(t) ? t : null
|
||||
|
||||
proc/getObj(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isobj(t) ? t : null
|
||||
/datum/topic_input/proc/getObj(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isobj(t) ? t : null
|
||||
|
||||
proc/getMob(i)
|
||||
var/t = getAndLocate(i)
|
||||
return ismob(t) ? t : null
|
||||
/datum/topic_input/proc/getMob(i)
|
||||
var/t = getAndLocate(i)
|
||||
return ismob(t) ? t : null
|
||||
|
||||
proc/getTurf(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isturf(t) ? t : null
|
||||
/datum/topic_input/proc/getTurf(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isturf(t) ? t : null
|
||||
|
||||
proc/getAtom(i)
|
||||
return getType(i,/atom)
|
||||
/datum/topic_input/proc/getAtom(i)
|
||||
return getType(i,/atom)
|
||||
|
||||
proc/getArea(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isarea(t) ? t : null
|
||||
/datum/topic_input/proc/getArea(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isarea(t) ? t : null
|
||||
|
||||
proc/getStr(i)//params should always be text, but...
|
||||
var/t = get(i)
|
||||
return istext(t) ? t : null
|
||||
/datum/topic_input/proc/getStr(i)//params should always be text, but...
|
||||
var/t = get(i)
|
||||
return istext(t) ? t : null
|
||||
|
||||
proc/getType(i,type)
|
||||
var/t = getAndLocate(i)
|
||||
return istype(t,type) ? t : null
|
||||
/datum/topic_input/proc/getType(i,type)
|
||||
var/t = getAndLocate(i)
|
||||
return istype(t,type) ? t : null
|
||||
|
||||
proc/getPath(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2path(t)
|
||||
return ispath(t) ? t : null
|
||||
/datum/topic_input/proc/getPath(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2path(t)
|
||||
return ispath(t) ? t : null
|
||||
|
||||
proc/getList(i)
|
||||
var/t = getAndLocate(i)
|
||||
return islist(t) ? t : null
|
||||
/datum/topic_input/proc/getList(i)
|
||||
var/t = getAndLocate(i)
|
||||
return islist(t) ? t : null
|
||||
|
||||
@@ -8,11 +8,14 @@
|
||||
* Categories *
|
||||
*************/
|
||||
/datum/category_group/underwear
|
||||
var/sort_order // Lower sort order is applied as icons first
|
||||
var/display_name // For displaying in text
|
||||
|
||||
/// Lower sort order is applied as icons first.
|
||||
var/sort_order
|
||||
/// For displaying in text.
|
||||
var/display_name
|
||||
var/gender = NEUTER
|
||||
|
||||
datum/category_group/underwear/dd_SortValue()
|
||||
/datum/category_group/underwear/dd_SortValue()
|
||||
return sort_order
|
||||
|
||||
/datum/category_group/underwear/top
|
||||
@@ -37,18 +40,23 @@ datum/category_group/underwear/dd_SortValue()
|
||||
/datum/category_group/underwear/undershirt
|
||||
name = "Undershirt"
|
||||
display_name = "undershirt"
|
||||
sort_order = 4 // Undershirts currently have the highest sort order because they may cover both underwear and socks.
|
||||
sort_order = 4 // Undershirts currently have the highest sort order because they may cover both underwear and socks.
|
||||
category_item_type = /datum/category_item/underwear/undershirt
|
||||
|
||||
/*******************
|
||||
* Category entries *
|
||||
*******************/
|
||||
/datum/category_item/underwear
|
||||
var/always_last = FALSE // Should this entry be sorte last?
|
||||
var/is_default = FALSE // Should this entry be considered the default for its type?
|
||||
var/icon = 'icons/mob/human.dmi' // Which icon to get the underwear from
|
||||
var/icon_state // And the particular item state
|
||||
var/list/tweaks = list() // Underwear customizations.
|
||||
/// Should this entry be sorte last?
|
||||
var/always_last = FALSE
|
||||
/// Should this entry be considered the default for its type?
|
||||
var/is_default = FALSE
|
||||
/// Which icon to get the underwear from.
|
||||
var/icon = 'icons/mob/human.dmi'
|
||||
/// And the particular item state.
|
||||
var/icon_state
|
||||
/// Underwear customizations.
|
||||
var/list/tweaks = list()
|
||||
var/has_color = FALSE
|
||||
|
||||
/datum/category_item/underwear/New()
|
||||
@@ -60,10 +68,10 @@ datum/category_group/underwear/dd_SortValue()
|
||||
return "~"+name
|
||||
return name
|
||||
|
||||
/datum/category_item/underwear/proc/is_default(var/gender)
|
||||
/datum/category_item/underwear/proc/is_default(gender)
|
||||
return is_default
|
||||
|
||||
/datum/category_item/underwear/proc/generate_image(var/list/metadata, var/layer = FLOAT_LAYER)
|
||||
/datum/category_item/underwear/proc/generate_image(list/metadata, layer = FLOAT_LAYER)
|
||||
if(!icon_state)
|
||||
return
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
/datum/uplink_category/proc/can_view(obj/item/uplink/U)
|
||||
for(var/datum/uplink_item/item in items)
|
||||
if(item.can_view(U))
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
datum/uplink_category/ammunition
|
||||
/datum/uplink_category/ammunition
|
||||
name = "Ammunition"
|
||||
|
||||
/datum/uplink_category/services
|
||||
|
||||
@@ -5,7 +5,7 @@ var/datum/uplink/uplink = new()
|
||||
var/list/datum/uplink_item/items
|
||||
var/list/datum/uplink_category/categories
|
||||
|
||||
/datum/uplink/New(var/type)
|
||||
/datum/uplink/New(type)
|
||||
items_assoc = list()
|
||||
items = init_subtypes(/datum/uplink_item)
|
||||
categories = init_subtypes(/datum/uplink_category)
|
||||
@@ -29,8 +29,10 @@ var/datum/uplink/uplink = new()
|
||||
var/name
|
||||
var/desc
|
||||
var/item_cost = 0
|
||||
var/datum/uplink_category/category // Item category
|
||||
var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all.
|
||||
/// Item category.
|
||||
var/datum/uplink_category/category
|
||||
/// Antag roles this item is displayed to. If empty, display to all.
|
||||
var/list/datum/antagonist/antag_roles
|
||||
var/blacklisted = 0
|
||||
|
||||
/datum/uplink_item/item
|
||||
@@ -43,7 +45,7 @@ var/datum/uplink/uplink = new()
|
||||
|
||||
|
||||
|
||||
/datum/uplink_item/proc/buy(var/obj/item/uplink/U, var/mob/user)
|
||||
/datum/uplink_item/proc/buy(obj/item/uplink/U, mob/user)
|
||||
var/extra_args = extra_args(user)
|
||||
if(!extra_args)
|
||||
return
|
||||
@@ -65,8 +67,8 @@ var/datum/uplink/uplink = new()
|
||||
U.used_TC += cost
|
||||
return goods
|
||||
|
||||
// Any additional arguments you wish to send to the get_goods
|
||||
/datum/uplink_item/proc/extra_args(var/mob/user)
|
||||
/// Any additional arguments you wish to send to the get_goods.
|
||||
/datum/uplink_item/proc/extra_args(mob/user)
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/proc/can_buy(obj/item/uplink/U)
|
||||
@@ -91,7 +93,7 @@ var/datum/uplink/uplink = new()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/uplink_item/proc/cost(var/telecrystals, obj/item/uplink/U)
|
||||
/datum/uplink_item/proc/cost(telecrystals, obj/item/uplink/U)
|
||||
. = item_cost
|
||||
if(U)
|
||||
. = U.get_item_cost(src, .)
|
||||
@@ -99,8 +101,8 @@ var/datum/uplink/uplink = new()
|
||||
/datum/uplink_item/proc/description()
|
||||
return desc
|
||||
|
||||
// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying
|
||||
/datum/uplink_item/proc/get_goods(var/obj/item/uplink/U, var/loc)
|
||||
/// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying.
|
||||
/datum/uplink_item/proc/get_goods(obj/item/uplink/U, loc)
|
||||
return 0
|
||||
|
||||
/datum/uplink_item/proc/log_icon()
|
||||
@@ -111,7 +113,7 @@ var/datum/uplink/uplink = new()
|
||||
log_and_message_admins("used \the [U.loc] to buy \a [src]")
|
||||
U.purchase_log[src] = U.purchase_log[src] + 1
|
||||
|
||||
datum/uplink_item/dd_SortValue()
|
||||
/datum/uplink_item/dd_SortValue()
|
||||
return cost(INFINITY)
|
||||
|
||||
/********************************
|
||||
@@ -119,7 +121,7 @@ datum/uplink_item/dd_SortValue()
|
||||
* Physical Uplink Entries *
|
||||
* *
|
||||
********************************/
|
||||
/datum/uplink_item/item/buy(var/obj/item/uplink/U, var/mob/user)
|
||||
/datum/uplink_item/item/buy(obj/item/uplink/U, mob/user)
|
||||
var/obj/item/I = ..()
|
||||
if(!I)
|
||||
return
|
||||
@@ -133,7 +135,7 @@ datum/uplink_item/dd_SortValue()
|
||||
A.put_in_hands(I)
|
||||
return I
|
||||
|
||||
/datum/uplink_item/item/get_goods(var/obj/item/uplink/U, var/loc)
|
||||
/datum/uplink_item/item/get_goods(obj/item/uplink/U, loc)
|
||||
var/obj/item/I = new path(loc)
|
||||
return I
|
||||
|
||||
@@ -165,7 +167,7 @@ datum/uplink_item/dd_SortValue()
|
||||
/****************
|
||||
* Support procs *
|
||||
****************/
|
||||
/proc/get_random_uplink_items(var/obj/item/uplink/U, var/remaining_TC, var/loc)
|
||||
/proc/get_random_uplink_items(obj/item/uplink/U, remaining_TC, loc)
|
||||
var/list/bought_items = list()
|
||||
while(remaining_TC)
|
||||
var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items)
|
||||
@@ -176,7 +178,7 @@ datum/uplink_item/dd_SortValue()
|
||||
|
||||
return bought_items
|
||||
|
||||
/proc/get_surplus_items(var/obj/item/uplink/U, var/remaining_TC, var/loc)
|
||||
/proc/get_surplus_items(obj/item/uplink/U, remaining_TC, loc)
|
||||
var/list/bought_items = list()
|
||||
var/override = 1
|
||||
while(remaining_TC)
|
||||
|
||||
@@ -1,132 +1,153 @@
|
||||
// This system defines news that will be displayed in the course of a round.
|
||||
// Uses BYOND's type system to put everything into a nice format
|
||||
|
||||
/**
|
||||
* This system defines news that will be displayed in the course of a round.
|
||||
* Uses BYOND's type system to put everything into a nice format.
|
||||
*/
|
||||
/datum/news_announcement
|
||||
var
|
||||
round_time // time of the round at which this should be announced, in seconds
|
||||
message // body of the message
|
||||
author = "NanoTrasen Editor"
|
||||
can_be_redacted = 0
|
||||
message_type = "Story"
|
||||
channel_name = null
|
||||
|
||||
New() // I'm sorry...
|
||||
..()
|
||||
channel_name = "The [GLOB.using_map.starsys_name] Times"
|
||||
/// Time of the round at which this should be announced, in seconds.
|
||||
var/round_time
|
||||
/// Body of the message.
|
||||
var/message
|
||||
var/author = "NanoTrasen Editor"
|
||||
var/can_be_redacted = 0
|
||||
var/message_type = "Story"
|
||||
var/channel_name = null
|
||||
|
||||
revolution_inciting_event
|
||||
/datum/news_announcement/New() // I'm sorry...
|
||||
..()
|
||||
channel_name = "The [GLOB.using_map.starsys_name] Times"
|
||||
|
||||
paycuts_suspicion
|
||||
round_time = 60*10
|
||||
message = {"Reports have leaked that NanoTrasen is planning to put paycuts into
|
||||
effect on many of its Research Stations in Tau Ceti. Apparently these research
|
||||
stations haven't been able to yield the expected revenue, and thus adjustments
|
||||
have to be made."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/revolution_inciting_event/paycuts_suspicion
|
||||
round_time = 60*10
|
||||
author = "Unauthorized"
|
||||
message = {"
|
||||
Reports have leaked that NanoTrasen is planning to put paycuts into
|
||||
effect on many of its Research Stations in Tau Ceti. Apparently these research
|
||||
stations haven't been able to yield the expected revenue, and thus adjustments
|
||||
have to be made.
|
||||
"}
|
||||
|
||||
paycuts_confirmation
|
||||
round_time = 60*40
|
||||
message = {"Earlier rumours about paycuts on Research Stations in the Tau Ceti system have
|
||||
been confirmed. Shockingly, however, the cuts will only affect lower tier
|
||||
personnel. Heads of Staff will, according to our sources, not be affected."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/revolution_inciting_event/paycuts_confirmation
|
||||
round_time = 60*40
|
||||
author = "Unauthorized"
|
||||
message = {"
|
||||
Earlier rumours about paycuts on Research Stations in the Tau Ceti system have
|
||||
been confirmed. Shockingly, however, the cuts will only affect lower tier
|
||||
personnel. Heads of Staff will, according to our sources, not be affected.
|
||||
"}
|
||||
|
||||
human_experiments
|
||||
round_time = 60*90
|
||||
message = {"Unbelievable reports about human experimentation have reached our ears. According
|
||||
to a refugee from one of the Tau Ceti Research Stations, their station, in order
|
||||
to increase revenue, has refactored several of their facilities to perform experiments
|
||||
on live humans, including virology research, genetic manipulation, and \"feeding them
|
||||
to the slimes to see what happens\". Allegedly, these test subjects were neither
|
||||
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
|
||||
the experiments, and reported to have died in a \"work accident\" by NanoTrasen."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/revolution_inciting_event/human_experiments
|
||||
round_time = 60*90
|
||||
author = "Unauthorized"
|
||||
message = {"
|
||||
Unbelievable reports about human experimentation have reached our ears. According
|
||||
to a refugee from one of the Tau Ceti Research Stations, their station, in order
|
||||
to increase revenue, has refactored several of their facilities to perform experiments
|
||||
on live humans, including virology research, genetic manipulation, and \"feeding them
|
||||
to the slimes to see what happens\". Allegedly, these test subjects were neither
|
||||
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
|
||||
the experiments, and reported to have died in a \"work accident\" by NanoTrasen.
|
||||
"}
|
||||
|
||||
bluespace_research
|
||||
|
||||
announcement
|
||||
round_time = 60*20
|
||||
message = {"The new field of research trying to explain several interesting spacetime oddities,
|
||||
also known as \"Bluespace Research\", has reached new heights. Of the several
|
||||
hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped
|
||||
to experiment with and research Bluespace effects. Rumours have it some of these
|
||||
stations even sport functional \"travel gates\" that can instantly move a whole research
|
||||
team to an alternate reality."}
|
||||
/datum/news_announcement/bluespace_research/announcement
|
||||
round_time = 60*20
|
||||
message = {"
|
||||
The new field of research trying to explain several interesting spacetime oddities,
|
||||
also known as \"Bluespace Research\", has reached new heights. Of the several
|
||||
hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped
|
||||
to experiment with and research Bluespace effects. Rumours have it some of these
|
||||
stations even sport functional \"travel gates\" that can instantly move a whole research
|
||||
team to an alternate reality.
|
||||
"}
|
||||
|
||||
random_junk
|
||||
|
||||
cheesy_honkers
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Do cheesy honkers increase risk of having a miscarriage? Several health administrations
|
||||
say so!"}
|
||||
round_time = 60 * 15
|
||||
/datum/news_announcement/random_junk/cheesy_honkers
|
||||
round_time = 60 * 15
|
||||
|
||||
net_block
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Several corporations banding together to block access to 'wetskrell.nt', site administrators
|
||||
claiming violation of net laws."}
|
||||
round_time = 60 * 50
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"
|
||||
Do cheesy honkers increase risk of having a miscarriage? Several health administrations say so!
|
||||
"}
|
||||
|
||||
found_ssd
|
||||
author = "Doctor Eric Hanfield"
|
||||
/datum/news_announcement/random_junk/net_block
|
||||
round_time = 60 * 50
|
||||
|
||||
message = {"Several people have been found unconscious at their terminals. It is thought that it was due
|
||||
to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage
|
||||
reveals that many of them were playing games instead of working and their pay has been docked
|
||||
accordingly."}
|
||||
round_time = 60 * 90
|
||||
channel_name = "The Gibson Gazette"
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
message = {"
|
||||
Several corporations banding together to block access to 'wetskrell.nt', site administrators
|
||||
claiming violation of net laws.
|
||||
"}
|
||||
|
||||
lotus_tree
|
||||
/datum/news_announcement/random_junk/found_ssd
|
||||
round_time = 60 * 90
|
||||
|
||||
explosions
|
||||
author = "Reporter Leland H. Howards"
|
||||
author = "Doctor Eric Hanfield"
|
||||
message = {"
|
||||
Several people have been found unconscious at their terminals. It is thought that it was due
|
||||
to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage
|
||||
reveals that many of them were playing games instead of working and their pay has been docked
|
||||
accordingly.
|
||||
"}
|
||||
|
||||
message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
|
||||
bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of
|
||||
the explosions remain unknown, but there is speculation that it might have something to do with
|
||||
the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L
|
||||
announced that they were officially acknowledging inter-species marriage and providing couples
|
||||
with marriage tax-benefits."}
|
||||
round_time = 60 * 30
|
||||
|
||||
food_riots
|
||||
/datum/news_announcement/lotus_tree/explosions
|
||||
round_time = 60 * 30
|
||||
|
||||
breaking_news
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
|
||||
Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the
|
||||
colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to
|
||||
continue. NanoTrasen officials have not given any details about said factions. More on that at the top of
|
||||
the hour."}
|
||||
round_time = 60 * 10
|
||||
author = "Reporter Leland H. Howards"
|
||||
message = {"
|
||||
The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
|
||||
bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of
|
||||
the explosions remain unknown, but there is speculation that it might have something to do with
|
||||
the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L
|
||||
announced that they were officially acknowledging inter-species marriage and providing couples
|
||||
with marriage tax-benefits.
|
||||
"}
|
||||
|
||||
more
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
message = {"More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from
|
||||
the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason
|
||||
NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Phoron deposits have been completely mined out.
|
||||
We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them
|
||||
\"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell
|
||||
the riots. More on this at 6."}
|
||||
round_time = 60 * 60
|
||||
|
||||
|
||||
/datum/news_announcement/food_riots/breaking_news
|
||||
round_time = 60 * 10
|
||||
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
message = {"
|
||||
Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
|
||||
Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the
|
||||
colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to
|
||||
continue. NanoTrasen officials have not given any details about said factions. More on that at the top of
|
||||
the hour.
|
||||
"}
|
||||
|
||||
/datum/news_announcement/food_riots/more
|
||||
round_time = 60 * 60
|
||||
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
message = {"
|
||||
More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from
|
||||
the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason
|
||||
NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Phoron deposits have been completely mined out.
|
||||
We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them
|
||||
\"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell
|
||||
the riots. More on this at 6.
|
||||
"}
|
||||
|
||||
|
||||
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots)
|
||||
|
||||
proc/process_newscaster()
|
||||
/proc/process_newscaster()
|
||||
check_for_newscaster_updates(SSticker.mode.newscaster_announcements)
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
proc/check_for_newscaster_updates(type)
|
||||
/var/global/tmp/announced_news_types = list()
|
||||
/proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in typesof(type)-type)
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
announce_newscaster_news(news)
|
||||
|
||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
/proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
var/datum/feed_channel/sendto
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == news.channel_name)
|
||||
|
||||
@@ -1,104 +1,106 @@
|
||||
|
||||
/*
|
||||
A Star pathfinding algorithm
|
||||
Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of
|
||||
windows along the route into account.
|
||||
Use:
|
||||
your_list = AStar(start location, end location, adjacent turf proc, distance proc)
|
||||
For the adjacent turf proc i wrote:
|
||||
/turf/proc/AdjacentTurfs
|
||||
And for the distance one i wrote:
|
||||
/turf/proc/Distance
|
||||
So an example use might be:
|
||||
|
||||
src.path_list = AStar(src.loc, target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance)
|
||||
|
||||
Note: The path is returned starting at the END node, so i wrote reverselist to reverse it for ease of use.
|
||||
|
||||
src.path_list = reverselist(src.pathlist)
|
||||
|
||||
Then to start on the path, all you need to do it:
|
||||
Step_to(src, src.path_list[1])
|
||||
src.path_list -= src.path_list[1] or equivilent to remove that node from the list.
|
||||
|
||||
Optional extras to add on (in order):
|
||||
MaxNodes: The maximum number of nodes the returned path can be (0 = infinite)
|
||||
Maxnodedepth: The maximum number of nodes to search (default: 30, 0 = infinite)
|
||||
Mintargetdist: Minimum distance to the target before path returns, could be used to get
|
||||
near a target, but not right to it - for an AI mob with a gun, for example.
|
||||
Minnodedist: Minimum number of nodes to return in the path, could be used to give a path a minimum
|
||||
length to avoid portals or something i guess?? Not that they're counted right now but w/e.
|
||||
*/
|
||||
/**
|
||||
* A Star pathfinding algorithm
|
||||
*
|
||||
* Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of
|
||||
* windows along the route into account.
|
||||
*
|
||||
*
|
||||
* Use:
|
||||
* your_list = AStar(start location, end location, adjacent turf proc, distance proc)
|
||||
* For the adjacent turf proc i wrote:
|
||||
* /turf/proc/AdjacentTurfs
|
||||
* And for the distance one i wrote:
|
||||
* /turf/proc/Distance
|
||||
*
|
||||
* So an example use might be:
|
||||
*
|
||||
* src.path_list = AStar(src.loc, target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance)
|
||||
*
|
||||
* Note: The path is returned starting at the END node, so i wrote reverselist to reverse it for ease of use.
|
||||
*
|
||||
* src.path_list = reverselist(src.pathlist)
|
||||
*
|
||||
* Then to start on the path, all you need to do it:
|
||||
* Step_to(src, src.path_list[1])
|
||||
* src.path_list -= src.path_list[1] or equivilent to remove that node from the list.
|
||||
*
|
||||
* Optional extras to add on (in order):
|
||||
* MaxNodes: The maximum number of nodes the returned path can be (0 = infinite)
|
||||
* Maxnodedepth: The maximum number of nodes to search (default: 30, 0 = infinite)
|
||||
* Mintargetdist: Minimum distance to the target before path returns, could be used to get
|
||||
* near a target, but not right to it - for an AI mob with a gun, for example.
|
||||
* Minnodedist: Minimum number of nodes to return in the path, could be used to give a path a minimum
|
||||
* length to avoid portals or something i guess?? Not that they're counted right now but w/e.
|
||||
*/
|
||||
|
||||
// Modified to provide ID argument - supplied to 'adjacent' proc, defaults to null
|
||||
// Used for checking if route exists through a door which can be opened
|
||||
|
||||
// Also added 'exclude' turf to avoid travelling over; defaults to null
|
||||
|
||||
|
||||
PriorityQueue
|
||||
/PriorityQueue
|
||||
var/list/queue
|
||||
var/comparison_function
|
||||
|
||||
New(compare)
|
||||
queue = list()
|
||||
comparison_function = compare
|
||||
/PriorityQueue/New(compare)
|
||||
queue = list()
|
||||
comparison_function = compare
|
||||
|
||||
proc/IsEmpty()
|
||||
return !queue.len
|
||||
/PriorityQueue/proc/IsEmpty()
|
||||
return !queue.len
|
||||
|
||||
proc/Enqueue(var/data)
|
||||
queue.Add(data)
|
||||
var/index = queue.len
|
||||
/PriorityQueue/proc/Enqueue(data)
|
||||
queue.Add(data)
|
||||
var/index = queue.len
|
||||
|
||||
//From what I can tell, this automagically sorts the added data into the correct location.
|
||||
while(index > 2 && call(comparison_function)(queue[index / 2], queue[index]) > 0)
|
||||
queue.Swap(index, index / 2)
|
||||
index /= 2
|
||||
//From what I can tell, this automagically sorts the added data into the correct location.
|
||||
while(index > 2 && call(comparison_function)(queue[index / 2], queue[index]) > 0)
|
||||
queue.Swap(index, index / 2)
|
||||
index /= 2
|
||||
|
||||
proc/Dequeue()
|
||||
if(!queue.len)
|
||||
return 0
|
||||
return Remove(1)
|
||||
/PriorityQueue/proc/Dequeue()
|
||||
if(!queue.len)
|
||||
return 0
|
||||
return Remove(1)
|
||||
|
||||
proc/Remove(var/index)
|
||||
if(index > queue.len)
|
||||
return 0
|
||||
/PriorityQueue/proc/Remove(index)
|
||||
if(index > queue.len)
|
||||
return 0
|
||||
|
||||
var/thing = queue[index]
|
||||
queue.Swap(index, queue.len)
|
||||
queue.Cut(queue.len)
|
||||
if(index < queue.len)
|
||||
FixQueue(index)
|
||||
return thing
|
||||
var/thing = queue[index]
|
||||
queue.Swap(index, queue.len)
|
||||
queue.Cut(queue.len)
|
||||
if(index < queue.len)
|
||||
FixQueue(index)
|
||||
return thing
|
||||
|
||||
proc/FixQueue(var/index)
|
||||
var/child = 2 * index
|
||||
var/item = queue[index]
|
||||
/PriorityQueue/proc/FixQueue(index)
|
||||
var/child = 2 * index
|
||||
var/item = queue[index]
|
||||
|
||||
while(child <= queue.len)
|
||||
if(child < queue.len && call(comparison_function)(queue[child], queue[child + 1]) > 0)
|
||||
child++
|
||||
if(call(comparison_function)(item, queue[child]) > 0)
|
||||
queue[index] = queue[child]
|
||||
index = child
|
||||
else
|
||||
break
|
||||
child = 2 * index
|
||||
queue[index] = item
|
||||
while(child <= queue.len)
|
||||
if(child < queue.len && call(comparison_function)(queue[child], queue[child + 1]) > 0)
|
||||
child++
|
||||
if(call(comparison_function)(item, queue[child]) > 0)
|
||||
queue[index] = queue[child]
|
||||
index = child
|
||||
else
|
||||
break
|
||||
child = 2 * index
|
||||
queue[index] = item
|
||||
|
||||
proc/List()
|
||||
return queue.Copy()
|
||||
/PriorityQueue/proc/List()
|
||||
return queue.Copy()
|
||||
|
||||
proc/Length()
|
||||
return queue.len
|
||||
/PriorityQueue/proc/Length()
|
||||
return queue.len
|
||||
|
||||
proc/RemoveItem(data)
|
||||
var/index = queue.Find(data)
|
||||
if(index)
|
||||
return Remove(index)
|
||||
/PriorityQueue/proc/RemoveItem(data)
|
||||
var/index = queue.Find(data)
|
||||
if(index)
|
||||
return Remove(index)
|
||||
|
||||
PathNode
|
||||
/PathNode
|
||||
var/datum/position
|
||||
var/PathNode/previous_node
|
||||
|
||||
@@ -108,21 +110,21 @@ PathNode
|
||||
var/cost
|
||||
var/nodes_traversed
|
||||
|
||||
New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
position = _position
|
||||
previous_node = _previous_node
|
||||
/PathNode/New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
position = _position
|
||||
previous_node = _previous_node
|
||||
|
||||
known_cost = _known_cost
|
||||
cost = _cost
|
||||
estimated_cost = cost + known_cost
|
||||
known_cost = _known_cost
|
||||
cost = _cost
|
||||
estimated_cost = cost + known_cost
|
||||
|
||||
best_estimated_cost = estimated_cost
|
||||
nodes_traversed = _nodes_traversed
|
||||
best_estimated_cost = estimated_cost
|
||||
nodes_traversed = _nodes_traversed
|
||||
|
||||
/proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
return a.estimated_cost - b.estimated_cost
|
||||
|
||||
/proc/AStar(var/start, var/end, var/adjacent, var/dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
|
||||
/proc/AStar(start, end, adjacent, dist, max_nodes, max_node_depth = 30, min_target_dist = 0, min_node_dist, id, datum/exclude)
|
||||
var/PriorityQueue/open = new /PriorityQueue(/proc/PathWeightCompare)
|
||||
var/list/closed = list()
|
||||
var/list/path
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(source, frequency)
|
||||
|
||||
/proc/get_frequency_name(var/display_freq)
|
||||
/proc/get_frequency_name(display_freq)
|
||||
var/freq_text
|
||||
|
||||
// the name of the channel
|
||||
@@ -48,20 +48,20 @@
|
||||
return MS
|
||||
return null
|
||||
|
||||
/proc/check_signal(var/datum/signal/signal)
|
||||
/proc/check_signal(datum/signal/signal)
|
||||
return signal && signal.data["done"]
|
||||
|
||||
/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal)
|
||||
/proc/get_sender_reception(atom/sender, datum/signal/signal)
|
||||
return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
|
||||
/proc/get_receiver_reception(receiver, datum/signal/signal)
|
||||
if(receiver && check_signal(signal))
|
||||
var/turf/pos = get_turf(receiver)
|
||||
if(pos && (pos.z in signal.data["level"]))
|
||||
return TELECOMMS_RECEPTION_RECEIVER
|
||||
return TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_reception(var/atom/sender, var/receiver, var/message = "", var/do_sleep = 1)
|
||||
/proc/get_reception(atom/sender, receiver, message = "", do_sleep = 1)
|
||||
var/datum/reception/reception = new
|
||||
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
return reception
|
||||
|
||||
/proc/get_receptions(var/atom/sender, var/list/atom/receivers, var/do_sleep = 1)
|
||||
/proc/get_receptions(atom/sender, list/atom/receivers, do_sleep = 1)
|
||||
var/datum/receptions/receptions = new
|
||||
receptions.message_server = get_message_server()
|
||||
|
||||
|
||||
@@ -1,64 +1,65 @@
|
||||
/* sd_Alert library
|
||||
by Shadowdarke (shadowdarke@byond.com)
|
||||
|
||||
sd_Alert() is a powerful and flexible alternative to the built in BYOND
|
||||
alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
|
||||
appearance, and even the option to popup without stealing keyboard focus
|
||||
from the map or command line.
|
||||
|
||||
Please see demo.dm for detailed examples.
|
||||
|
||||
FORMAT
|
||||
sd_Alert(who, message, title, buttons, default, duration, unfocus, \
|
||||
size, table, style, tag, select, flags)
|
||||
|
||||
ARGUMENTS
|
||||
who - the client or mob to display the alert to.
|
||||
message - text message to display
|
||||
title - title of the alert box
|
||||
buttons - list of buttons
|
||||
Default Value: list("Ok")
|
||||
default - default button selestion
|
||||
Default Value: the first button in the list
|
||||
duration - the number of ticks before this alert expires. If not
|
||||
set, the alert lasts until a button is clicked.
|
||||
Default Value: 0 (unlimited)
|
||||
unfocus - if this value is set, the popup will not steal keyboard
|
||||
focus from the map or command line.
|
||||
Default Value: 1 (do not take focus)
|
||||
size - size of the popup window in px
|
||||
Default Value: "300x200"
|
||||
table - optional parameters for the HTML table in the alert
|
||||
Default Value: "width=100% height=100%" (fill the window)
|
||||
style - optional style sheet information
|
||||
tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
|
||||
externally. (i.e. force the alert to close, change options and redisplay,
|
||||
reuse the same window, etc.)
|
||||
select - if set, the buttons will be replaced with a selection box with a number of
|
||||
lines displayed equal to this value.
|
||||
Default value: 0 (use buttons)
|
||||
flags - optional flags effecting the alert display. These flags may be ORed (|)
|
||||
together for multiple effects.
|
||||
SD_ALERT_SCROLL = display a scrollbar
|
||||
SD_ALERT_SELECT_MULTI = forces selection box display (instead of
|
||||
buttons) allows the user to select multiple
|
||||
choices.
|
||||
SD_ALERT_LINKS = display each choice as a plain text link.
|
||||
Any selection box style overrides this flag.
|
||||
SD_ALERT_NOVALIDATE = don't validate responses
|
||||
Default value: SD_ALERT_SCROLL
|
||||
(button display with scroll bar, validate responses)
|
||||
RETURNS
|
||||
The text of the selected button, or null if the alert duration expired
|
||||
without a button click.
|
||||
|
||||
Version 1 changes (from version 0):
|
||||
* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
|
||||
* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
|
||||
customization by developers. Primarily developers would want to use Display() to change
|
||||
the display of active tagged windows
|
||||
|
||||
*/
|
||||
/**
|
||||
*! sd_Alert library
|
||||
*! by Shadowdarke (shadowdarke@byond.com)
|
||||
*
|
||||
* sd_Alert() is a powerful and flexible alternative to the built in BYOND
|
||||
* alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
|
||||
* appearance, and even the option to popup without stealing keyboard focus
|
||||
* from the map or command line.
|
||||
*
|
||||
* Please see demo.dm for detailed examples.
|
||||
*
|
||||
* FORMAT
|
||||
* sd_Alert(who, message, title, buttons, default, duration, unfocus, \
|
||||
* size, table, style, tag, select, flags)
|
||||
*
|
||||
* ARGUMENTS
|
||||
* who - the client or mob to display the alert to.
|
||||
* message - text message to display
|
||||
* title - title of the alert box
|
||||
* buttons - list of buttons
|
||||
* Default Value: list("Ok")
|
||||
* default - default button selestion
|
||||
* Default Value: the first button in the list
|
||||
* duration - the number of ticks before this alert expires. If not
|
||||
* set, the alert lasts until a button is clicked.
|
||||
* Default Value: 0 (unlimited)
|
||||
* unfocus - if this value is set, the popup will not steal keyboard
|
||||
* focus from the map or command line.
|
||||
* Default Value: 1 (do not take focus)
|
||||
* size - size of the popup window in px
|
||||
* Default Value: "300x200"
|
||||
* table - optional parameters for the HTML table in the alert
|
||||
* Default Value: "width=100% height=100%" (fill the window)
|
||||
* style - optional style sheet information
|
||||
* tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
|
||||
* externally. (i.e. force the alert to close, change options and redisplay,
|
||||
* reuse the same window, etc.)
|
||||
* select - if set, the buttons will be replaced with a selection box with a number of
|
||||
* lines displayed equal to this value.
|
||||
* Default value: 0 (use buttons)
|
||||
* flags - optional flags effecting the alert display. These flags may be ORed (|)
|
||||
* together for multiple effects.
|
||||
* SD_ALERT_SCROLL = display a scrollbar
|
||||
* SD_ALERT_SELECT_MULTI = forces selection box display (instead of
|
||||
* buttons) allows the user to select multiple
|
||||
* choices.
|
||||
* SD_ALERT_LINKS = display each choice as a plain text link.
|
||||
* Any selection box style overrides this flag.
|
||||
* SD_ALERT_NOVALIDATE = don't validate responses
|
||||
* Default value: SD_ALERT_SCROLL
|
||||
* (button display with scroll bar, validate responses)
|
||||
* RETURNS
|
||||
* The text of the selected button, or null if the alert duration expired
|
||||
* without a button click.
|
||||
*
|
||||
* Version 1 changes (from version 0):
|
||||
* * Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
|
||||
* * Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
|
||||
* customization by developers. Primarily developers would want to use Display() to change
|
||||
* the display of active tagged windows
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define SD_ALERT_SCROLL 1
|
||||
@@ -66,7 +67,7 @@ Version 1 changes (from version 0):
|
||||
#define SD_ALERT_LINKS 4
|
||||
#define SD_ALERT_NOVALIDATE 8
|
||||
|
||||
proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
/proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
default, duration = 0, unfocus = 1, size = "300x200", \
|
||||
table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
|
||||
|
||||
@@ -87,82 +88,93 @@ proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
|
||||
sd_alert
|
||||
var
|
||||
client/target
|
||||
response
|
||||
list/validation
|
||||
/sd_alert
|
||||
var/client/target
|
||||
var/response
|
||||
var/list/validation
|
||||
|
||||
Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
/sd_alert/Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
|
||||
New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
/sd_alert/New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
|
||||
Topic(href,params[])
|
||||
if(usr.client != target) return
|
||||
response = params["clk"]
|
||||
/sd_alert/Topic(href,params[])
|
||||
if(usr.client != target)
|
||||
return
|
||||
response = params["clk"]
|
||||
|
||||
proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
|
||||
if(unfocus) spawn() target << browse(null,null)
|
||||
if(istext(buttons)) buttons = list(buttons)
|
||||
if(!default) default = buttons[1]
|
||||
if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
|
||||
/sd_alert/proc/Display(message, title, list/buttons, default, unfocus, size, table, style, select, flags)
|
||||
if (unfocus)
|
||||
spawn() target << browse(null,null)
|
||||
if (istext(buttons))
|
||||
buttons = list(buttons)
|
||||
if (!default)
|
||||
default = buttons[1]
|
||||
if (!(flags & SD_ALERT_NOVALIDATE))
|
||||
validation = buttons.Copy()
|
||||
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
|
||||
if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
if (select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default)
|
||||
focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default)
|
||||
focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
|
||||
html += "</th></tr></table></body>"
|
||||
html += "</th></tr></table></body>"
|
||||
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
|
||||
proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
/sd_alert/proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len) response = null
|
||||
else validated = 1
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len)
|
||||
response = null
|
||||
else
|
||||
validated = 1
|
||||
else if(response in validation)
|
||||
validated = 1
|
||||
else
|
||||
response=null
|
||||
else
|
||||
validated = 1
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
proc/sql_poll_population()
|
||||
/proc/sql_poll_population()
|
||||
var/admincount = admins.len
|
||||
var/playercount = 0
|
||||
for(var/mob/M in player_list)
|
||||
@@ -12,7 +12,7 @@ proc/sql_poll_population()
|
||||
"INSERT INTO [format_table_name("population")] (playercount, admincount, time) VALUES (:pc, :ac, NOW())",
|
||||
list(
|
||||
"pc" = sanitizeSQL(playercount),
|
||||
"ac" = sanitizeSQL(admincount)
|
||||
"ac" = sanitizeSQL(admincount),
|
||||
)
|
||||
)
|
||||
if(!query.Execute())
|
||||
@@ -20,7 +20,7 @@ proc/sql_poll_population()
|
||||
log_game("SQL ERROR during population polling. Error : \[[err]\]\n")
|
||||
qdel(query)
|
||||
|
||||
proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
/proc/sql_report_death(mob/living/carbon/human/H)
|
||||
if(!H)
|
||||
return
|
||||
if(!H.key || !H.mind)
|
||||
@@ -64,7 +64,7 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
"fireloss" = H.getFireLoss(),
|
||||
"brainloss" = H.getBrainLoss(),
|
||||
"oxyloss" = H.getOxyLoss(),
|
||||
"coord" = coord
|
||||
"coord" = coord,
|
||||
)
|
||||
)
|
||||
if(!query.Execute())
|
||||
@@ -72,7 +72,7 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
qdel(query)
|
||||
|
||||
proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
/proc/sql_report_cyborg_death(mob/living/silicon/robot/H)
|
||||
if(!H)
|
||||
return
|
||||
if(!H.key || !H.mind)
|
||||
@@ -114,7 +114,7 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
"fireloss" = H.getFireLoss(),
|
||||
"brainloss" = H.getBrainLoss(),
|
||||
"oxyloss" = H.getOxyLoss(),
|
||||
"coord" = coord
|
||||
"coord" = coord,
|
||||
)
|
||||
)
|
||||
if(!query.Execute())
|
||||
@@ -123,13 +123,13 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
qdel(query)
|
||||
|
||||
|
||||
proc/statistic_cycle()
|
||||
/proc/statistic_cycle()
|
||||
while(1)
|
||||
sql_poll_population()
|
||||
sleep(6000)
|
||||
|
||||
//This proc is used for feedback. It is executed at round end.
|
||||
proc/sql_commit_feedback()
|
||||
// This proc is used for feedback. It is executed at round end.
|
||||
/proc/sql_commit_feedback()
|
||||
if(!blackbox)
|
||||
log_game("Round ended without a blackbox recorder. No feedback was sent to the database.")
|
||||
return
|
||||
@@ -147,7 +147,7 @@ proc/sql_commit_feedback()
|
||||
|
||||
var/datum/db_query/max_query = SSdbcore.RunQuery(
|
||||
"SELECT MAX(roundid) AS max_round_id FROM [format_table_name("feedback")]",
|
||||
list()
|
||||
list(),
|
||||
)
|
||||
|
||||
var/newroundid
|
||||
@@ -172,7 +172,7 @@ proc/sql_commit_feedback()
|
||||
list(
|
||||
"rid" = newroundid,
|
||||
"var" = sanitizeSQL(variable),
|
||||
"val" = sanitizeSQL(value)
|
||||
"val" = sanitizeSQL(value),
|
||||
)
|
||||
)
|
||||
if(!query.Execute())
|
||||
|
||||
@@ -2026,35 +2026,36 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
//Solars
|
||||
|
||||
/area/solar
|
||||
/area/solar/
|
||||
requires_power = 1
|
||||
always_unpowered = 1
|
||||
dynamic_lighting = 0
|
||||
ambience = AMBIENCE_SPACE
|
||||
|
||||
auxport
|
||||
name = "\improper Fore Port Solar Array"
|
||||
icon_state = "panelsA"
|
||||
/area/solar/auxport
|
||||
name = "\improper Fore Port Solar Array"
|
||||
icon_state = "panelsA"
|
||||
|
||||
auxstarboard
|
||||
name = "\improper Fore Starboard Solar Array"
|
||||
icon_state = "panelsA"
|
||||
/area/solar/auxstarboard
|
||||
name = "\improper Fore Starboard Solar Array"
|
||||
icon_state = "panelsA"
|
||||
|
||||
fore
|
||||
name = "\improper Fore Solar Array"
|
||||
icon_state = "yellow"
|
||||
/area/solar/fore
|
||||
name = "\improper Fore Solar Array"
|
||||
icon_state = "yellow"
|
||||
|
||||
aft
|
||||
name = "\improper Aft Solar Array"
|
||||
icon_state = "aft"
|
||||
/area/solar/aft
|
||||
name = "\improper Aft Solar Array"
|
||||
icon_state = "aft"
|
||||
|
||||
starboard
|
||||
name = "\improper Aft Starboard Solar Array"
|
||||
icon_state = "panelsS"
|
||||
/area/solar/starboard
|
||||
name = "\improper Aft Starboard Solar Array"
|
||||
icon_state = "panelsS"
|
||||
|
||||
/area/solar/port
|
||||
name = "\improper Aft Port Solar Array"
|
||||
icon_state = "panelsP"
|
||||
|
||||
port
|
||||
name = "\improper Aft Port Solar Array"
|
||||
icon_state = "panelsP"
|
||||
|
||||
/area/maintenance/auxsolarport
|
||||
name = "Solar Maintenance - Fore Port"
|
||||
|
||||
@@ -1438,7 +1438,7 @@
|
||||
name = "\improper Mining Outpost Shuttle - Station"
|
||||
ambience = AMBIENCE_HANGAR
|
||||
sound_env = LARGE_ENCLOSED
|
||||
area/shuttle/mining_outpost/shuttle
|
||||
/area/shuttle/mining_outpost/shuttle
|
||||
name = "\improper Mining Outpost Shuttle"
|
||||
icon_state = "shuttle2"
|
||||
// Elevator area //
|
||||
|
||||
@@ -123,9 +123,10 @@
|
||||
always_unpowered = 1
|
||||
dynamic_lighting = 0
|
||||
|
||||
aft
|
||||
name = "\improper Engineering Outpost Solar Array"
|
||||
icon_state = "yellow"
|
||||
/area/outpost/engineering/solarsoutside/aft
|
||||
name = "\improper Engineering Outpost Solar Array"
|
||||
icon_state = "yellow"
|
||||
|
||||
|
||||
// Engineering Mining Outpost
|
||||
/area/outpost/engineering/mining
|
||||
|
||||
121
code/game/dna/genes/_gene.dm
Normal file
121
code/game/dna/genes/_gene.dm
Normal file
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* Gene Datum
|
||||
*
|
||||
* domutcheck was getting pretty hairy. This is the solution.
|
||||
*
|
||||
* All genes are stored in a global variable to cut down on memory
|
||||
* usage.
|
||||
*
|
||||
* @author N3X15 <nexisentertainment@gmail.com>
|
||||
*/
|
||||
|
||||
/datum/gene
|
||||
/// Display name
|
||||
var/name="BASE GENE"
|
||||
|
||||
/// Probably won't get used but why the fuck not
|
||||
var/desc="Oh god who knows what this does."
|
||||
|
||||
// Set in initialize()!
|
||||
/// What gene activates this?
|
||||
var/block=0
|
||||
|
||||
// Any of a number of GENE_ flags.
|
||||
var/flags=0
|
||||
|
||||
/**
|
||||
* Is the gene active in this mob's DNA?
|
||||
*/
|
||||
/datum/gene/proc/is_active(mob/M)
|
||||
return M.active_genes && (type in M.active_genes)
|
||||
|
||||
/**
|
||||
* Return 1 if we can activate.
|
||||
* HANDLE MUTCHK_FORCED HERE!
|
||||
*/
|
||||
/datum/gene/proc/can_activate(mob/M, flags)
|
||||
return 0
|
||||
|
||||
/// Called when the gene activates. Do your magic here.
|
||||
/datum/gene/proc/activate(mob/M, connected, flags)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the gene deactivates. Undo your magic here.
|
||||
* Only called when the block is deactivated.
|
||||
*/
|
||||
/datum/gene/proc/deactivate(mob/M, connected, flags)
|
||||
return
|
||||
|
||||
// This section inspired by goone's bioEffects.
|
||||
|
||||
/**
|
||||
* Called in each life() tick.
|
||||
*/
|
||||
/datum/gene/proc/OnMobLife(mob/M)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the mob dies
|
||||
*/
|
||||
/datum/gene/proc/OnMobDeath(mob/M)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the mob says shit
|
||||
*/
|
||||
/datum/gene/proc/OnSay(mob/M, message)
|
||||
return message
|
||||
|
||||
/**
|
||||
* Called after the mob runs update_icons.
|
||||
*
|
||||
* @params M The subject.
|
||||
* @params g Gender (m or f)
|
||||
* @params fat Fat? (0 or 1)
|
||||
*/
|
||||
/datum/gene/proc/OnDrawUnderlays(mob/M, g, fat)
|
||||
return 0
|
||||
|
||||
|
||||
/////////////////////
|
||||
// BASIC GENES
|
||||
//
|
||||
// These just chuck in a mutation and display a message.
|
||||
//
|
||||
// Gene is activated:
|
||||
// 1. If mutation already exists in mob
|
||||
// 2. If the probability roll succeeds
|
||||
// 3. Activation is forced (done in domutcheck)
|
||||
/////////////////////
|
||||
|
||||
|
||||
/datum/gene/basic
|
||||
name="BASIC GENE"
|
||||
|
||||
/// Mutation to give.
|
||||
var/mutation=0
|
||||
/// Activation probability.
|
||||
var/activation_prob=45
|
||||
/// Possible activation messages.
|
||||
var/list/activation_messages=list()
|
||||
/// Possible deactivation messages.
|
||||
var/list/deactivation_messages=list()
|
||||
|
||||
/datum/gene/basic/can_activate(mob/M, flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// Probability check
|
||||
return probinj(activation_prob,(flags&MUTCHK_FORCED))
|
||||
|
||||
/datum/gene/basic/activate(mob/M)
|
||||
M.mutations.Add(mutation)
|
||||
if(activation_messages.len)
|
||||
var/msg = pick(activation_messages)
|
||||
to_chat(M, SPAN_NOTICE("[msg]"))
|
||||
|
||||
/datum/gene/basic/deactivate(mob/M)
|
||||
M.mutations.Remove(mutation)
|
||||
if(deactivation_messages.len)
|
||||
var/msg = pick(deactivation_messages)
|
||||
to_chat(M, SPAN_WARNING("[msg]"))
|
||||
@@ -5,29 +5,25 @@
|
||||
//
|
||||
// Gene is always activated.
|
||||
/////////////////////
|
||||
|
||||
//TODO: Rewrite this crap from scratch, this is horrible. -Zandario
|
||||
/datum/gene/disability
|
||||
name="DISABILITY"
|
||||
name = "DISABILITY"
|
||||
|
||||
// Mutation to give (or 0)
|
||||
var/mutation=0
|
||||
/// Mutation to give (or 0)
|
||||
var/mutation = 0
|
||||
/// Disability to give (or 0)
|
||||
var/disability = 0
|
||||
/// SDisability to give (or 0)
|
||||
var/sdisability = 0
|
||||
/// Activation message
|
||||
var/activation_message = ""
|
||||
/// Yay, you're no longer growing 3 arms
|
||||
var/deactivation_message = ""
|
||||
|
||||
// Disability to give (or 0)
|
||||
var/disability=0
|
||||
|
||||
// SDisability to give (or 0)
|
||||
var/sdisability=0
|
||||
|
||||
// Activation message
|
||||
var/activation_message=""
|
||||
|
||||
// Yay, you're no longer growing 3 arms
|
||||
var/deactivation_message=""
|
||||
|
||||
/datum/gene/disability/can_activate(var/mob/M,var/flags)
|
||||
/datum/gene/disability/can_activate(mob/M, flags)
|
||||
return 1 // Always set!
|
||||
|
||||
/datum/gene/disability/activate(var/mob/M, var/connected, var/flags)
|
||||
/datum/gene/disability/activate(mob/M, connected, flags)
|
||||
if(mutation && !(mutation in M.mutations))
|
||||
M.mutations.Add(mutation)
|
||||
if(disability)
|
||||
@@ -35,11 +31,11 @@
|
||||
if(sdisability)
|
||||
M.sdisabilities|=sdisability
|
||||
if(activation_message)
|
||||
to_chat(M, "<span class='warning'>[activation_message]</span>")
|
||||
to_chat(M, SPAN_WARNING("[activation_message]"))
|
||||
else
|
||||
testing("[name] has no activation message.")
|
||||
|
||||
/datum/gene/disability/deactivate(var/mob/M, var/connected, var/flags)
|
||||
/datum/gene/disability/deactivate(mob/M, connected, flags)
|
||||
if(mutation && (mutation in M.mutations))
|
||||
M.mutations.Remove(mutation)
|
||||
if(disability)
|
||||
@@ -47,83 +43,83 @@
|
||||
if(sdisability)
|
||||
M.sdisabilities &= (~sdisability)
|
||||
if(deactivation_message)
|
||||
to_chat(M, "<span class='warning'>[deactivation_message]</span>")
|
||||
to_chat(M, SPAN_WARNING("[deactivation_message]"))
|
||||
else
|
||||
testing("[name] has no deactivation message.")
|
||||
|
||||
// Note: Doesn't seem to do squat, at the moment.
|
||||
// Note: Doesn't seem to do squat, at the moment. // For at LEAST 4 years. -Zandario
|
||||
/datum/gene/disability/hallucinate
|
||||
name="Hallucinate"
|
||||
activation_message="Your mind says 'Hello'."
|
||||
mutation=mHallucination
|
||||
|
||||
New()
|
||||
block=HALLUCINATIONBLOCK
|
||||
/datum/gene/disability/hallucinate/New()
|
||||
block=HALLUCINATIONBLOCK
|
||||
|
||||
/datum/gene/disability/epilepsy
|
||||
name="Epilepsy"
|
||||
activation_message="You get a headache."
|
||||
disability=EPILEPSY
|
||||
|
||||
New()
|
||||
block=HEADACHEBLOCK
|
||||
/datum/gene/disability/epilepsy/New()
|
||||
block=HEADACHEBLOCK
|
||||
|
||||
/datum/gene/disability/cough
|
||||
name="Coughing"
|
||||
activation_message="You start coughing."
|
||||
disability=COUGHING
|
||||
|
||||
New()
|
||||
block=COUGHBLOCK
|
||||
/datum/gene/disability/cough/New()
|
||||
block=COUGHBLOCK
|
||||
|
||||
/datum/gene/disability/clumsy
|
||||
name="Clumsiness"
|
||||
activation_message="You feel lightheaded."
|
||||
mutation=CLUMSY
|
||||
|
||||
New()
|
||||
block=CLUMSYBLOCK
|
||||
/datum/gene/disability/clumsy/New()
|
||||
block=CLUMSYBLOCK
|
||||
|
||||
/datum/gene/disability/tourettes
|
||||
name="Tourettes"
|
||||
activation_message="You twitch."
|
||||
disability=TOURETTES
|
||||
|
||||
New()
|
||||
block=TWITCHBLOCK
|
||||
/datum/gene/disability/tourettes/New()
|
||||
block=TWITCHBLOCK
|
||||
|
||||
/datum/gene/disability/nervousness
|
||||
name="Nervousness"
|
||||
activation_message="You feel nervous."
|
||||
disability=NERVOUS
|
||||
|
||||
New()
|
||||
block=NERVOUSBLOCK
|
||||
/datum/gene/disability/nervousness/New()
|
||||
block=NERVOUSBLOCK
|
||||
|
||||
/datum/gene/disability/blindness
|
||||
name="Blindness"
|
||||
activation_message="You can't seem to see anything."
|
||||
sdisability=BLIND
|
||||
|
||||
New()
|
||||
block=BLINDBLOCK
|
||||
/datum/gene/disability/blindness/New()
|
||||
block=BLINDBLOCK
|
||||
|
||||
/datum/gene/disability/deaf
|
||||
name="Deafness"
|
||||
activation_message="It's kinda quiet."
|
||||
sdisability=DEAF
|
||||
|
||||
New()
|
||||
block=DEAFBLOCK
|
||||
/datum/gene/disability/deaf/New()
|
||||
block=DEAFBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.ear_deaf = 1
|
||||
/datum/gene/disability/deaf/activate(mob/M, connected, flags)
|
||||
..(M,connected,flags)
|
||||
M.ear_deaf = 1
|
||||
|
||||
/datum/gene/disability/nearsighted
|
||||
name="Nearsightedness"
|
||||
activation_message="Your eyes feel weird..."
|
||||
disability=NEARSIGHTED
|
||||
|
||||
New()
|
||||
block=GLASSESBLOCK
|
||||
/datum/gene/disability/nearsighted/New()
|
||||
block=GLASSESBLOCK
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
/**
|
||||
* Gene Datum
|
||||
*
|
||||
* domutcheck was getting pretty hairy. This is the solution.
|
||||
*
|
||||
* All genes are stored in a global variable to cut down on memory
|
||||
* usage.
|
||||
*
|
||||
* @author N3X15 <nexisentertainment@gmail.com>
|
||||
*/
|
||||
|
||||
/datum/gene
|
||||
// Display name
|
||||
var/name="BASE GENE"
|
||||
|
||||
// Probably won't get used but why the fuck not
|
||||
var/desc="Oh god who knows what this does."
|
||||
|
||||
// Set in initialize()!
|
||||
// What gene activates this?
|
||||
var/block=0
|
||||
|
||||
// Any of a number of GENE_ flags.
|
||||
var/flags=0
|
||||
|
||||
/**
|
||||
* Is the gene active in this mob's DNA?
|
||||
*/
|
||||
/datum/gene/proc/is_active(var/mob/M)
|
||||
return M.active_genes && (type in M.active_genes)
|
||||
|
||||
// Return 1 if we can activate.
|
||||
// HANDLE MUTCHK_FORCED HERE!
|
||||
/datum/gene/proc/can_activate(var/mob/M, var/flags)
|
||||
return 0
|
||||
|
||||
// Called when the gene activates. Do your magic here.
|
||||
/datum/gene/proc/activate(var/mob/M, var/connected, var/flags)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the gene deactivates. Undo your magic here.
|
||||
* Only called when the block is deactivated.
|
||||
*/
|
||||
/datum/gene/proc/deactivate(var/mob/M, var/connected, var/flags)
|
||||
return
|
||||
|
||||
// This section inspired by goone's bioEffects.
|
||||
|
||||
/**
|
||||
* Called in each life() tick.
|
||||
*/
|
||||
/datum/gene/proc/OnMobLife(var/mob/M)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the mob dies
|
||||
*/
|
||||
/datum/gene/proc/OnMobDeath(var/mob/M)
|
||||
return
|
||||
|
||||
/**
|
||||
* Called when the mob says shit
|
||||
*/
|
||||
/datum/gene/proc/OnSay(var/mob/M, var/message)
|
||||
return message
|
||||
|
||||
/**
|
||||
* Called after the mob runs update_icons.
|
||||
*
|
||||
* @params M The subject.
|
||||
* @params g Gender (m or f)
|
||||
* @params fat Fat? (0 or 1)
|
||||
*/
|
||||
/datum/gene/proc/OnDrawUnderlays(var/mob/M, var/g, var/fat)
|
||||
return 0
|
||||
|
||||
|
||||
/////////////////////
|
||||
// BASIC GENES
|
||||
//
|
||||
// These just chuck in a mutation and display a message.
|
||||
//
|
||||
// Gene is activated:
|
||||
// 1. If mutation already exists in mob
|
||||
// 2. If the probability roll succeeds
|
||||
// 3. Activation is forced (done in domutcheck)
|
||||
/////////////////////
|
||||
|
||||
|
||||
/datum/gene/basic
|
||||
name="BASIC GENE"
|
||||
|
||||
// Mutation to give
|
||||
var/mutation=0
|
||||
|
||||
// Activation probability
|
||||
var/activation_prob=45
|
||||
|
||||
// Possible activation messages
|
||||
var/list/activation_messages=list()
|
||||
|
||||
// Possible deactivation messages
|
||||
var/list/deactivation_messages=list()
|
||||
|
||||
/datum/gene/basic/can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// Probability check
|
||||
return probinj(activation_prob,(flags&MUTCHK_FORCED))
|
||||
|
||||
/datum/gene/basic/activate(var/mob/M)
|
||||
M.mutations.Add(mutation)
|
||||
if(activation_messages.len)
|
||||
var/msg = pick(activation_messages)
|
||||
to_chat(M, "<span class='notice'>[msg]</span>")
|
||||
|
||||
/datum/gene/basic/deactivate(var/mob/M)
|
||||
M.mutations.Remove(mutation)
|
||||
if(deactivation_messages.len)
|
||||
var/msg = pick(deactivation_messages)
|
||||
to_chat(M, "<span class='warning'>[msg]</span>")
|
||||
@@ -4,10 +4,10 @@
|
||||
/datum/gene/monkey/New()
|
||||
block=MONKEYBLOCK
|
||||
|
||||
/datum/gene/monkey/can_activate(var/mob/M,var/flags)
|
||||
/datum/gene/monkey/can_activate(mob/M, flags)
|
||||
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
|
||||
|
||||
/datum/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
|
||||
/datum/gene/monkey/activate(mob/living/M, connected, flags)
|
||||
if(!istype(M,/mob/living/carbon/human))
|
||||
//testing("Cannot monkey-ify [M], type is [M.type].")
|
||||
return
|
||||
@@ -78,7 +78,7 @@
|
||||
qdel(M)
|
||||
return
|
||||
|
||||
/datum/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
|
||||
/datum/gene/monkey/deactivate(mob/living/M, connected, flags)
|
||||
if(!istype(M,/mob/living/carbon/monkey))
|
||||
//testing("Cannot humanize [M], type is [M.type].")
|
||||
return
|
||||
|
||||
@@ -7,60 +7,60 @@
|
||||
activation_messages=list("You feel no need to breathe.")
|
||||
mutation=mNobreath
|
||||
|
||||
New()
|
||||
block=NOBREATHBLOCK
|
||||
/datum/gene/basic/nobreath/New()
|
||||
block=NOBREATHBLOCK
|
||||
|
||||
/datum/gene/basic/remoteview
|
||||
name="Remote Viewing"
|
||||
activation_messages=list("Your mind expands.")
|
||||
mutation=mRemote
|
||||
|
||||
New()
|
||||
block=REMOTEVIEWBLOCK
|
||||
/datum/gene/basic/remoteview/New()
|
||||
block=REMOTEVIEWBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
/datum/gene/basic/remoteview/activate(mob/M, connected, flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
|
||||
/datum/gene/basic/regenerate
|
||||
name="Regenerate"
|
||||
activation_messages=list("You feel better.")
|
||||
mutation=mRegen
|
||||
|
||||
New()
|
||||
block=REGENERATEBLOCK
|
||||
/datum/gene/basic/regenerate/New()
|
||||
block=REGENERATEBLOCK
|
||||
|
||||
/datum/gene/basic/increaserun
|
||||
name="Super Speed"
|
||||
activation_messages=list("Your leg muscles pulsate.")
|
||||
mutation=mRun
|
||||
|
||||
New()
|
||||
block=INCREASERUNBLOCK
|
||||
/datum/gene/basic/increaserun/New()
|
||||
block=INCREASERUNBLOCK
|
||||
|
||||
/datum/gene/basic/remotetalk
|
||||
name="Telepathy"
|
||||
activation_messages=list("You expand your mind outwards.")
|
||||
mutation=mRemotetalk
|
||||
|
||||
New()
|
||||
block=REMOTETALKBLOCK
|
||||
/datum/gene/basic/remotetalk/New()
|
||||
block=REMOTETALKBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
/datum/gene/basic/remotetalk/activate(mob/M, connected, flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
|
||||
/datum/gene/basic/morph
|
||||
name="Morph"
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mMorph
|
||||
|
||||
New()
|
||||
block=MORPHBLOCK
|
||||
/datum/gene/basic/morph/New()
|
||||
block=MORPHBLOCK
|
||||
|
||||
activate(var/mob/M)
|
||||
..(M)
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
/datum/gene/basic/morph/activate(var/mob/M)
|
||||
..(M)
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
|
||||
/* Not used on bay
|
||||
/datum/gene/basic/heat_resist
|
||||
@@ -68,21 +68,21 @@
|
||||
activation_messages=list("Your skin is icy to the touch.")
|
||||
mutation=mHeatres
|
||||
|
||||
New()
|
||||
block=COLDBLOCK
|
||||
/datum/gene/basic/heat_resist/New()
|
||||
block=COLDBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return !(/datum/gene/basic/cold_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob = 15
|
||||
if(COLD_RESISTANCE in M.mutations)
|
||||
_prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
/datum/gene/basic/heat_resist/can_activate(mob/M, flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return !(/datum/gene/basic/cold_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob = 15
|
||||
if(COLD_RESISTANCE in M.mutations)
|
||||
_prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "cold[fat]_s"
|
||||
/datum/gene/basic/heat_resist/OnDrawUnderlays(mob/M, g, fat)
|
||||
return "cold[fat]_~s"
|
||||
*/
|
||||
|
||||
/datum/gene/basic/cold_resist
|
||||
@@ -90,97 +90,98 @@
|
||||
activation_messages=list("Your body is filled with warmth.")
|
||||
mutation=COLD_RESISTANCE
|
||||
|
||||
New()
|
||||
block=FIREBLOCK
|
||||
/datum/gene/basic/cold_resist/New()
|
||||
block=FIREBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// return !(/datum/gene/basic/heat_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob=30
|
||||
//if(mHeatres in M.mutations)
|
||||
// _prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
/datum/gene/basic/cold_resist/can_activate(mob/M, flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// return !(/datum/gene/basic/heat_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob=30
|
||||
//if(mHeatres in M.mutations)
|
||||
// _prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "fire[fat]_s"
|
||||
/datum/gene/basic/cold_resist/OnDrawUnderlays(mob/M, g, fat)
|
||||
return "fire[fat]_s"
|
||||
|
||||
/datum/gene/basic/noprints
|
||||
name="No Prints"
|
||||
activation_messages=list("Your fingers feel numb.")
|
||||
mutation=mFingerprints
|
||||
|
||||
New()
|
||||
block=NOPRINTSBLOCK
|
||||
/datum/gene/basic/noprints/New()
|
||||
block=NOPRINTSBLOCK
|
||||
|
||||
/datum/gene/basic/noshock
|
||||
name="Shock Immunity"
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mShock
|
||||
|
||||
New()
|
||||
block=SHOCKIMMUNITYBLOCK
|
||||
/datum/gene/basic/noshock/New()
|
||||
block=SHOCKIMMUNITYBLOCK
|
||||
|
||||
/datum/gene/basic/midget
|
||||
name="Midget"
|
||||
/datum/gene/basic/dwarfism
|
||||
name="Dwarfism"
|
||||
activation_messages=list("Your skin feels rubbery.")
|
||||
mutation=mSmallsize
|
||||
|
||||
New()
|
||||
block=SMALLSIZEBLOCK
|
||||
/datum/gene/basic/dwarfism/New()
|
||||
block=SMALLSIZEBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HULK in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
/datum/gene/basic/dwarfism/can_activate(mob/M, flags)
|
||||
// Can't be big and small.
|
||||
if(HULK in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
/datum/gene/basic/dwarfism/activate(mob/M, connected, flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
|
||||
deactivate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get ATOM_PASS_TABLE short of varediting so it should be fine. ~Z
|
||||
/datum/gene/basic/dwarfism/deactivate(mob/M, connected, flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get ATOM_PASS_TABLE short of varediting so it should be fine. ~Z
|
||||
|
||||
/datum/gene/basic/hulk
|
||||
name="Hulk"
|
||||
activation_messages=list("Your muscles hurt.")
|
||||
mutation=HULK
|
||||
|
||||
New()
|
||||
block=HULKBLOCK
|
||||
/datum/gene/basic/hulk/New()
|
||||
block=HULKBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(mSmallsize in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
/datum/gene/basic/hulk/can_activate(mob/M, flags)
|
||||
// Can't be big and small.
|
||||
if(mSmallsize in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
/datum/gene/basic/hulk/OnDrawUnderlays(mob/M, g, fat)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
|
||||
OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M.health <= 25)
|
||||
M.mutations.Remove(HULK)
|
||||
M.update_mutations() //update our mutation overlays
|
||||
to_chat(M, "<span class='warning'>You suddenly feel very weak.</span>")
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
/datum/gene/basic/hulk/OnMobLife(mob/living/carbon/human/M)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(M.health <= 25)
|
||||
M.mutations.Remove(HULK)
|
||||
M.update_mutations() //update our mutation overlays
|
||||
to_chat(M, SPAN_WARNING("You suddenly feel very weak."))
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
|
||||
/datum/gene/basic/xray
|
||||
name="X-Ray Vision"
|
||||
activation_messages=list("The walls suddenly disappear.")
|
||||
mutation=XRAY
|
||||
|
||||
New()
|
||||
block=XRAYBLOCK
|
||||
/datum/gene/basic/xray/New()
|
||||
block=XRAYBLOCK
|
||||
|
||||
/datum/gene/basic/tk
|
||||
name="Telekenesis"
|
||||
@@ -188,7 +189,8 @@
|
||||
mutation=TK
|
||||
activation_prob=15
|
||||
|
||||
New()
|
||||
/datum/gene/basic/tk/New()
|
||||
block=TELEBLOCK
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "telekinesishead[fat]_s"
|
||||
|
||||
/datum/gene/basic/tk/OnDrawUnderlays(mob/M, g, fat)
|
||||
return "telekinesishead[fat]_s"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/list/flavour_texts
|
||||
var/list/genMods
|
||||
|
||||
/datum/absorbed_dna/New(var/newName, var/newDNA, var/newSpecies, var/newLanguages, var/newIdentifying_Gender, var/list/newFlavour, var/list/newGenMods)
|
||||
/datum/absorbed_dna/New(newName, newDNA, newSpecies, newLanguages, newIdentifying_Gender, list/newFlavour, list/newGenMods)
|
||||
..()
|
||||
name = newName
|
||||
dna = newDNA
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
/datum/game_mode/changeling
|
||||
name = "Changeling"
|
||||
round_description = "There are alien changelings on the station. Do not let the changelings succeed!"
|
||||
extended_round_description = "Life always finds a way. However, life can sometimes take a more disturbing route. \
|
||||
Humanity's extensive knowledge of xeno-biological specimens has made them confident and arrogant. Yet \
|
||||
something slipped past their eyes. Something dangerous. Something alive. Most frightening of all, \
|
||||
however, is that this something is someone. An unknown alien specimen has incorporated itself into \
|
||||
the crew of the station. Its unique biology allows it to manipulate its own or anyone else's DNA. \
|
||||
With the ability to copy faces, voices, animals, but also change the chemical make up of your own body, \
|
||||
its existence is a threat to not only your personal safety but the lives of everyone on board. \
|
||||
No one knows where it came from. No one knows who it is or what it wants. One thing is for \
|
||||
certain though... there is never just one of them. Good luck."
|
||||
extended_round_description = {"
|
||||
Life always finds a way. However, life can sometimes take a more disturbing route.
|
||||
Humanity's extensive knowledge of xeno-biological specimens has made them confident and arrogant. Yet
|
||||
something slipped past their eyes. Something dangerous. Something alive. Most frightening of all,
|
||||
however, is that this something is someone. An unknown alien specimen has incorporated itself into
|
||||
the crew of the station. Its unique biology allows it to manipulate its own or anyone else's DNA.
|
||||
With the ability to copy faces, voices, animals, but also change the chemical make up of your own body,
|
||||
its existence is a threat to not only your personal safety but the lives of everyone on board.
|
||||
No one knows where it came from. No one knows who it is or what it wants. One thing is for
|
||||
certain though... there is never just one of them. Good luck.
|
||||
"}
|
||||
config_tag = "changeling"
|
||||
required_players = 2
|
||||
required_players_secret = 3
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")
|
||||
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
/// Stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind).
|
||||
/datum/changeling
|
||||
var/list/datum/absorbed_dna/absorbed_dna = list()
|
||||
var/list/absorbed_languages = list() // Necessary because of set_species stuff
|
||||
/// Necessary because of set_species stuff.
|
||||
var/list/absorbed_languages = list()
|
||||
var/absorbedcount = 0
|
||||
var/lingabsorbedcount = 1 //Starts at one, because that's us
|
||||
/// Starts at one, because that's us.
|
||||
var/lingabsorbedcount = 1
|
||||
var/chem_charges = 20
|
||||
var/chem_recharge_rate = 0.5
|
||||
var/chem_storage = 50
|
||||
@@ -19,13 +22,18 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
var/list/purchased_powers = list()
|
||||
var/mimicing = ""
|
||||
var/cloaked = 0
|
||||
var/armor_deployed = 0 //This is only used for changeling_generic_equip_all_slots() at the moment.
|
||||
var/recursive_enhancement = 0 //Used to power up other abilities from the ling power with the same name.
|
||||
var/list/purchased_powers_history = list() //Used for round-end report, includes respec uses too.
|
||||
var/last_shriek = null // world.time when the ling last used a shriek.
|
||||
var/next_escape = 0 // world.time when the ling can next use Escape Restraints
|
||||
/// This is only used for changeling_generic_equip_all_slots() at the moment.
|
||||
var/armor_deployed = 0
|
||||
/// Used to power up other abilities from the ling power with the same name.
|
||||
var/recursive_enhancement = 0
|
||||
/// Used for round-end report, includes respec uses too.
|
||||
var/list/purchased_powers_history = list()
|
||||
/// world.time when the ling last used a shriek.
|
||||
var/last_shriek = null
|
||||
/// world.time when the ling can next use Escape Restraints.
|
||||
var/next_escape = 0
|
||||
|
||||
/datum/changeling/New(var/gender=FEMALE)
|
||||
/datum/changeling/New(gender = FEMALE)
|
||||
..()
|
||||
if(possible_changeling_IDs.len)
|
||||
changelingID = pick(possible_changeling_IDs)
|
||||
@@ -38,12 +46,12 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
chem_charges = min(max(0, chem_charges+chem_recharge_rate), chem_storage)
|
||||
geneticdamage = max(0, geneticdamage-1)
|
||||
|
||||
/datum/changeling/proc/GetDNA(var/dna_owner)
|
||||
/datum/changeling/proc/GetDNA(dna_owner)
|
||||
for(var/datum/absorbed_dna/DNA in absorbed_dna)
|
||||
if(dna_owner == DNA.name)
|
||||
return DNA
|
||||
|
||||
/mob/proc/absorbDNA(var/datum/absorbed_dna/newDNA)
|
||||
/mob/proc/absorbDNA(datum/absorbed_dna/newDNA)
|
||||
var/datum/changeling/changeling = null
|
||||
if(src.mind && src.mind.changeling)
|
||||
changeling = src.mind.changeling
|
||||
@@ -58,11 +66,13 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
if(!changeling.GetDNA(newDNA.name)) // Don't duplicate - I wonder if it's possible for it to still be a different DNA? DNA code could use a rewrite
|
||||
changeling.absorbed_dna += newDNA
|
||||
|
||||
//Restores our verbs. It will only restore verbs allowed during lesser (monkey) form if we are not human
|
||||
/// Restores our verbs. It will only restore verbs allowed during lesser (monkey) form if we are not human.
|
||||
/mob/proc/make_changeling()
|
||||
|
||||
if(!mind) return
|
||||
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
||||
if(!mind)
|
||||
return
|
||||
if(!mind.changeling)
|
||||
mind.changeling = new /datum/changeling(gender)
|
||||
|
||||
verbs += /datum/changeling/proc/EvolutionMenu
|
||||
verbs += /mob/proc/changeling_respec
|
||||
@@ -88,13 +98,14 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
if(P.make_hud_button)
|
||||
if(!src.ability_master)
|
||||
src.ability_master = new /atom/movable/screen/movable/ability_master(src)
|
||||
|
||||
src.ability_master.add_ling_ability(
|
||||
object_given = src,
|
||||
verb_given = P.verbpath,
|
||||
name_given = P.name,
|
||||
ability_icon_given = P.ability_icon_state,
|
||||
arguments = list()
|
||||
)
|
||||
arguments = list(),
|
||||
)
|
||||
|
||||
for(var/language in languages)
|
||||
mind.changeling.absorbed_languages |= language
|
||||
@@ -106,9 +117,10 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
|
||||
return 1
|
||||
|
||||
//removes our changeling verbs
|
||||
/// Removes our changeling verbs.
|
||||
/mob/proc/remove_changeling_powers()
|
||||
if(!mind || !mind.changeling) return
|
||||
if(!mind || !mind.changeling)
|
||||
return
|
||||
for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
|
||||
if(P.isVerb)
|
||||
verbs -= P.verbpath
|
||||
@@ -117,11 +129,13 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
ability_master.remove_ability(C)
|
||||
|
||||
|
||||
//Helper proc. Does all the checks and stuff for us to avoid copypasta
|
||||
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0)
|
||||
/// Helper proc. Does all the checks and stuff for us to avoid copypasta.
|
||||
/mob/proc/changeling_power(required_chems = 0, required_dna = 0, max_genetic_damage = 100, max_stat = 0)
|
||||
|
||||
if(!src.mind) return
|
||||
if(!iscarbon(src)) return
|
||||
if(!src.mind)
|
||||
return
|
||||
if(!iscarbon(src))
|
||||
return
|
||||
|
||||
var/datum/changeling/changeling = src.mind.changeling
|
||||
if(!changeling)
|
||||
@@ -129,25 +143,25 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
return
|
||||
|
||||
if(src.stat > max_stat)
|
||||
to_chat(src, "<span class='warning'>We are incapacitated.</span>")
|
||||
to_chat(src, SPAN_WARNING("We are incapacitated."))
|
||||
return
|
||||
|
||||
if(changeling.absorbed_dna.len < required_dna)
|
||||
to_chat(src, "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>")
|
||||
to_chat(src, SPAN_WARNING("We require at least [required_dna] samples of compatible DNA."))
|
||||
return
|
||||
|
||||
if(changeling.chem_charges < required_chems)
|
||||
to_chat(src, "<span class='warning'>We require at least [required_chems] units of chemicals to do that!</span>")
|
||||
to_chat(src, SPAN_WARNING("We require at least [required_chems] units of chemicals to do that!"))
|
||||
return
|
||||
|
||||
if(changeling.geneticdamage > max_genetic_damage)
|
||||
to_chat(src, "<span class='warning'>Our genomes are still reassembling. We need time to recover first.</span>")
|
||||
to_chat(src, SPAN_WARNING("Our genomes are still reassembling. We need time to recover first."))
|
||||
return
|
||||
|
||||
return changeling
|
||||
|
||||
//Used to dump the languages from the changeling datum into the actual mob.
|
||||
/mob/proc/changeling_update_languages(var/updated_languages)
|
||||
/// Used to dump the languages from the changeling datum into the actual mob.
|
||||
/mob/proc/changeling_update_languages(updated_languages)
|
||||
languages = list()
|
||||
for(var/language in updated_languages)
|
||||
languages += language
|
||||
@@ -159,17 +173,17 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
//STINGS// //They get a pretty header because there's just so fucking many of them ;_;
|
||||
//////////
|
||||
|
||||
turf/proc/AdjacentTurfsRangedSting()
|
||||
/turf/proc/AdjacentTurfsRangedSting()
|
||||
//Yes this is snowflakey, but I couldn't get it to work any other way.. -Luke
|
||||
var/list/allowed = list(
|
||||
/obj/structure/table,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/frame,
|
||||
/obj/structure/target_stake,
|
||||
/obj/structure/cable,
|
||||
/obj/structure/disposalpipe,
|
||||
/mob,
|
||||
/obj/machinery,
|
||||
/mob
|
||||
/obj/structure/cable,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/disposalpipe,
|
||||
/obj/structure/frame,
|
||||
/obj/structure/table,
|
||||
/obj/structure/target_stake,
|
||||
)
|
||||
|
||||
var/L[] = new()
|
||||
@@ -204,18 +218,20 @@ turf/proc/AdjacentTurfsRangedSting()
|
||||
if(M.loc == src.loc)
|
||||
return 1 //target and source are in the same thing
|
||||
if(!isturf(src.loc) || !isturf(M.loc))
|
||||
to_chat(src, "<span class='warning'>We cannot reach \the [M] with a sting!</span>")
|
||||
to_chat(src, SPAN_WARNING("We cannot reach \the [M] with a sting!"))
|
||||
return 0 //One is inside, the other is outside something.
|
||||
// Maximum queued turfs set to 25; I don't *think* anything raises sting_range above 2, but if it does the 25 may need raising
|
||||
if(!AStar(src.loc, M.loc, /turf/proc/AdjacentTurfsRangedSting, /turf/proc/Distance, max_nodes=25, max_node_depth=sting_range)) //If we can't find a path, fail
|
||||
to_chat(src, "<span class='warning'>We cannot find a path to sting \the [M] by!</span>")
|
||||
to_chat(src, SPAN_WARNING("We cannot find a path to sting \the [M] by!"))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities)
|
||||
/mob/proc/changeling_sting(var/required_chems=0, var/verb_path)
|
||||
/// Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities).
|
||||
/mob/proc/changeling_sting(required_chems = 0, verb_path)
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(required_chems)
|
||||
if(!changeling) return
|
||||
if(!changeling)
|
||||
return
|
||||
|
||||
var/list/victims = list()
|
||||
for(var/mob/living/carbon/C in oview(changeling.sting_range))
|
||||
@@ -225,18 +241,23 @@ turf/proc/AdjacentTurfsRangedSting()
|
||||
if(!T)
|
||||
return
|
||||
if(T.isSynthetic())
|
||||
to_chat(src, "<span class='notice'>We are unable to pierce the outer shell of [T].</span>")
|
||||
to_chat(src, SPAN_NOTICE("We are unable to pierce the outer shell of [T]."))
|
||||
return
|
||||
if(!(T in view(changeling.sting_range)))
|
||||
return
|
||||
if(!sting_can_reach(T, changeling.sting_range))
|
||||
return
|
||||
if(!changeling_power(required_chems))
|
||||
return
|
||||
if(!(T in view(changeling.sting_range))) return
|
||||
if(!sting_can_reach(T, changeling.sting_range)) return
|
||||
if(!changeling_power(required_chems)) return
|
||||
|
||||
changeling.chem_charges -= required_chems
|
||||
changeling.sting_range = 1
|
||||
src.verbs -= verb_path
|
||||
spawn(10) src.verbs += verb_path
|
||||
spawn(10)
|
||||
src.verbs += verb_path
|
||||
|
||||
to_chat(src, "<span class='notice'>We stealthily sting [T].</span>")
|
||||
if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting
|
||||
to_chat(T, "<span class='warning'>You feel a tiny prick.</span>")
|
||||
to_chat(src, SPAN_NOTICE("We stealthily sting [T]."))
|
||||
if(!T.mind || !T.mind.changeling)
|
||||
return T // T will be affected by the sting.
|
||||
to_chat(T, SPAN_WARNING("You feel a tiny prick."))
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//This is a generic proc that should be called by other ling armor procs to equip them.
|
||||
/mob/proc/changeling_generic_armor(var/armor_type, var/helmet_type, var/boot_type, var/chem_cost)
|
||||
/// This is a generic proc that should be called by other ling armor procs to equip them.
|
||||
/mob/proc/changeling_generic_armor(armor_type, helmet_type, boot_type, chem_cost)
|
||||
|
||||
if(!ishuman(src))
|
||||
return 0
|
||||
@@ -16,9 +16,11 @@
|
||||
|
||||
//First, check if we're already wearing the armor, and if so, take it off.
|
||||
if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type))
|
||||
M.visible_message("<span class='warning'>[M] casts off their [M.wear_suit.name]!</span>",
|
||||
"<span class='warning'>We cast off our [M.wear_suit.name]</span>",
|
||||
"<span class='italics'>You hear the organic matter ripping and tearing!</span>")
|
||||
M.visible_message(
|
||||
SPAN_WARNING("[M] casts off their [M.wear_suit.name]!"),
|
||||
SPAN_WARNING("We cast off our [M.wear_suit.name]"),
|
||||
SPAN_HEAR("You hear the organic matter ripping and tearing!"),
|
||||
)
|
||||
if(istype(M.wear_suit, armor_type))
|
||||
qdel(M.wear_suit)
|
||||
if(istype(M.head, helmet_type))
|
||||
@@ -32,7 +34,7 @@
|
||||
return 1
|
||||
|
||||
if(M.head || M.wear_suit) //Make sure our slots aren't full
|
||||
to_chat(src, "<span class='warning'>We require nothing to be on our head, and we cannot wear any external suits, or shoes.</span>")
|
||||
to_chat(src, SPAN_WARNING("We require nothing to be on our head, and we cannot wear any external suits, or shoes."))
|
||||
return 0
|
||||
|
||||
var/obj/item/clothing/suit/A = new armor_type(src)
|
||||
@@ -52,7 +54,7 @@
|
||||
M.update_inv_shoes()
|
||||
return 1
|
||||
|
||||
/mob/proc/changeling_generic_equip_all_slots(var/list/stuff_to_equip, var/cost)
|
||||
/mob/proc/changeling_generic_equip_all_slots(list/stuff_to_equip, cost)
|
||||
var/datum/changeling/changeling = changeling_power(cost,1,100,CONSCIOUS)
|
||||
if(!changeling)
|
||||
return
|
||||
@@ -120,15 +122,18 @@
|
||||
|
||||
if(success)
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
visible_message("<span class='warning'>[src] pulls on their clothes, peeling it off along with parts of their skin attached!</span>",
|
||||
"<span class='notice'>We remove and deform our equipment.</span>")
|
||||
visible_message(
|
||||
SPAN_WARNING("[src] pulls on their clothes, peeling it off along with parts of their skin attached!"),
|
||||
SPAN_NOTICE("We remove and deform our equipment."),
|
||||
SPAN_HEAR("You hear the horrible sound of ripping skin."),
|
||||
)
|
||||
M.mind.changeling.armor_deployed = 0
|
||||
return success
|
||||
|
||||
else
|
||||
|
||||
to_chat(M, "<span class='notice'>We begin growing our new equipment...</span>")
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
to_chat(M, SPAN_NOTICE("We begin growing our new equipment..."))
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, TRUE)
|
||||
|
||||
var/list/grown_items_list = list()
|
||||
|
||||
@@ -215,20 +220,20 @@
|
||||
ADD_TRAIT(I, TRAIT_NODROP, CHANGELING_TRAIT)
|
||||
M.equip_to_slot_or_del(I, SLOT_ID_WORN_ID)
|
||||
grown_items_list.Add("an ID card")
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, 1)
|
||||
playsound(src, 'sound/effects/splat.ogg', 30, TRUE)
|
||||
success = 1
|
||||
|
||||
var/feedback = english_list(grown_items_list, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
|
||||
to_chat(M, "<span class='notice'>We have grown [feedback].</span>")
|
||||
to_chat(M, SPAN_NOTICE("We have grown [feedback]."))
|
||||
|
||||
if(success)
|
||||
M.mind.changeling.armor_deployed = 1
|
||||
M.mind.changeling.chem_charges -= 10
|
||||
return success
|
||||
|
||||
//This is a generic proc that should be called by other ling weapon procs to equip them.
|
||||
/mob/proc/changeling_generic_weapon(var/weapon_type, var/make_sound = 1, var/cost = 20)
|
||||
/// This is a generic proc that should be called by other ling weapon procs to equip them.
|
||||
/mob/proc/changeling_generic_weapon(weapon_type, make_sound = TRUE, cost = 20)
|
||||
var/datum/changeling/changeling = changeling_power(cost,1,100,CONSCIOUS)
|
||||
if(!changeling)
|
||||
return
|
||||
@@ -239,7 +244,7 @@
|
||||
var/mob/living/carbon/human/M = src
|
||||
|
||||
if(M.hands_full()) //Make sure our hands aren't full.
|
||||
to_chat(src, "<span class='warning'>Our hands are full. Drop something first.</span>")
|
||||
to_chat(src, SPAN_WARNING("Our hands are full. Drop something first."))
|
||||
return 0
|
||||
|
||||
var/obj/item/W = new weapon_type(src)
|
||||
@@ -247,5 +252,5 @@
|
||||
|
||||
src.mind.changeling.chem_charges -= cost
|
||||
if(make_sound)
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 30, TRUE)
|
||||
return 1
|
||||
|
||||
@@ -5,28 +5,34 @@
|
||||
var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now
|
||||
var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
/datum/power //Could be used by other antags too
|
||||
/datum/power //Could be used by other antags too
|
||||
var/name = "Power"
|
||||
var/desc = "Placeholder"
|
||||
var/helptext = ""
|
||||
var/enhancedtext = ""
|
||||
var/isVerb = 1 // Is it an active power, or passive?
|
||||
var/verbpath // Path to a verb that contains the effects.
|
||||
var/make_hud_button = 1 // Is this ability significant enough to dedicate screen space for a HUD button?
|
||||
var/ability_icon_state = null // icon_state for icons for the ability HUD. Must be in screen_spells.dmi.
|
||||
/// Is it an active power, or passive?
|
||||
var/isVerb = 1
|
||||
/// Path to a verb that contains the effects.
|
||||
var/verbpath
|
||||
/// Is this ability significant enough to dedicate screen space for a HUD button?
|
||||
var/make_hud_button = 1
|
||||
/// icon_state for icons for the ability HUD. Must be in screen_spells.dmi.
|
||||
var/ability_icon_state = null
|
||||
|
||||
/datum/power/changeling
|
||||
var/allowduringlesserform = 0
|
||||
var/genomecost = 500000 // Cost for the changling to evolve this power.
|
||||
/// Cost for the changling to evolve this power.
|
||||
var/genomecost = 500000
|
||||
|
||||
|
||||
// Modularchangling, totally stolen from the new player panel. YAYY
|
||||
/datum/changeling/proc/EvolutionMenu()//The new one
|
||||
/// Modularchangling, totally stolen from the new player panel. YAYY
|
||||
/datum/changeling/proc/EvolutionMenu() //The new one
|
||||
set name = "-Evolution Menu-"
|
||||
set category = "Changeling"
|
||||
set desc = "Adapt yourself carefully."
|
||||
|
||||
if(!usr || !usr.mind || !usr.mind.changeling) return
|
||||
if(!usr || !usr.mind || !usr.mind.changeling)
|
||||
return
|
||||
src = usr.mind.changeling
|
||||
|
||||
if(!powerinstances.len)
|
||||
@@ -308,7 +314,7 @@ var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/datum/mind/M, var/Pname, var/remake_verbs = 1)
|
||||
/datum/changeling/proc/purchasePower(datum/mind/M, Pname, remake_verbs = 1)
|
||||
if(!M || !M.changeling)
|
||||
return
|
||||
|
||||
@@ -357,4 +363,3 @@ var/list/datum/power/changeling/powerinstances = list()
|
||||
call(M.current, Thepower.verbpath)()
|
||||
else if(remake_verbs)
|
||||
M.current.make_changeling()
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//! Construct Spells
|
||||
|
||||
//////////////////////////////Construct Spells/////////////////////////
|
||||
|
||||
proc/findNullRod(var/atom/target)
|
||||
/proc/findNullRod(atom/target)
|
||||
if(istype(target,/obj/item/nullrod))
|
||||
return 1
|
||||
else if(target.contents)
|
||||
|
||||
@@ -415,180 +415,181 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
else
|
||||
. += "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
|
||||
|
||||
obj/item/book/tome/cultify()
|
||||
/obj/item/book/tome/cultify()
|
||||
return
|
||||
|
||||
/obj/item/book/tome/imbued //admin tome, spawns working runes without waiting
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/cultistsonly = 1
|
||||
attack_self(mob/user as mob)
|
||||
if(src.cultistsonly && !iscultist(usr))
|
||||
return
|
||||
if(!cultwords["travel"])
|
||||
runerandom()
|
||||
if(user)
|
||||
var/r
|
||||
if (!istype(user.loc,/turf))
|
||||
to_chat(user, "<span class='notice'>You do not have enough space to write a proper rune.</span>")
|
||||
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
|
||||
r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable.
|
||||
var/obj/effect/rune/R = new /obj/effect/rune
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
var/area/A = get_area(user)
|
||||
log_and_message_admins("created \an [r] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].")
|
||||
switch(r)
|
||||
if("teleport")
|
||||
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
var/beacon
|
||||
if(usr)
|
||||
beacon = input("Select the last rune", "Rune Scribing") in words
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["self"]
|
||||
R.word3=beacon
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("itemport")
|
||||
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
var/beacon
|
||||
if(usr)
|
||||
beacon = input("Select the last rune", "Rune Scribing") in words
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=beacon
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("tome")
|
||||
R.word1=cultwords["see"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["hell"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("armor")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["destroy"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("convert")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("tear in reality")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["join"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("emp")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("drain")
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("seer")
|
||||
R.word1=cultwords["see"]
|
||||
R.word2=cultwords["hell"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("raise")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["join"]
|
||||
R.word3=cultwords["hell"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("obscure")
|
||||
R.word1=cultwords["hide"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["blood"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("astral journey")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["travel"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("manifest")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["travel"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("imbue talisman")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["technology"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("sacrifice")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("reveal")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["hide"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("wall")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["travel"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("freedom")
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["technology"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("cultsummon")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("deafen")
|
||||
R.word1=cultwords["hide"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["see"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("blind")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("bloodboil")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["blood"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("communicate")
|
||||
R.word1=cultwords["self"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("stun")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["hide"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
|
||||
/obj/item/book/tome/imbued/attack_self(mob/user as mob)
|
||||
if(src.cultistsonly && !iscultist(usr))
|
||||
return
|
||||
if(!cultwords["travel"])
|
||||
runerandom()
|
||||
if(user)
|
||||
var/r
|
||||
if (!istype(user.loc,/turf))
|
||||
to_chat(user, "<span class='notice'>You do not have enough space to write a proper rune.</span>")
|
||||
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
|
||||
r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable.
|
||||
var/obj/effect/rune/R = new /obj/effect/rune
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
var/area/A = get_area(user)
|
||||
log_and_message_admins("created \an [r] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].")
|
||||
switch(r)
|
||||
if("teleport")
|
||||
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
var/beacon
|
||||
if(usr)
|
||||
beacon = input("Select the last rune", "Rune Scribing") in words
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["self"]
|
||||
R.word3=beacon
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("itemport")
|
||||
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
var/beacon
|
||||
if(usr)
|
||||
beacon = input("Select the last rune", "Rune Scribing") in words
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=beacon
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("tome")
|
||||
R.word1=cultwords["see"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["hell"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("armor")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["destroy"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("convert")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("tear in reality")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["join"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("emp")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("drain")
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("seer")
|
||||
R.word1=cultwords["see"]
|
||||
R.word2=cultwords["hell"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("raise")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["join"]
|
||||
R.word3=cultwords["hell"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("obscure")
|
||||
R.word1=cultwords["hide"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["blood"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("astral journey")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["travel"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("manifest")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["travel"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("imbue talisman")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["technology"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("sacrifice")
|
||||
R.word1=cultwords["hell"]
|
||||
R.word2=cultwords["blood"]
|
||||
R.word3=cultwords["join"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("reveal")
|
||||
R.word1=cultwords["blood"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["hide"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("wall")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["travel"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("freedom")
|
||||
R.word1=cultwords["travel"]
|
||||
R.word2=cultwords["technology"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("cultsummon")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["self"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("deafen")
|
||||
R.word1=cultwords["hide"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["see"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("blind")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["other"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("bloodboil")
|
||||
R.word1=cultwords["destroy"]
|
||||
R.word2=cultwords["see"]
|
||||
R.word3=cultwords["blood"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("communicate")
|
||||
R.word1=cultwords["self"]
|
||||
R.word2=cultwords["other"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
if("stun")
|
||||
R.word1=cultwords["join"]
|
||||
R.word2=cultwords["hide"]
|
||||
R.word3=cultwords["technology"]
|
||||
R.loc = user.loc
|
||||
R.check_icon()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,113 +5,115 @@
|
||||
var/uses = 0
|
||||
info = "<center><img src='talisman.png'></center><br/><br/>"
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
var/delete = 1
|
||||
// who the hell thought this was a good idea :(
|
||||
switch(imbue)
|
||||
if("newtome")
|
||||
call(/obj/effect/rune/proc/tomesummon)()
|
||||
if("armor")
|
||||
call(/obj/effect/rune/proc/armor)()
|
||||
if("emp")
|
||||
call(/obj/effect/rune/proc/emp)(usr.loc,3)
|
||||
if("conceal")
|
||||
call(/obj/effect/rune/proc/obscure)(2)
|
||||
if("revealrunes")
|
||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||
if("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
call(/obj/effect/rune/proc/teleport)(imbue)
|
||||
if("communicate")
|
||||
//If the user cancels the talisman this var will be set to 0
|
||||
delete = call(/obj/effect/rune/proc/communicate)()
|
||||
if("deafen")
|
||||
call(/obj/effect/rune/proc/deafen)()
|
||||
if("blind")
|
||||
call(/obj/effect/rune/proc/blind)()
|
||||
if("runestun")
|
||||
to_chat(user, "<span class='warning'>To use this talisman, attack your target directly.</span>")
|
||||
return
|
||||
if("supply")
|
||||
supply()
|
||||
user.take_organ_damage(5, 0)
|
||||
if(src && src.imbue!="supply" && src.imbue!="runestun")
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?")
|
||||
return
|
||||
|
||||
|
||||
attack(mob/living/carbon/T as mob, mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
if(imbue == "runestun")
|
||||
user.take_organ_damage(5, 0)
|
||||
call(/obj/effect/rune/proc/runestun)(T)
|
||||
/obj/item/paper/talisman/attack_self(mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
var/delete = 1
|
||||
// who the hell thought this was a good idea :(
|
||||
switch(imbue)
|
||||
if("newtome")
|
||||
call(/obj/effect/rune/proc/tomesummon)()
|
||||
if("armor")
|
||||
call(/obj/effect/rune/proc/armor)()
|
||||
if("emp")
|
||||
call(/obj/effect/rune/proc/emp)(usr.loc,3)
|
||||
if("conceal")
|
||||
call(/obj/effect/rune/proc/obscure)(2)
|
||||
if("revealrunes")
|
||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||
if("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
call(/obj/effect/rune/proc/teleport)(imbue)
|
||||
if("communicate")
|
||||
//If the user cancels the talisman this var will be set to 0
|
||||
delete = call(/obj/effect/rune/proc/communicate)()
|
||||
if("deafen")
|
||||
call(/obj/effect/rune/proc/deafen)()
|
||||
if("blind")
|
||||
call(/obj/effect/rune/proc/blind)()
|
||||
if("runestun")
|
||||
to_chat(user, "<span class='warning'>To use this talisman, attack your target directly.</span>")
|
||||
return
|
||||
if("supply")
|
||||
supply()
|
||||
user.take_organ_damage(5, 0)
|
||||
if(src && src.imbue!="supply" && src.imbue!="runestun")
|
||||
if(delete)
|
||||
qdel(src)
|
||||
else
|
||||
..() ///If its some other talisman, use the generic attack code, is this supposed to work this way?
|
||||
else
|
||||
..()
|
||||
return
|
||||
else
|
||||
to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?")
|
||||
return
|
||||
|
||||
|
||||
proc/supply(var/key)
|
||||
if (!src.uses)
|
||||
/obj/item/paper/talisman/attack(mob/living/carbon/T as mob, mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
if(imbue == "runestun")
|
||||
user.take_organ_damage(5, 0)
|
||||
call(/obj/effect/rune/proc/runestun)(T)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
..() ///If its some other talisman, use the generic attack code, is this supposed to work this way?
|
||||
else
|
||||
..()
|
||||
|
||||
var/dat = "<B>There are [src.uses] bloody runes on the parchment.</B><BR>"
|
||||
dat += "Please choose the chant to be imbued into the fabric of reality.<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='?src=\ref[src];rune=newtome'>N'ath reth sh'yro eth d'raggathnor!</A> - Allows you to summon a new arcane tome.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=teleport'>Sas'so c'arta forbici!</A> - Allows you to move to a rune with the same last word.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=emp'>Ta'gh fara'qha fel d'amar det!</A> - Allows you to destroy technology in a short range.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=conceal'>Kla'atu barada nikt'o!</A> - Allows you to conceal the runes you placed on the floor.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=communicate'>O bidai nabora se'sma!</A> - Allows you to coordinate with others of your cult.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=runestun'>Fuu ma'jin</A> - Allows you to stun a person by attacking them with the talisman.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=armor'>Sa tatha najin</A> - Allows you to summon armoured robes and an unholy blade<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=soulstone'>Kal om neth</A> - Summons a soul stone<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=construct'>Da A'ig Osk</A> - Summons a construct shell for use with captured souls. It is too large to carry on your person.<BR>"
|
||||
usr << browse(dat, "window=id_com;size=350x200")
|
||||
|
||||
/obj/item/paper/talisman/proc/supply(key)
|
||||
if (!src.uses)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/dat = "<B>There are [src.uses] bloody runes on the parchment.</B><BR>"
|
||||
dat += "Please choose the chant to be imbued into the fabric of reality.<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='?src=\ref[src];rune=newtome'>N'ath reth sh'yro eth d'raggathnor!</A> - Allows you to summon a new arcane tome.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=teleport'>Sas'so c'arta forbici!</A> - Allows you to move to a rune with the same last word.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=emp'>Ta'gh fara'qha fel d'amar det!</A> - Allows you to destroy technology in a short range.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=conceal'>Kla'atu barada nikt'o!</A> - Allows you to conceal the runes you placed on the floor.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=communicate'>O bidai nabora se'sma!</A> - Allows you to coordinate with others of your cult.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=runestun'>Fuu ma'jin</A> - Allows you to stun a person by attacking them with the talisman.<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=armor'>Sa tatha najin</A> - Allows you to summon armoured robes and an unholy blade<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=soulstone'>Kal om neth</A> - Summons a soul stone<BR>"
|
||||
dat += "<A href='?src=\ref[src];rune=construct'>Da A'ig Osk</A> - Summons a construct shell for use with captured souls. It is too large to carry on your person.<BR>"
|
||||
usr << browse(dat, "window=id_com;size=350x200")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if(!src) return
|
||||
if (usr.stat || usr.restrained() || !in_range(src, usr)) return
|
||||
|
||||
if (href_list["rune"])
|
||||
switch(href_list["rune"])
|
||||
if("newtome")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "newtome"
|
||||
if("teleport")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "[pick("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri", "orkan", "allaq")]"
|
||||
T.info = "[T.imbue]"
|
||||
if("emp")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "emp"
|
||||
if("conceal")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "conceal"
|
||||
if("communicate")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "communicate"
|
||||
if("runestun")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "runestun"
|
||||
if("armor")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "armor"
|
||||
if("soulstone")
|
||||
new /obj/item/soulstone(get_turf(usr))
|
||||
if("construct")
|
||||
new /obj/structure/constructshell/cult(get_turf(usr))
|
||||
src.uses--
|
||||
supply()
|
||||
/obj/item/paper/talisman/Topic(href, href_list)
|
||||
if(!src)
|
||||
return
|
||||
if (usr.stat || usr.restrained() || !in_range(src, usr))
|
||||
return
|
||||
|
||||
if (href_list["rune"])
|
||||
switch(href_list["rune"])
|
||||
if("newtome")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "newtome"
|
||||
if("teleport")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "[pick("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri", "orkan", "allaq")]"
|
||||
T.info = "[T.imbue]"
|
||||
if("emp")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "emp"
|
||||
if("conceal")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "conceal"
|
||||
if("communicate")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "communicate"
|
||||
if("runestun")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "runestun"
|
||||
if("armor")
|
||||
var/obj/item/paper/talisman/T = new /obj/item/paper/talisman(get_turf(usr))
|
||||
T.imbue = "armor"
|
||||
if("soulstone")
|
||||
new /obj/item/soulstone(get_turf(usr))
|
||||
if("construct")
|
||||
new /obj/structure/constructshell/cult(get_turf(usr))
|
||||
src.uses--
|
||||
supply()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/paper/talisman/supply
|
||||
|
||||
@@ -16,34 +16,34 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
Bump(atom/clong)
|
||||
if(istype(clong, /turf/simulated/shuttle)) //Skip shuttles without actually deleting the rod
|
||||
return
|
||||
/obj/effect/immovablerod/Bump(atom/clong)
|
||||
if(istype(clong, /turf/simulated/shuttle)) //Skip shuttles without actually deleting the rod
|
||||
return
|
||||
|
||||
else if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
else if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /obj))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
else if (istype(clong, /obj))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(2)
|
||||
else
|
||||
qdel(src)
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(2)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
if(clong && prob(25))
|
||||
src.loc = clong.loc
|
||||
if(clong && prob(25))
|
||||
src.loc = clong.loc
|
||||
|
||||
Destroy()
|
||||
walk(src, 0) // Because we might have called walk_towards, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
return ..()
|
||||
/obj/effect/immovablerod/Destroy()
|
||||
walk(src, 0) // Because we might have called walk_towards, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
return ..()
|
||||
|
||||
/proc/immovablerod()
|
||||
var/startx = 0
|
||||
|
||||
@@ -9,33 +9,53 @@ var/global/list/additional_antag_types = list()
|
||||
var/votable = 1
|
||||
var/probability = 0
|
||||
|
||||
var/required_players = 0 // Minimum players for round to start if voted in.
|
||||
var/required_players_secret = 0 // Minimum number of players for that game mode to be chose in Secret
|
||||
var/required_enemies = 0 // Minimum antagonists for round to start.
|
||||
/// Minimum players for round to start if voted in.
|
||||
var/required_players = 0
|
||||
/// Minimum number of players for that game mode to be chose in Secret
|
||||
var/required_players_secret = 0
|
||||
/// Minimum antagonists for round to start.
|
||||
var/required_enemies = 0
|
||||
var/newscaster_announcements = null
|
||||
var/end_on_antag_death = 0 // Round will end when all antagonists are dead.
|
||||
var/ert_disabled = 0 // ERT cannot be called.
|
||||
var/deny_respawn = 0 // Disable respawn during this round.
|
||||
/// Round will end when all antagonists are dead.
|
||||
var/end_on_antag_death = 0
|
||||
/// ERT cannot be called.
|
||||
var/ert_disabled = 0
|
||||
/// Disable respawn during this round.
|
||||
var/deny_respawn = 0
|
||||
|
||||
var/list/disabled_jobs = list() // Mostly used for Malf. This check is performed in job_controller so it doesn't spawn a regular AI.
|
||||
/// Mostly used for Malf. This check is performed in job_controller so it doesn't spawn a regular AI.
|
||||
var/list/disabled_jobs = list()
|
||||
|
||||
var/shuttle_delay = 1 // Shuttle transit time is multiplied by this.
|
||||
var/auto_recall_shuttle = 0 // Will the shuttle automatically be recalled?
|
||||
/// Shuttle transit time is multiplied by this.
|
||||
var/shuttle_delay = 1
|
||||
/// Will the shuttle automatically be recalled?
|
||||
var/auto_recall_shuttle = 0
|
||||
|
||||
var/list/antag_tags = list() // Core antag templates to spawn.
|
||||
var/list/antag_templates // Extra antagonist types to include.
|
||||
/// Core antag templates to spawn.
|
||||
var/list/antag_tags = list()
|
||||
/// Extra antagonist types to include.
|
||||
var/list/antag_templates
|
||||
var/list/latejoin_templates = list()
|
||||
var/round_autoantag = 0 // Will this round attempt to periodically spawn more antagonists?
|
||||
var/antag_scaling_coeff = 5 // Coefficient for scaling max antagonists to player count.
|
||||
var/require_all_templates = 0 // Will only start if all templates are checked and can spawn.
|
||||
/// Will this round attempt to periodically spawn more antagonists?
|
||||
var/round_autoantag = 0
|
||||
/// Coefficient for scaling max antagonists to player count.
|
||||
var/antag_scaling_coeff = 5
|
||||
/// Will only start if all templates are checked and can spawn.
|
||||
var/require_all_templates = 0
|
||||
|
||||
var/station_was_nuked = 0 // See nuclearbomb.dm and malfunction.dm.
|
||||
var/explosion_in_progress = 0 // Sit back and relax
|
||||
var/waittime_l = 600 // Lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/waittime_h = 1800 // Upper bound on time before intercept arrives (in tenths of seconds)
|
||||
/// See nuclearbomb.dm and malfunction.dm.
|
||||
var/station_was_nuked = 0
|
||||
/// Sit back and relax
|
||||
var/explosion_in_progress = 0
|
||||
/// Lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/waittime_l = 600
|
||||
/// Upper bound on time before intercept arrives (in tenths of seconds)
|
||||
var/waittime_h = 1800
|
||||
|
||||
var/event_delay_mod_moderate // Modifies the timing of random events.
|
||||
var/event_delay_mod_major // As above.
|
||||
/// Modifies the timing of random events.
|
||||
var/event_delay_mod_moderate
|
||||
/// Modifies the timing of random events.
|
||||
var/event_delay_mod_major
|
||||
|
||||
/datum/game_mode/Topic(href, href_list[])
|
||||
if(..())
|
||||
@@ -114,7 +134,7 @@ var/global/list/additional_antag_types = list()
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/announce() //to be called when round starts
|
||||
to_chat(world, "<B>The current game mode is [capitalize(name)]!</B>")
|
||||
to_chat(world, "<B>The current game mode is [capitalize(name)]!</B>")
|
||||
to_chat(world, "<B>The current engine is [GLOB.used_engine]!</B>")//Actually, why not expand this....
|
||||
if(round_description) to_chat(world, "[round_description]")
|
||||
if(round_autoantag) to_chat(world, "Antagonists will be added to the round automagically as needed.")
|
||||
@@ -298,7 +318,7 @@ var/global/list/additional_antag_types = list()
|
||||
var/escaped_total = 0
|
||||
var/escaped_on_shuttle = 0
|
||||
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom,
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom,
|
||||
/area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom,
|
||||
/area/shuttle/escape,/area/centcom/terminal)
|
||||
|
||||
@@ -438,7 +458,7 @@ var/global/list/additional_antag_types = list()
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
proc/display_roundstart_logout_report()
|
||||
/proc/display_roundstart_logout_report()
|
||||
var/msg = "<span class='notice'><b>Roundstart logout report</b>\n\n"
|
||||
for(var/mob/living/L in GLOB.mob_list)
|
||||
|
||||
@@ -490,7 +510,7 @@ proc/display_roundstart_logout_report()
|
||||
if(M.client && M.client.holder)
|
||||
to_chat(M, msg)
|
||||
|
||||
proc/get_nt_opposed()
|
||||
/proc/get_nt_opposed()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list)
|
||||
if(man.client)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,7 +66,7 @@
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/air_sensor/Destroy()
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
. = ..()
|
||||
@@ -81,7 +81,7 @@ obj/machinery/air_sensor/Destroy()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
circuit = /obj/item/circuitboard/air_management
|
||||
|
||||
obj/machinery/computer/general_air_control/Destroy()
|
||||
/obj/machinery/computer/general_air_control/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
@@ -496,30 +496,30 @@
|
||||
name = "data disk - 'God Emperor of Mankind'"
|
||||
read_only = 1
|
||||
|
||||
New()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_UE|DNA2_BUF_UI
|
||||
//data = "066000033000000000AF00330660FF4DB002690"
|
||||
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
|
||||
buf.dna.real_name="God Emperor of Mankind"
|
||||
buf.dna.unique_enzymes = md5(buf.dna.real_name)
|
||||
buf.dna.UI=list(0x066,0x000,0x033,0x000,0x000,0x000,0xAF0,0x033,0x066,0x0FF,0x4DB,0x002,0x690)
|
||||
//buf.dna.UI=list(0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x000,0x000,0x000,0x000,0x161,0xFBD,0xDEF) // Farmer Jeff
|
||||
buf.dna.UpdateUI()
|
||||
/obj/item/disk/data/demo/New()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_UE|DNA2_BUF_UI
|
||||
//data = "066000033000000000AF00330660FF4DB002690"
|
||||
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
|
||||
buf.dna.real_name="God Emperor of Mankind"
|
||||
buf.dna.unique_enzymes = md5(buf.dna.real_name)
|
||||
buf.dna.UI=list(0x066,0x000,0x033,0x000,0x000,0x000,0xAF0,0x033,0x066,0x0FF,0x4DB,0x002,0x690)
|
||||
//buf.dna.UI=list(0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x000,0x000,0x000,0x000,0x161,0xFBD,0xDEF) // Farmer Jeff
|
||||
buf.dna.UpdateUI()
|
||||
|
||||
/obj/item/disk/data/monkey
|
||||
name = "data disk - 'Mr. Muggles'"
|
||||
read_only = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_SE
|
||||
var/list/new_SE=list(0x098,0x3E8,0x403,0x44C,0x39F,0x4B0,0x59D,0x514,0x5FC,0x578,0x5DC,0x640,0x6A4)
|
||||
for(var/i=new_SE.len;i<=DNA_SE_LENGTH;i++)
|
||||
new_SE += rand(1,1024)
|
||||
buf.dna.SE=new_SE
|
||||
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
|
||||
/obj/item/disk/data/monkey/New()
|
||||
..()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_SE
|
||||
var/list/new_SE=list(0x098,0x3E8,0x403,0x44C,0x39F,0x4B0,0x59D,0x514,0x5FC,0x578,0x5DC,0x640,0x6A4)
|
||||
for(var/i=new_SE.len;i<=DNA_SE_LENGTH;i++)
|
||||
new_SE += rand(1,1024)
|
||||
buf.dna.SE=new_SE
|
||||
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
|
||||
|
||||
/obj/item/disk/data/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#define AIRLOCK_CONTROL_RANGE 22
|
||||
|
||||
// This code allows for airlocks to be controlled externally by setting an id_tag and comm frequency (disables ID access)
|
||||
obj/machinery/door/airlock
|
||||
/obj/machinery/door/airlock
|
||||
var/id_tag
|
||||
var/frequency
|
||||
var/shockedby = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/process(delta_time)
|
||||
/obj/machinery/door/airlock/process(delta_time)
|
||||
if (..() == PROCESS_KILL && !cur_command)
|
||||
. = PROCESS_KILL
|
||||
if (arePowerSystemsOn())
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!arePowerSystemsOn()) return //no power
|
||||
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -27,7 +27,7 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/proc/execute_current_command()
|
||||
/obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if(operating)
|
||||
return //emagged or busy doing something else
|
||||
|
||||
@@ -39,7 +39,7 @@ obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if (command_completed(cur_command))
|
||||
cur_command = null
|
||||
|
||||
obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
/obj/machinery/door/airlock/proc/do_command(command)
|
||||
switch(command)
|
||||
if("open")
|
||||
open()
|
||||
@@ -70,7 +70,7 @@ obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
|
||||
send_status()
|
||||
|
||||
obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
/obj/machinery/door/airlock/proc/command_completed(command)
|
||||
switch(command)
|
||||
if("open")
|
||||
return (!density)
|
||||
@@ -92,7 +92,7 @@ obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
|
||||
return 1 //Unknown command. Just assume it's completed.
|
||||
|
||||
obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
/obj/machinery/door/airlock/proc/send_status(bumped = 0)
|
||||
if(radio_connection)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = TRANSMISSION_RADIO //radio signal
|
||||
@@ -108,17 +108,17 @@ obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, radio_filter = RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/open(surpress_send)
|
||||
/obj/machinery/door/airlock/open(surpress_send)
|
||||
. = ..()
|
||||
if(!surpress_send) send_status()
|
||||
|
||||
|
||||
obj/machinery/door/airlock/close(surpress_send)
|
||||
/obj/machinery/door/airlock/close(surpress_send)
|
||||
. = ..()
|
||||
if(!surpress_send) send_status()
|
||||
|
||||
|
||||
obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
/obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
..(AM)
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
@@ -126,26 +126,26 @@ obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
send_status(1)
|
||||
return
|
||||
|
||||
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
if(new_frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/Initialize()
|
||||
/obj/machinery/door/airlock/Initialize()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/door/airlock/Destroy()
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
if(frequency && radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/airlock_sensor
|
||||
/obj/machinery/airlock_sensor
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "airlock_sensor_off"
|
||||
name = "airlock sensor"
|
||||
@@ -165,7 +165,7 @@ obj/machinery/airlock_sensor
|
||||
var/alert = 0
|
||||
var/previousPressure
|
||||
|
||||
obj/machinery/airlock_sensor/update_icon()
|
||||
/obj/machinery/airlock_sensor/update_icon()
|
||||
if(on)
|
||||
if(alert)
|
||||
icon_state = "airlock_sensor_alert"
|
||||
@@ -174,7 +174,7 @@ obj/machinery/airlock_sensor/update_icon()
|
||||
else
|
||||
icon_state = "airlock_sensor_off"
|
||||
|
||||
obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
/obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = TRANSMISSION_RADIO //radio signal
|
||||
signal.data["tag"] = master_tag
|
||||
@@ -183,7 +183,7 @@ obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, radio_filter = RADIO_AIRLOCK)
|
||||
flick("airlock_sensor_cycle", src)
|
||||
|
||||
obj/machinery/airlock_sensor/process(delta_time)
|
||||
/obj/machinery/airlock_sensor/process(delta_time)
|
||||
if(on)
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
var/pressure = round(air_sample.return_pressure(),0.1)
|
||||
@@ -203,34 +203,34 @@ obj/machinery/airlock_sensor/process(delta_time)
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
obj/machinery/airlock_sensor/Initialize()
|
||||
/obj/machinery/airlock_sensor/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/airlock_sensor/Destroy()
|
||||
/obj/machinery/airlock_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/airlock_sensor/airlock_interior
|
||||
/obj/machinery/airlock_sensor/airlock_interior
|
||||
command = "cycle_interior"
|
||||
|
||||
obj/machinery/airlock_sensor/airlock_exterior
|
||||
/obj/machinery/airlock_sensor/airlock_exterior
|
||||
command = "cycle_exterior"
|
||||
|
||||
// Return the air from the turf in "front" of us (Used in shuttles, so it can be in the shuttle area but sense outside it)
|
||||
obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
|
||||
/obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(isnull(T))
|
||||
return ..()
|
||||
return T.return_air()
|
||||
|
||||
obj/machinery/access_button
|
||||
/obj/machinery/access_button
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "access_button_standby"
|
||||
name = "access button"
|
||||
@@ -247,20 +247,20 @@ obj/machinery/access_button
|
||||
var/on = 1
|
||||
|
||||
|
||||
obj/machinery/access_button/update_icon()
|
||||
/obj/machinery/access_button/update_icon()
|
||||
if(on)
|
||||
icon_state = "access_button_standby"
|
||||
else
|
||||
icon_state = "access_button_off"
|
||||
|
||||
obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
|
||||
//Swiping ID on the access button
|
||||
if (istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
attack_hand(user)
|
||||
return
|
||||
..()
|
||||
|
||||
obj/machinery/access_button/attack_hand(mob/user)
|
||||
/obj/machinery/access_button/attack_hand(mob/user)
|
||||
..()
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
@@ -275,25 +275,25 @@ obj/machinery/access_button/attack_hand(mob/user)
|
||||
flick("access_button_cycle", src)
|
||||
|
||||
|
||||
obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/access_button/Initialize()
|
||||
/obj/machinery/access_button/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/access_button/Destroy()
|
||||
/obj/machinery/access_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/access_button/airlock_interior
|
||||
/obj/machinery/access_button/airlock_interior
|
||||
frequency = 1379
|
||||
command = "cycle_interior"
|
||||
|
||||
obj/machinery/access_button/airlock_exterior
|
||||
/obj/machinery/access_button/airlock_exterior
|
||||
frequency = 1379
|
||||
command = "cycle_exterior"
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
// SUBTYPE: Regular
|
||||
// Your classical blast door, found almost everywhere.
|
||||
obj/machinery/door/blast/regular
|
||||
/obj/machinery/door/blast/regular
|
||||
icon_state_open = "pdoor0"
|
||||
icon_state_opening = "pdoorc0"
|
||||
icon_state_closed = "pdoor1"
|
||||
@@ -284,7 +284,7 @@ obj/machinery/door/blast/regular
|
||||
icon_state = "pdoor1"
|
||||
maxhealth = 600
|
||||
|
||||
obj/machinery/door/blast/regular/open
|
||||
/obj/machinery/door/blast/regular/open
|
||||
icon_state = "pdoor0"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
obj/structure/firedoor_assembly
|
||||
/obj/structure/firedoor_assembly
|
||||
name = "\improper emergency shutter assembly"
|
||||
desc = "It can save lives."
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
@@ -8,13 +8,13 @@ obj/structure/firedoor_assembly
|
||||
density = 1
|
||||
var/wired = 0
|
||||
|
||||
obj/structure/firedoor_assembly/update_icon()
|
||||
/obj/structure/firedoor_assembly/update_icon()
|
||||
if(anchored)
|
||||
icon_state = "door_anchored"
|
||||
else
|
||||
icon_state = "door_construction"
|
||||
|
||||
obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
|
||||
/obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
|
||||
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
|
||||
var/obj/item/stack/cable_coil/cable = C
|
||||
if (cable.get_amount() < 1)
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
// Pumps: (obj/machinery/atmospherics/component/unary/vent_pump/high_volume), frequency = 1379 id_tag = "[base]_pump"
|
||||
//
|
||||
|
||||
obj/machinery/airlock_sensor/phoron
|
||||
/obj/machinery/airlock_sensor/phoron
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "airlock_sensor_off"
|
||||
name = "phoronlock sensor"
|
||||
var/previousPhoron
|
||||
|
||||
obj/machinery/airlock_sensor/phoron/process()
|
||||
/obj/machinery/airlock_sensor/phoron/process()
|
||||
if(on)
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
var/pressure = round(air_sample.return_pressure(), 0.1)
|
||||
@@ -38,10 +38,10 @@ obj/machinery/airlock_sensor/phoron/process()
|
||||
alert = (pressure < ONE_ATMOSPHERE*0.8) || (phoron > 0.5)
|
||||
update_icon()
|
||||
|
||||
obj/machinery/airlock_sensor/phoron/airlock_interior
|
||||
/obj/machinery/airlock_sensor/phoron/airlock_interior
|
||||
command = "cycle_interior"
|
||||
|
||||
obj/machinery/airlock_sensor/phoron/airlock_exterior
|
||||
/obj/machinery/airlock_sensor/phoron/airlock_exterior
|
||||
command = "cycle_exterior"
|
||||
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
signalDoor(tag_exterior_door, command)
|
||||
signalDoor(tag_interior_door, command)
|
||||
|
||||
datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
|
||||
/datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(command, sensor)
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = sensor
|
||||
signal.data["command"] = command
|
||||
|
||||
@@ -813,7 +813,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
drop_sound = 'sound/items/drop/wrapper.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wrapper.ogg'
|
||||
|
||||
obj/item/newspaper/attack_self(mob/user as mob)
|
||||
/obj/item/newspaper/attack_self(mob/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
var/dat
|
||||
@@ -892,7 +892,7 @@ obj/item/newspaper/attack_self(mob/user as mob)
|
||||
else
|
||||
to_chat(user, "The paper is full of intelligible symbols!")
|
||||
|
||||
obj/item/newspaper/Topic(href, href_list)
|
||||
/obj/item/newspaper/Topic(href, href_list)
|
||||
var/mob/living/U = usr
|
||||
..()
|
||||
if((src in U.contents) || (istype(loc, /turf) && in_range(src, U)))
|
||||
@@ -923,7 +923,7 @@ obj/item/newspaper/Topic(href, href_list)
|
||||
if(istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
|
||||
obj/item/newspaper/attackby(obj/item/W, mob/user)
|
||||
/obj/item/newspaper/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(scribble_page == curr_page)
|
||||
to_chat(user, "<font color=#4F49AF>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>")
|
||||
|
||||
@@ -200,7 +200,7 @@ var/bomb_set
|
||||
extended = 1
|
||||
return
|
||||
|
||||
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
/obj/machinery/nuclearbomb/proc/nukehack_win(mob/user)
|
||||
var/dat
|
||||
dat += "<TT><B>Nuclear Fission Explosive</B><BR>\nNuclear Device Wires:</A><HR>"
|
||||
for(var/wire in wires)
|
||||
|
||||
@@ -317,13 +317,13 @@
|
||||
|
||||
return
|
||||
|
||||
proc/getr(col)
|
||||
/proc/getr(col)
|
||||
return hex2num(copytext(col, 2,4))
|
||||
|
||||
proc/getg(col)
|
||||
/proc/getg(col)
|
||||
return hex2num(copytext(col, 4,6))
|
||||
|
||||
proc/getb(col)
|
||||
/proc/getb(col)
|
||||
return hex2num(copytext(col, 6))
|
||||
|
||||
/mob/proc/clearmap()
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
autolinkers = list("receiverA") // link to relay
|
||||
freq_listening = list(AI_FREQ, SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ, ENT_FREQ)
|
||||
|
||||
//Common and other radio frequencies for people to freely use
|
||||
New()
|
||||
for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
|
||||
freq_listening |= i
|
||||
..()
|
||||
/// Common and other radio frequencies for people to freely use.
|
||||
/obj/machinery/telecomms/receiver/preset_right/New()
|
||||
for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
|
||||
freq_listening |= i
|
||||
..()
|
||||
|
||||
/obj/machinery/telecomms/receiver/preset_cent
|
||||
id = "CentCom Receiver"
|
||||
|
||||
@@ -22,39 +22,55 @@
|
||||
desc = "Exosuit"
|
||||
description_info = "Alt click to strafe."
|
||||
icon = 'icons/mecha/mecha.dmi'
|
||||
density = 1 //Dense. To raise the heat.
|
||||
opacity = 1 //Opaque. Menacing.
|
||||
anchored = 1 //No pulling around.
|
||||
unacidable = 1 //And no deleting hoomans inside
|
||||
layer = MOB_LAYER //Icon draw layer
|
||||
infra_luminosity = 15 //Byond implementation is bugged.
|
||||
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
||||
/// Dense. To raise the heat.
|
||||
density = 1
|
||||
/// Opaque. Menacing.
|
||||
opacity = 1
|
||||
/// No pulling around.
|
||||
anchored = 1
|
||||
/// And no deleting hoomans inside.
|
||||
unacidable = 1
|
||||
/// Icon draw layer.
|
||||
layer = MOB_LAYER
|
||||
/// Byond implementation is bugged.
|
||||
infra_luminosity = 15
|
||||
/// Mech type for resetting icon. Only used for reskinning kits (see custom items).
|
||||
var/initial_icon = null
|
||||
var/can_move = 1
|
||||
var/mob/living/carbon/occupant = null
|
||||
|
||||
var/step_in = 10 //Make a step in step_in/10 sec.
|
||||
var/encumbrance_gap = 1 //How many points of slowdown are negated from equipment? Added to the mech's base step_in.
|
||||
/// Make a step in step_in/10 sec.
|
||||
var/step_in = 10
|
||||
/// How many points of slowdown are negated from equipment? Added to the mech's base step_in.
|
||||
var/encumbrance_gap = 1
|
||||
|
||||
var/dir_in = 2 //What direction will the mech face when entered/powered on? Defaults to South.
|
||||
/// What direction will the mech face when entered/powered on? Defaults to South.
|
||||
var/dir_in = 2
|
||||
var/step_energy_drain = 10
|
||||
var/health = 300 //Health is health
|
||||
var/maxhealth = 300 //Maxhealth is maxhealth.
|
||||
var/deflect_chance = 10 //Chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
|
||||
//the values in this list show how much damage will pass through, not how much will be absorbed.
|
||||
/// Health is healthdrain = 10
|
||||
var/health = 300
|
||||
/// Maxhealth is maxhealth.
|
||||
var/maxhealth = 300
|
||||
/// Chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
|
||||
var/deflect_chance = 10
|
||||
/// The values in this list show how much damage will pass through, not how much will be absorbed.
|
||||
var/list/damage_absorption = list(
|
||||
"brute"=0.8,
|
||||
"fire"=1.2,
|
||||
"bullet"=0.9,
|
||||
"laser"=1,
|
||||
"energy"=1,
|
||||
"bomb"=1,
|
||||
"bio"=1,
|
||||
"rad"=1
|
||||
)
|
||||
"brute"=0.8,
|
||||
"fire"=1.2,
|
||||
"bullet"=0.9,
|
||||
"laser"=1,
|
||||
"energy"=1,
|
||||
"bomb"=1,
|
||||
"bio"=1,
|
||||
"rad"=1,
|
||||
)
|
||||
|
||||
var/damage_minimum = 10 //Incoming damage lower than this won't actually deal damage. Scrapes shouldn't be a real thing.
|
||||
var/minimum_penetration = 15 //Incoming damage won't be fully applied if you don't have at least 20. Almost all AP clears this.
|
||||
var/fail_penetration_value = 0.66 //By how much failing to penetrate reduces your shit. 66% by default. 100dmg = 66dmg if failed pen
|
||||
/// Incoming damage lower than this won't actually deal damage. Scrapes shouldn't be a real thing.
|
||||
var/damage_minimum = 10
|
||||
/// Incoming damage won't be fully applied if you don't have at least 20. Almost all AP clears this.
|
||||
var/minimum_penetration = 15
|
||||
/// By how much failing to penetrate reduces your shit. 66% by default. 100dmg = 66dmg if failed pen.
|
||||
var/fail_penetration_value = 0.66
|
||||
|
||||
var/obj/item/cell/cell
|
||||
var/state = MECHA_OPERATING
|
||||
@@ -62,20 +78,23 @@
|
||||
var/last_message = 0
|
||||
var/add_req_access = 1
|
||||
var/maint_access = 1
|
||||
var/dna //Dna-locking the mech
|
||||
var/list/proc_res = list() //Stores proc owners, like proc_res["functionname"] = owner reference
|
||||
/// Dna-locking the mech.
|
||||
var/dna
|
||||
/// Stores proc owners, like proc_res["functionname"] = owner reference.
|
||||
var/list/proc_res = list()
|
||||
var/datum/effect_system/spark_spread/spark_system = new
|
||||
var/lights = 0
|
||||
var/lights_power = 6
|
||||
var/force = 0
|
||||
|
||||
var/mech_faction = null
|
||||
var/firstactivation = 0 //It's simple. If it's 0, no one entered it yet. Otherwise someone entered it at least once.
|
||||
/// It's simple. If it's 0, no one entered it yet. Otherwise someone entered it at least once.
|
||||
var/firstactivation = 0
|
||||
|
||||
var/stomp_sound = 'sound/mecha/mechstep.ogg'
|
||||
var/swivel_sound = 'sound/mecha/mechturn.ogg'
|
||||
|
||||
//inner atmos
|
||||
//! Inner atmos
|
||||
var/use_internal_tank = 0
|
||||
var/internal_tank_valve = ONE_ATMOSPHERE
|
||||
var/obj/machinery/portable_atmospherics/canister/internal_tank
|
||||
@@ -84,23 +103,33 @@
|
||||
|
||||
var/obj/item/radio/radio = null
|
||||
|
||||
var/max_temperature = 25000 //Kelvin values.
|
||||
var/internal_damage_threshold = 33 //Health percentage below which internal damage is possible
|
||||
var/internal_damage_minimum = 15 //At least this much damage to trigger some real bad hurt.
|
||||
var/internal_damage = 0 //Contains bitflags
|
||||
/// Kelvin values.
|
||||
var/max_temperature = 25000
|
||||
/// Health percentage below which internal damage is possible.
|
||||
var/internal_damage_threshold = 33
|
||||
/// At least this much damage to trigger some real bad hurt.
|
||||
var/internal_damage_minimum = 15
|
||||
/// Contains bitflags.
|
||||
var/internal_damage = 0
|
||||
|
||||
var/list/operation_req_access = list() //Required access level for mecha operation
|
||||
var/list/internals_req_access = list(access_engine,access_robotics) //Required access level to open cell compartment
|
||||
/// Required access level for mecha operation.
|
||||
var/list/operation_req_access = list()
|
||||
/// Required access level to open cell compartment.
|
||||
var/list/internals_req_access = list(access_engine,access_robotics)
|
||||
|
||||
var/datum/global_iterator/pr_int_temp_processor //Normalizes internal air mixture temperature
|
||||
var/datum/global_iterator/pr_inertial_movement //Controls intertial movement in spesss
|
||||
var/datum/global_iterator/pr_give_air //Moves air from tank to cabin
|
||||
var/datum/global_iterator/pr_internal_damage //Processes internal damage
|
||||
/// Normalizes internal air mixture temperature.
|
||||
var/datum/global_iterator/pr_int_temp_processor
|
||||
/// Controls intertial movement in spesss.
|
||||
var/datum/global_iterator/pr_inertial_movement
|
||||
/// Moves air from tank to cabin.
|
||||
var/datum/global_iterator/pr_give_air
|
||||
/// Processes internal damage.
|
||||
var/datum/global_iterator/pr_internal_damage
|
||||
|
||||
|
||||
var/wreckage
|
||||
|
||||
var/list/equipment = new //This lists holds what stuff you bolted onto your baby ride
|
||||
/// This lists holds what stuff you bolted onto your baby ride.
|
||||
var/list/equipment = new
|
||||
var/obj/item/mecha_parts/mecha_equipment/selected
|
||||
var/max_equip = 2
|
||||
var/datum/events/events
|
||||
@@ -117,7 +146,8 @@
|
||||
var/max_universal_equip = 2
|
||||
var/max_special_equip = 1
|
||||
|
||||
var/list/starting_equipment = null // List containing starting tools.
|
||||
/// List containing starting tools.
|
||||
var/list/starting_equipment = null
|
||||
|
||||
// Mech Components, similar to Cyborg, but Bigger.
|
||||
var/list/internal_components = list(
|
||||
@@ -144,7 +174,7 @@
|
||||
var/static/image/radial_image_lighttoggle = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_light")
|
||||
var/static/image/radial_image_statpanel = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine2")
|
||||
|
||||
//Mech actions
|
||||
//! Mech actions
|
||||
var/datum/mini_hud/mech/minihud
|
||||
/// re we strafing or not?
|
||||
var/strafing = 0
|
||||
@@ -210,14 +240,15 @@
|
||||
var/datum/action/innate/mecha/mech_toggle_phasing/phasing_action = new
|
||||
var/datum/action/innate/mecha/mech_toggle_cloaking/cloak_action = new
|
||||
|
||||
var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times.
|
||||
/// So combat mechs don't switch to their equipment at times.
|
||||
var/weapons_only_cycle = FALSE
|
||||
|
||||
/obj/mecha/Initialize(mapload)
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/create_components)
|
||||
update_transform()
|
||||
|
||||
// shitcode
|
||||
//! shitcode
|
||||
// VEHICLE MECHS WHEN?
|
||||
/obj/mecha/proc/create_components()
|
||||
for(var/path in starting_components)
|
||||
@@ -2682,15 +2713,15 @@
|
||||
//////// Mecha global iterators ////////
|
||||
//////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/global_iterator/mecha_preserve_temp //normalizing cabin air temperature to 20 degrees celsium
|
||||
/// Normalizing cabin air temperature to 20 degrees celcius.
|
||||
/datum/global_iterator/mecha_preserve_temp
|
||||
delay = 20
|
||||
|
||||
process(var/obj/mecha/mecha)
|
||||
if(mecha.cabin_air && mecha.cabin_air.volume > 0)
|
||||
var/delta = mecha.cabin_air.temperature - T20C
|
||||
mecha.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
|
||||
return
|
||||
/datum/global_iterator/mecha_preserve_temp/process(obj/mecha/mecha)
|
||||
if(mecha.cabin_air && mecha.cabin_air.volume > 0)
|
||||
var/delta = mecha.cabin_air.temperature - T20C
|
||||
mecha.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
|
||||
return
|
||||
|
||||
/datum/global_iterator/mecha_tank_give_air
|
||||
delay = 15
|
||||
|
||||
@@ -17,22 +17,22 @@
|
||||
icon_state = "backbone"
|
||||
var/datum/construction/construct
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!construct || !construct.action(W, user))
|
||||
..()
|
||||
return
|
||||
/obj/item/mecha_parts/chassis/attackby(obj/item/W, mob/user)
|
||||
if(!construct || !construct.action(W, user))
|
||||
..()
|
||||
return
|
||||
|
||||
attack_hand()
|
||||
return
|
||||
/obj/item/mecha_parts/chassis/attack_hand()
|
||||
return
|
||||
|
||||
/////////// Ripley
|
||||
//! Ripley
|
||||
|
||||
/obj/item/mecha_parts/chassis/ripley
|
||||
name = "Ripley Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/ripley_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/ripley/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/ripley_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_torso
|
||||
name="Ripley Torso"
|
||||
@@ -64,14 +64,14 @@
|
||||
icon_state = "ripley_r_leg"
|
||||
origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
|
||||
|
||||
///////// Gygax
|
||||
//! Gygax
|
||||
|
||||
/obj/item/mecha_parts/chassis/gygax
|
||||
name = "Gygax Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/gygax_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/gygax/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/gygax_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_torso
|
||||
name="Gygax Torso"
|
||||
@@ -112,23 +112,23 @@
|
||||
icon_state = "gygax_armour"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_COMBAT = 4, TECH_ENGINEERING = 5)
|
||||
|
||||
////////// Serenity
|
||||
//! Serenity
|
||||
|
||||
/obj/item/mecha_parts/chassis/serenity
|
||||
name = "Serenity Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/serenity_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/serenity/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/serenity_chassis(src)
|
||||
|
||||
//////////// Durand
|
||||
//! Durand
|
||||
|
||||
/obj/item/mecha_parts/chassis/durand
|
||||
name = "Durand Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/durand_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/durand/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/durand_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/durand_torso
|
||||
name="Durand Torso"
|
||||
@@ -167,14 +167,14 @@
|
||||
|
||||
|
||||
|
||||
////////// Firefighter
|
||||
//! Firefighter
|
||||
|
||||
/obj/item/mecha_parts/chassis/firefighter
|
||||
name = "Firefighter Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/firefighter_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/firefighter/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/firefighter_chassis(src)
|
||||
/*
|
||||
/obj/item/mecha_parts/part/firefighter_torso
|
||||
name="Ripley-on-Fire Torso"
|
||||
@@ -197,29 +197,29 @@
|
||||
icon_state = "ripley_r_leg"
|
||||
*/
|
||||
|
||||
////////// Firefighter
|
||||
//! Geiger
|
||||
|
||||
/obj/item/mecha_parts/chassis/geiger
|
||||
name = "Lightweight APLU Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/geiger_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/geiger/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/geiger_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/geiger_torso
|
||||
name="Lightweight APLU Torso"
|
||||
icon_state = "ripley_harness"
|
||||
|
||||
|
||||
////////// Phazon
|
||||
//! Phazon
|
||||
|
||||
/obj/item/mecha_parts/chassis/phazon
|
||||
name = "Phazon Chassis"
|
||||
origin_tech = list(TECH_MATERIAL = 7)
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/phazon_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/phazon/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/phazon_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_torso
|
||||
name="Phazon Torso"
|
||||
@@ -269,9 +269,9 @@
|
||||
/obj/item/mecha_parts/chassis/odysseus
|
||||
name = "Odysseus Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/odysseus_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/odysseus/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/odysseus_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_head
|
||||
name="Odysseus Head"
|
||||
@@ -315,15 +315,15 @@
|
||||
construction_time = 200
|
||||
construction_cost = list(MAT_STEEL=15000)*/
|
||||
|
||||
////////// Janus
|
||||
//! Janus
|
||||
|
||||
/obj/item/mecha_parts/chassis/janus
|
||||
name = "Janus Chassis"
|
||||
origin_tech = list(TECH_MATERIAL = 7)
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/janus_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/janus/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/janus_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/janus_torso
|
||||
name="Imperion Torso"
|
||||
@@ -355,14 +355,14 @@
|
||||
icon_state = "janus_r_leg"
|
||||
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3, TECH_ARCANE = 1)
|
||||
|
||||
///////// Honker
|
||||
//! Honker
|
||||
|
||||
/obj/item/mecha_parts/chassis/honker
|
||||
name = "H.O.N.K. Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/honker_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/honker/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/honker_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/honker_torso
|
||||
name="H.O.N.K. Torso"
|
||||
@@ -403,14 +403,14 @@
|
||||
icon_state = "honker_armour"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_COMBAT = 4, TECH_ENGINEERING = 5, TECH_ILLEGAL = 5)
|
||||
|
||||
///////// Reticent
|
||||
//! Reticent
|
||||
|
||||
/obj/item/mecha_parts/chassis/reticent
|
||||
name = "Reticent Chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/reticent_chassis(src)
|
||||
/obj/item/mecha_parts/chassis/reticent/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/reticent_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/part/reticent_torso
|
||||
name="Reticent Torso"
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
var/list/crowbar_salvage
|
||||
var/salvage_num = 5
|
||||
|
||||
New()
|
||||
..()
|
||||
crowbar_salvage = new
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/New()
|
||||
..()
|
||||
crowbar_salvage = new
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ex_act(severity)
|
||||
if(severity < 2)
|
||||
@@ -80,20 +80,22 @@
|
||||
name = "Gygax wreckage"
|
||||
icon_state = "gygax-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
|
||||
/obj/item/mecha_parts/part/gygax_head,
|
||||
/obj/item/mecha_parts/part/gygax_left_arm,
|
||||
/obj/item/mecha_parts/part/gygax_right_arm,
|
||||
/obj/item/mecha_parts/part/gygax_left_leg,
|
||||
/obj/item/mecha_parts/part/gygax_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/gygax/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/gygax_torso,
|
||||
/obj/item/mecha_parts/part/gygax_head,
|
||||
/obj/item/mecha_parts/part/gygax_left_arm,
|
||||
/obj/item/mecha_parts/part/gygax_right_arm,
|
||||
/obj/item/mecha_parts/part/gygax_left_leg,
|
||||
/obj/item/mecha_parts/part/gygax_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/gygax/dark
|
||||
name = "Dark Gygax wreckage"
|
||||
@@ -128,56 +130,62 @@
|
||||
name = "Ripley wreckage"
|
||||
icon_state = "ripley-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/ripley/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/firefighter
|
||||
name = "Firefighter wreckage"
|
||||
icon_state = "firefighter-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg,
|
||||
/obj/item/clothing/suit/fire)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg,
|
||||
/obj/item/clothing/suit/fire,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/geiger
|
||||
name = "Lightweight APLU wreckage"
|
||||
icon_state = "ripley-broken-old"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/geiger_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/ripley/geiger/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/geiger_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley/deathripley
|
||||
@@ -188,21 +196,22 @@
|
||||
name = "Durand wreckage"
|
||||
icon_state = "durand-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/durand_torso,
|
||||
/obj/item/mecha_parts/part/durand_head,
|
||||
/obj/item/mecha_parts/part/durand_left_arm,
|
||||
/obj/item/mecha_parts/part/durand_right_arm,
|
||||
/obj/item/mecha_parts/part/durand_left_leg,
|
||||
/obj/item/mecha_parts/part/durand_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/durand/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/durand_torso,
|
||||
/obj/item/mecha_parts/part/durand_head,
|
||||
/obj/item/mecha_parts/part/durand_left_arm,
|
||||
/obj/item/mecha_parts/part/durand_right_arm,
|
||||
/obj/item/mecha_parts/part/durand_left_leg,
|
||||
/obj/item/mecha_parts/part/durand_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/phazon
|
||||
name = "Phazon wreckage"
|
||||
@@ -213,21 +222,22 @@
|
||||
name = "Odysseus wreckage"
|
||||
icon_state = "odysseus-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/odysseus_torso,
|
||||
/obj/item/mecha_parts/part/odysseus_head,
|
||||
/obj/item/mecha_parts/part/odysseus_left_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_right_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_left_leg,
|
||||
/obj/item/mecha_parts/part/odysseus_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/odysseus/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/odysseus_torso,
|
||||
/obj/item/mecha_parts/part/odysseus_head,
|
||||
/obj/item/mecha_parts/part/odysseus_left_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_right_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_left_leg,
|
||||
/obj/item/mecha_parts/part/odysseus_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/odysseus/murdysseus
|
||||
icon_state = "murdysseus-broken"
|
||||
@@ -254,20 +264,22 @@
|
||||
name = "H.O.N.K. wreckage"
|
||||
icon_state = "honker-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/honker_torso,
|
||||
/obj/item/mecha_parts/part/honker_head,
|
||||
/obj/item/mecha_parts/part/honker_left_arm,
|
||||
/obj/item/mecha_parts/part/honker_right_arm,
|
||||
/obj/item/mecha_parts/part/honker_left_leg,
|
||||
/obj/item/mecha_parts/part/honker_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/honker/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/honker_torso,
|
||||
/obj/item/mecha_parts/part/honker_head,
|
||||
/obj/item/mecha_parts/part/honker_left_arm,
|
||||
/obj/item/mecha_parts/part/honker_right_arm,
|
||||
/obj/item/mecha_parts/part/honker_left_leg,
|
||||
/obj/item/mecha_parts/part/honker_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/honker/cluwne
|
||||
name = "C.L.W.U.N.E. wreckage"
|
||||
@@ -279,20 +291,22 @@
|
||||
name = "Reticent wreckage"
|
||||
icon_state = "reticent-broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/parts = list(/obj/item/mecha_parts/part/reticent_torso,
|
||||
/obj/item/mecha_parts/part/reticent_head,
|
||||
/obj/item/mecha_parts/part/reticent_left_arm,
|
||||
/obj/item/mecha_parts/part/reticent_right_arm,
|
||||
/obj/item/mecha_parts/part/reticent_left_leg,
|
||||
/obj/item/mecha_parts/part/reticent_right_leg)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
/obj/effect/decal/mecha_wreckage/reticent/New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
/obj/item/mecha_parts/part/reticent_torso,
|
||||
/obj/item/mecha_parts/part/reticent_head,
|
||||
/obj/item/mecha_parts/part/reticent_left_arm,
|
||||
/obj/item/mecha_parts/part/reticent_right_arm,
|
||||
/obj/item/mecha_parts/part/reticent_left_leg,
|
||||
/obj/item/mecha_parts/part/reticent_right_leg,
|
||||
)
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!!length(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/reticent/reticence
|
||||
name = "Reticence wreckage"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,26 +7,27 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
|
||||
/obj/item/mecha_parts/micro/chassis/
|
||||
/obj/item/mecha_parts/micro/chassis
|
||||
name="Mecha Chassis"
|
||||
icon_state = "backbone"
|
||||
var/datum/construction/construct
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!construct || !construct.action(W, user))
|
||||
..()
|
||||
return
|
||||
/obj/item/mecha_parts/micro/chassis/attackby(obj/item/W, mob/user)
|
||||
if(!construct || !construct.action(W, user))
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/micro/chassis/attack_hand()
|
||||
return
|
||||
|
||||
attack_hand()
|
||||
return
|
||||
//Gopher
|
||||
/obj/item/mecha_parts/micro/chassis/gopher
|
||||
name = "Gopher Chassis"
|
||||
icon_state = "gopher-chassis"
|
||||
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/gopher_chassis(src)
|
||||
/obj/item/mecha_parts/micro/chassis/gopher/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/gopher_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/micro/part/gopher_torso
|
||||
name="Gopher Torso"
|
||||
@@ -62,9 +63,10 @@
|
||||
/obj/item/mecha_parts/micro/chassis/polecat
|
||||
name = "Polecat Chassis"
|
||||
icon_state = "polecat-chassis"
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/polecat_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/micro/chassis/polecat/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/polecat_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/micro/part/polecat_torso
|
||||
name="Polecat Torso"
|
||||
@@ -100,9 +102,10 @@
|
||||
/obj/item/mecha_parts/micro/chassis/weasel
|
||||
name = "Weasel Chassis"
|
||||
icon_state = "weasel-chassis"
|
||||
New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/weasel_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/micro/chassis/weasel/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/weasel_chassis(src)
|
||||
|
||||
/obj/item/mecha_parts/micro/part/weasel_torso
|
||||
name="Weasel Torso"
|
||||
|
||||
@@ -61,25 +61,25 @@
|
||||
equip_type = EQUIP_MICRO_WEAPON
|
||||
required_type = list(/obj/mecha/micro/sec)
|
||||
|
||||
Topic(href,href_list)
|
||||
..()
|
||||
if(href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
switch(mode)
|
||||
if(0)
|
||||
occupant_message("Now firing buckshot.")
|
||||
projectile = /obj/item/projectile/bullet/pellet/shotgun
|
||||
if(1)
|
||||
occupant_message("Now firing beanbags.")
|
||||
projectile = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
if(2)
|
||||
occupant_message("Now firing slugs.")
|
||||
projectile = /obj/item/projectile/bullet/shotgun
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/microshotgun/Topic(href,href_list)
|
||||
..()
|
||||
if(href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
switch(mode)
|
||||
if(0)
|
||||
occupant_message("Now firing buckshot.")
|
||||
projectile = /obj/item/projectile/bullet/pellet/shotgun
|
||||
if(1)
|
||||
occupant_message("Now firing beanbags.")
|
||||
projectile = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
if(2)
|
||||
occupant_message("Now firing slugs.")
|
||||
projectile = /obj/item/projectile/bullet/shotgun
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
get_equip_info()
|
||||
return "[..()] \[<a href='?src=\ref[src];mode=0'>BS</a>|<a href='?src=\ref[src];mode=1'>BB</a>|<a href='?src=\ref[src];mode=2'>S</a>\]"
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/microshotgun/get_equip_info()
|
||||
return "[..()] \[<a href='?src=\ref[src];mode=0'>BS</a>|<a href='?src=\ref[src];mode=1'>BB</a>|<a href='?src=\ref[src];mode=2'>S</a>\]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade/microflashbang
|
||||
@@ -113,44 +113,45 @@
|
||||
equip_type = EQUIP_MICRO_UTILITY
|
||||
required_type = list(/obj/mecha/micro/utility)
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
if(isobj(target))
|
||||
var/obj/target_obj = target
|
||||
if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='danger'>[chassis] starts to drill [target]</span>", "<span class='warning'>You hear the drill.</span>")
|
||||
occupant_message("<span class='danger'>You start to drill [target]</span>")
|
||||
var/T = chassis.loc
|
||||
var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = target
|
||||
if(W.reinf_material)
|
||||
occupant_message("<span class='warning'>[target] is too durable to drill through.</span>")
|
||||
else
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(2)
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.GetDrilled()
|
||||
log_message("Drilled through [target]")
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/ore_box = (locate(/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop) in chassis.equipment)
|
||||
if(ore_box)
|
||||
for(var/obj/item/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
if (ore_box.contents.len >= ore_box.orecapacity)
|
||||
occupant_message("<span class='warning'>The ore compartment is full.</span>")
|
||||
return 1
|
||||
else
|
||||
ore.forceMove(ore_box)
|
||||
else if(target.loc == C)
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/micro/action(atom/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(isobj(target))
|
||||
var/obj/target_obj = target
|
||||
if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='danger'>[chassis] starts to drill [target]</span>", "<span class='warning'>You hear the drill.</span>")
|
||||
occupant_message("<span class='danger'>You start to drill [target]</span>")
|
||||
var/T = chassis.loc
|
||||
var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = target
|
||||
if(W.reinf_material)
|
||||
occupant_message("<span class='warning'>[target] is too durable to drill through.</span>")
|
||||
else
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.GetDrilled()
|
||||
log_message("Drilled through [target]")
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/ore_box = (locate(/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop) in chassis.equipment)
|
||||
if(ore_box)
|
||||
for(var/obj/item/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
if (ore_box.contents.len >= ore_box.orecapacity)
|
||||
occupant_message("<span class='warning'>The ore compartment is full.</span>")
|
||||
return 1
|
||||
else
|
||||
ore.forceMove(ore_box)
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop
|
||||
@@ -165,38 +166,39 @@
|
||||
required_type = list(/obj/mecha/micro/utility)
|
||||
var/orecapacity = 500
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='info'>[chassis] sweeps around with its ore scoop.</span>")
|
||||
occupant_message("<span class='info'>You sweep around the area with the scoop.</span>")
|
||||
var/T = chassis.loc
|
||||
//var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
for(var/obj/item/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
if (contents.len >= orecapacity)
|
||||
occupant_message("<span class='warning'>The ore compartment is full.</span>")
|
||||
return 1
|
||||
else
|
||||
ore.Move(src)
|
||||
return 1
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/action(atom/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='info'>[chassis] sweeps around with its ore scoop.</span>")
|
||||
occupant_message("<span class='info'>You sweep around the area with the scoop.</span>")
|
||||
var/T = chassis.loc
|
||||
//var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
for(var/obj/item/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
if (contents.len >= orecapacity)
|
||||
occupant_message("<span class='warning'>The ore compartment is full.</span>")
|
||||
return 1
|
||||
else
|
||||
ore.Move(src)
|
||||
return 1
|
||||
|
||||
Topic(href,href_list)
|
||||
..()
|
||||
if (href_list["empty_box"])
|
||||
if(contents.len < 1)
|
||||
occupant_message("The ore compartment is empty.")
|
||||
return
|
||||
for (var/obj/item/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = chassis.loc
|
||||
occupant_message("Ore compartment emptied.")
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/Topic(href,href_list)
|
||||
..()
|
||||
if (href_list["empty_box"])
|
||||
if(contents.len < 1)
|
||||
occupant_message("The ore compartment is empty.")
|
||||
return
|
||||
for (var/obj/item/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = chassis.loc
|
||||
occupant_message("Ore compartment emptied.")
|
||||
|
||||
get_equip_info()
|
||||
return "[..()] <br /><a href='?src=\ref[src];empty_box=1'>Empty ore compartment</a>"
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/get_equip_info()
|
||||
return "[..()] <br /><a href='?src=\ref[src];empty_box=1'>Empty ore compartment</a>"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/orescoop/verb/empty_box() //so you can still get the ore out if someone detaches it from the mech
|
||||
set name = "Empty Ore compartment"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/// Icon overlay for ADD highlights when applicable.
|
||||
var/addblends
|
||||
|
||||
//* Pickup/Drop/Equip/Throw Sounds
|
||||
//! Sounds!
|
||||
/// Used when thrown into a mob.
|
||||
var/mob_throw_hit_sound
|
||||
/// Sound used when equipping the item into a valid slot from hands or ground
|
||||
@@ -100,6 +100,11 @@
|
||||
/// Whether or not we are heavy. Used for some species to determine if they can two-hand it.
|
||||
var/heavy = FALSE
|
||||
|
||||
/// If true, a 'cleaving' attack will occur.
|
||||
var/can_cleave = FALSE
|
||||
/// Used to avoid infinite cleaving.
|
||||
var/cleaving = FALSE
|
||||
|
||||
/obj/item/Initialize(mapload)
|
||||
. = ..()
|
||||
if(islist(origin_tech))
|
||||
@@ -676,12 +681,12 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
/obj/item/proc/is_hot()
|
||||
return FALSE
|
||||
|
||||
// These procs are for RPEDs and part ratings. The concept for this was borrowed from /vg/station.
|
||||
// Gets the rating of the item, used in stuff like machine construction.
|
||||
/// These procs are for RPEDs and part ratings. The concept for this was borrowed from /vg/station.
|
||||
/// Gets the rating of the item, used in stuff like machine construction.
|
||||
/obj/item/proc/get_rating()
|
||||
return FALSE
|
||||
|
||||
// Like the above, but used for RPED sorting of parts.
|
||||
/// These procs are for RPEDs and part ratings, but used for RPED sorting of parts.
|
||||
/obj/item/proc/rped_rating()
|
||||
return get_rating()
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
/obj/item
|
||||
var/can_cleave = FALSE // If true, a 'cleaving' attack will occur.
|
||||
var/cleaving = FALSE // Used to avoid infinite cleaving.
|
||||
|
||||
// Attacks mobs (atm only simple ones due to friendly fire issues) that are adjacent to the target and user.
|
||||
/// Attacks mobs (atm only simple ones due to friendly fire issues) that are adjacent to the target and user.
|
||||
/obj/item/proc/cleave(mob/living/user, atom/target)
|
||||
if(cleaving)
|
||||
return FALSE // We're busy.
|
||||
@@ -28,17 +24,17 @@
|
||||
cleave_visual(user, target)
|
||||
|
||||
if(hit_mobs)
|
||||
to_chat(user, "<span class='danger'>You used \the [src] to attack [hit_mobs] other thing\s!</span>")
|
||||
to_chat(user, SPAN_DANGER("You used \the [src] to attack [hit_mobs] other thing\s!"))
|
||||
cleaving = FALSE // We're done now.
|
||||
return hit_mobs > 0 // Returns TRUE if anything got hit.
|
||||
|
||||
// This cannot go into afterattack since some mobs delete themselves upon dying.
|
||||
/// This cannot go into afterattack since some mobs delete themselves upon dying.
|
||||
/obj/item/material/pre_attack(mob/living/target, mob/living/user)
|
||||
if(can_cleave && istype(target))
|
||||
cleave(user, target)
|
||||
..()
|
||||
|
||||
// This is purely the visual effect of cleaving.
|
||||
/obj/item/proc/cleave_visual(var/mob/living/user, var/mob/living/target)
|
||||
/// This is purely the visual effect of cleaving.
|
||||
/obj/item/proc/cleave_visual(mob/living/user, mob/living/target)
|
||||
var/obj/effect/temporary_effect/cleave_attack/E = new(get_turf(src))
|
||||
E.dir = get_dir(user, target)
|
||||
@@ -4,29 +4,29 @@
|
||||
icon = 'icons/obj/rune.dmi'
|
||||
anchored = 1
|
||||
|
||||
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
|
||||
..()
|
||||
loc = location
|
||||
/obj/effect/debris/cleanable/crayon/New(location, main = "#FFFFFF", shade = "#000000", type = "rune")
|
||||
..()
|
||||
loc = location
|
||||
|
||||
name = type
|
||||
desc = "A [type] drawn in crayon."
|
||||
name = type
|
||||
desc = "A [type] drawn in crayon."
|
||||
|
||||
switch(type)
|
||||
if("rune")
|
||||
type = "rune[rand(1,6)]"
|
||||
if("graffiti")
|
||||
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
|
||||
switch(type)
|
||||
if("rune")
|
||||
type = "rune[rand(1,6)]"
|
||||
if("graffiti")
|
||||
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
|
||||
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
|
||||
|
||||
mainOverlay.Blend(main,ICON_ADD)
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
mainOverlay.Blend(main,ICON_ADD)
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
|
||||
overlays += mainOverlay
|
||||
overlays += shadeOverlay
|
||||
overlays += mainOverlay
|
||||
overlays += shadeOverlay
|
||||
|
||||
add_hiddenprint(usr)
|
||||
add_hiddenprint(usr)
|
||||
|
||||
/obj/effect/debris/cleanable/crayon/chalk
|
||||
name = "arcane rune"
|
||||
@@ -34,26 +34,26 @@
|
||||
icon = 'icons/obj/rune.dmi'
|
||||
anchored = 1
|
||||
|
||||
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
|
||||
..()
|
||||
loc = location
|
||||
/obj/effect/debris/cleanable/crayon/chalk/New(location, main = "#FFFFFF", shade = "#000000", type = "rune")
|
||||
..()
|
||||
loc = location
|
||||
|
||||
name = type
|
||||
desc = "A [type] drawn in chalk."
|
||||
name = type
|
||||
desc = "A [type] drawn in chalk."
|
||||
|
||||
switch(type)
|
||||
if("rune")
|
||||
type = "rune[rand(1,6)]"
|
||||
if("graffiti")
|
||||
type = pick("end","uboa")
|
||||
switch(type)
|
||||
if("rune")
|
||||
type = "rune[rand(1,6)]"
|
||||
if("graffiti")
|
||||
type = pick("end","uboa")
|
||||
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
|
||||
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
|
||||
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
|
||||
|
||||
mainOverlay.Blend(main,ICON_ADD)
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
mainOverlay.Blend(main,ICON_ADD)
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
|
||||
overlays += mainOverlay
|
||||
overlays += shadeOverlay
|
||||
overlays += mainOverlay
|
||||
overlays += shadeOverlay
|
||||
|
||||
add_hiddenprint(usr)
|
||||
add_hiddenprint(usr)
|
||||
|
||||
@@ -22,12 +22,11 @@
|
||||
F.dirt += 4
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/debris/cleanable/greenglow
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(1200)// 2 minutes
|
||||
qdel(src)
|
||||
/obj/effect/debris/cleanable/greenglow/New()
|
||||
..()
|
||||
spawn(1200)// 2 minutes
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/debris/cleanable/dirt
|
||||
name = "dirt"
|
||||
|
||||
@@ -24,10 +24,10 @@ var/global/list/image/fluidtrack_cache=list()
|
||||
var/crusty=0
|
||||
var/image/overlay
|
||||
|
||||
New(_direction,_color,_wet)
|
||||
src.direction=_direction
|
||||
src.basecolor=_color
|
||||
src.wet=_wet
|
||||
/datum/fluidtrack/New(_direction, _color, _wet)
|
||||
src.direction=_direction
|
||||
src.basecolor=_color
|
||||
src.wet=_wet
|
||||
|
||||
/obj/effect/debris/cleanable/blood/tracks/reveal_blood()
|
||||
if(!fluorescent)
|
||||
@@ -62,94 +62,94 @@ var/global/list/image/fluidtrack_cache=list()
|
||||
// List of laid tracks and their colors.
|
||||
var/list/datum/fluidtrack/stack=list()
|
||||
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
* @param bloodcolor Color of the blood when wet.
|
||||
*/
|
||||
proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
* @param bloodcolor Color of the blood when wet.
|
||||
*/
|
||||
/obj/effect/debris/cleanable/blood/tracks/proc/AddTracks(list/DNA, comingdir, goingdir, bloodcolor="#A10808")
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
|
||||
// Current bit
|
||||
var/b=0
|
||||
// Current bit
|
||||
var/b=0
|
||||
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
|
||||
var/datum/fluidtrack/track
|
||||
var/datum/fluidtrack/track
|
||||
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
// If setting
|
||||
if(comingdir&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
// If setting
|
||||
if(comingdir&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
if(islist(blood_DNA))
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
dirs |= comingdir|realgoing
|
||||
if(islist(blood_DNA))
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
color = "#FFFFFF"
|
||||
var/truedir=0
|
||||
/obj/effect/debris/cleanable/blood/tracks/update_icon()
|
||||
overlays.Cut()
|
||||
color = "#FFFFFF"
|
||||
var/truedir=0
|
||||
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/datum/fluidtrack/track in stack)
|
||||
var/stack_idx=setdirs["[track.direction]"]
|
||||
var/state=coming_state
|
||||
truedir=track.direction
|
||||
if(truedir&240) // Check if we're in the GOING block
|
||||
state=going_state
|
||||
truedir=truedir>>4
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/datum/fluidtrack/track in stack)
|
||||
var/stack_idx=setdirs["[track.direction]"]
|
||||
var/state=coming_state
|
||||
truedir=track.direction
|
||||
if(truedir&240) // Check if we're in the GOING block
|
||||
state=going_state
|
||||
truedir=truedir>>4
|
||||
|
||||
if(track.overlay)
|
||||
track.overlay=null
|
||||
var/image/I = image(icon, icon_state=state, dir=num2dir(truedir))
|
||||
I.color = track.basecolor
|
||||
if(track.overlay)
|
||||
track.overlay=null
|
||||
var/image/I = image(icon, icon_state=state, dir=num2dir(truedir))
|
||||
I.color = track.basecolor
|
||||
|
||||
track.fresh=0
|
||||
track.overlay=I
|
||||
stack[stack_idx]=track
|
||||
overlays += I
|
||||
updatedtracks=0 // Clear our memory of updated tracks.
|
||||
track.fresh=0
|
||||
track.overlay=I
|
||||
stack[stack_idx]=track
|
||||
overlays += I
|
||||
updatedtracks=0 // Clear our memory of updated tracks.
|
||||
|
||||
/obj/effect/debris/cleanable/blood/tracks/footprints
|
||||
name = "wet footprints"
|
||||
|
||||
@@ -9,8 +9,8 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
/obj/effect/particle_effect
|
||||
name = "effect"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
unacidable = TRUE //So effect are not targeted by alien acid.
|
||||
pass_flags = ATOM_PASS_TABLE | ATOM_PASS_GRILLE
|
||||
|
||||
/datum/effect_system
|
||||
@@ -20,18 +20,18 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
var/atom/holder
|
||||
var/setup = 0
|
||||
|
||||
proc/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
setup = 1
|
||||
/datum/effect_system/proc/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
setup = 1
|
||||
|
||||
proc/attach(atom/atom)
|
||||
holder = atom
|
||||
/datum/effect_system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
proc/start()
|
||||
/datum/effect_system/proc/start()
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -57,30 +57,30 @@ steam.start() -- spawns the effect
|
||||
|
||||
/datum/effect_system/steam_spread
|
||||
|
||||
set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
/datum/effect_system/steam_spread/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
|
||||
start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/steam/steam = new /obj/effect/particle_effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
spawn(20)
|
||||
qdel(steam)
|
||||
/datum/effect_system/steam_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/steam/steam = new /obj/effect/particle_effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
spawn(20)
|
||||
qdel(steam)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//SPARK SYSTEM (like steam system)
|
||||
@@ -121,36 +121,36 @@ steam.start() -- spawns the effect
|
||||
/datum/effect_system/spark_spread
|
||||
var/total_sparks = 0 // To stop it being spammed and lagging!
|
||||
|
||||
set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
/datum/effect_system/spark_spread/set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
if(src.total_sparks > 20)
|
||||
return
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/sparks/sparks = new /obj/effect/particle_effect/sparks(src.location)
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
spawn(20)
|
||||
src.total_sparks--
|
||||
/datum/effect_system/spark_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
if(src.total_sparks > 20)
|
||||
return
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/sparks/sparks = new /obj/effect/particle_effect/sparks(src.location)
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(GLOB.cardinal)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
spawn(20)
|
||||
src.total_sparks--
|
||||
|
||||
|
||||
|
||||
@@ -437,98 +437,101 @@ steam.start() -- spawns the effect
|
||||
var/processing = 1
|
||||
var/on = 1
|
||||
|
||||
set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
/datum/effect_system/steam_trail_follow/set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
|
||||
start()
|
||||
if(!src.on)
|
||||
src.on = 1
|
||||
src.processing = 1
|
||||
if(src.processing)
|
||||
src.processing = 0
|
||||
spawn(0)
|
||||
if(src.number < 3)
|
||||
var/obj/effect/particle_effect/steam/I = new /obj/effect/particle_effect/steam(src.oldposition)
|
||||
src.number++
|
||||
src.oldposition = get_turf(holder)
|
||||
I.setDir(src.holder.dir)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
src.number--
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
else
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
|
||||
proc/stop()
|
||||
/datum/effect_system/steam_trail_follow/start()
|
||||
if(!src.on)
|
||||
src.on = 1
|
||||
src.processing = 1
|
||||
if(src.processing)
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
spawn(0)
|
||||
if(src.number < 3)
|
||||
var/obj/effect/particle_effect/steam/I = new /obj/effect/particle_effect/steam(src.oldposition)
|
||||
src.number++
|
||||
src.oldposition = get_turf(holder)
|
||||
I.setDir(src.holder.dir)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
src.number--
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
else
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
|
||||
/datum/effect_system/steam_trail_follow/proc/stop()
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
|
||||
/datum/effect_system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
|
||||
/// TNT equivalent.
|
||||
var/amount
|
||||
/// Does explosion creates flash effect?
|
||||
var/flashing = 0
|
||||
/// Factor of how powerful the flash effect relatively to the explosion.
|
||||
var/flashing_factor = 0
|
||||
|
||||
set_up (amt, loc, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(istype(loc, /turf/))
|
||||
location = loc
|
||||
else
|
||||
location = get_turf(loc)
|
||||
/datum/effect_system/reagents_explosion/set_up (amt, loc, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(istype(loc, /turf/))
|
||||
location = loc
|
||||
else
|
||||
location = get_turf(loc)
|
||||
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
|
||||
return
|
||||
|
||||
/datum/effect_system/reagents_explosion/start()
|
||||
if (amount <= 2)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devst = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
start()
|
||||
if (amount <= 2)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
|
||||
if (round(amount/12) > 0)
|
||||
devst = devst + amount/12
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devst = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
if (round(amount/6) > 0)
|
||||
heavy = heavy + amount/6
|
||||
|
||||
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
|
||||
if (round(amount/12) > 0)
|
||||
devst = devst + amount/12
|
||||
if (round(amount/3) > 0)
|
||||
light = light + amount/3
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = heavy + amount/6
|
||||
if (flashing && flashing_factor)
|
||||
flash = (amount/4) * flashing_factor
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = light + amount/3
|
||||
for(var/mob/M in viewers(8, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
|
||||
if (flashing && flashing_factor)
|
||||
flash = (amount/4) * flashing_factor
|
||||
|
||||
for(var/mob/M in viewers(8, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
|
||||
explosion(
|
||||
location,
|
||||
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
|
||||
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
|
||||
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
||||
round(min(flash, BOMBCAP_FLASH_RADIUS))
|
||||
)
|
||||
explosion(
|
||||
location,
|
||||
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
|
||||
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
|
||||
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
||||
round(min(flash, BOMBCAP_FLASH_RADIUS)),
|
||||
)
|
||||
|
||||
/obj/effect/teleport_greyscale
|
||||
name = "teleportation"
|
||||
@@ -545,13 +548,13 @@ steam.start() -- spawns the effect
|
||||
/datum/effect_system/teleport_greyscale
|
||||
var/color = "#FFFFFF"
|
||||
|
||||
set_up(cl, loca)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
color = cl
|
||||
/datum/effect_system/teleport_greyscale/set_up(cl, loca)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
color = cl
|
||||
|
||||
start()
|
||||
var/obj/effect/teleport_greyscale/tele = new /obj/effect/teleport_greyscale(src.location)
|
||||
tele.color = color
|
||||
/datum/effect_system/teleport_greyscale/start()
|
||||
var/obj/effect/teleport_greyscale/tele = new /obj/effect/teleport_greyscale(src.location)
|
||||
tele.color = color
|
||||
|
||||
@@ -9,47 +9,47 @@
|
||||
var/fleshcolor //Used for gibbed humans.
|
||||
var/bloodcolor //Used for gibbed humans.
|
||||
|
||||
New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
|
||||
..()
|
||||
/obj/effect/gibspawner/New(location, datum/dna/MobDNA, fleshcolor, bloodcolor)
|
||||
..()
|
||||
|
||||
if(fleshcolor) src.fleshcolor = fleshcolor
|
||||
if(bloodcolor) src.bloodcolor = bloodcolor
|
||||
Gib(loc,MobDNA)
|
||||
if(fleshcolor) src.fleshcolor = fleshcolor
|
||||
if(bloodcolor) src.bloodcolor = bloodcolor
|
||||
Gib(loc,MobDNA)
|
||||
|
||||
proc/Gib(atom/location, var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
to_chat(world, "<span class='warning'>Gib list length mismatch!</span>")
|
||||
return
|
||||
/obj/effect/gibspawner/proc/Gib(atom/location, datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
to_chat(world, SPAN_WARNING("Gib list length mismatch!"))
|
||||
return
|
||||
|
||||
var/obj/effect/debris/cleanable/blood/gibs/gib = null
|
||||
var/obj/effect/debris/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
|
||||
s.set_up(2, 1, get_turf(location)) // Not sure if it's safe to pass an arbitrary object to set_up, todo
|
||||
s.start()
|
||||
if(sparks)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
|
||||
s.set_up(2, 1, get_turf(location)) // Not sure if it's safe to pass an arbitrary object to set_up, todo
|
||||
s.start()
|
||||
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
|
||||
// Apply human species colouration to masks.
|
||||
if(fleshcolor)
|
||||
gib.fleshcolor = fleshcolor
|
||||
if(bloodcolor)
|
||||
gib.basecolor = bloodcolor
|
||||
// Apply human species colouration to masks.
|
||||
if(fleshcolor)
|
||||
gib.fleshcolor = fleshcolor
|
||||
if(bloodcolor)
|
||||
gib.basecolor = bloodcolor
|
||||
|
||||
gib.update_icon()
|
||||
gib.update_icon()
|
||||
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
if(istype(location,/turf/))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
if(istype(location,/turf/))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -95,3 +95,47 @@
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/mark
|
||||
var/mark = ""
|
||||
icon = 'icons/misc/mark.dmi'
|
||||
icon_state = "blank"
|
||||
anchored = 1
|
||||
layer = 99
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//Just to be sure.
|
||||
|
||||
/obj/effect/beam
|
||||
name = "beam"
|
||||
density = FALSE
|
||||
var/def_zone
|
||||
pass_flags = ATOM_PASS_TABLE
|
||||
|
||||
/obj/effect/begin
|
||||
name = "begin"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "begin"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/list_container
|
||||
name = "list container"
|
||||
|
||||
/obj/effect/list_container/mobl
|
||||
name = "mobl"
|
||||
var/master = null
|
||||
|
||||
var/list/container = list( )
|
||||
|
||||
/obj/effect/stop
|
||||
icon_state = "empty"
|
||||
name = "Geas"
|
||||
desc = "You can't resist."
|
||||
var/atom/movable/victim
|
||||
|
||||
/obj/effect/stop/Uncross(atom/movable/AM)
|
||||
. = ..()
|
||||
if(AM == victim)
|
||||
return FALSE
|
||||
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
unacidable = 1
|
||||
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
|
||||
|
||||
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
|
||||
/// Not actually a projectile, just an effect.
|
||||
/obj/effect/overlay/beam
|
||||
name="beam"
|
||||
icon='icons/effects/beam.dmi'
|
||||
icon_state="b_beam"
|
||||
var/tmp/atom/BeamSource
|
||||
New()
|
||||
..()
|
||||
spawn(10) qdel(src)
|
||||
|
||||
/obj/effect/overlay/beam/New()
|
||||
..()
|
||||
spawn(10)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/overlay/palmtree_r
|
||||
name = "Palm tree"
|
||||
|
||||
@@ -1,27 +1,45 @@
|
||||
/obj/effect/gibspawner
|
||||
generic
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2,2,1)
|
||||
/obj/effect/gibspawner/generic
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2,2,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
|
||||
..()
|
||||
/obj/effect/gibspawner/generic/New()
|
||||
gibdirections = list(
|
||||
list(WEST, NORTHWEST, SOUTHWEST, NORTH),
|
||||
list(EAST, NORTHEAST, SOUTHEAST, SOUTH),
|
||||
list(),
|
||||
)
|
||||
..()
|
||||
|
||||
human
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/down,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
/obj/effect/gibspawner/human
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/down,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs,/obj/effect/debris/cleanable/blood/gibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
/obj/effect/gibspawner/human/New()
|
||||
gibdirections = list(
|
||||
list(NORTH, NORTHEAST, NORTHWEST),
|
||||
list(SOUTH, SOUTHEAST, SOUTHWEST),
|
||||
list(WEST, NORTHWEST, SOUTHWEST),
|
||||
list(EAST, NORTHEAST, SOUTHEAST),
|
||||
GLOB.alldirs,
|
||||
GLOB.alldirs,
|
||||
list(),
|
||||
)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs/robot/up,/obj/effect/debris/cleanable/blood/gibs/robot/down,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
/obj/effect/gibspawner/robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/effect/debris/cleanable/blood/gibs/robot/up,/obj/effect/debris/cleanable/blood/gibs/robot/down,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot,/obj/effect/debris/cleanable/blood/gibs/robot/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
/obj/effect/gibspawner/robot/New()
|
||||
gibdirections = list(
|
||||
list(NORTH, NORTHEAST, NORTHWEST),
|
||||
list(SOUTH, SOUTHEAST, SOUTHWEST),
|
||||
list(WEST, NORTHWEST, SOUTHWEST),
|
||||
list(EAST, NORTHEAST, SOUTHEAST),
|
||||
GLOB.alldirs,
|
||||
GLOB.alldirs,
|
||||
)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
@@ -27,65 +27,71 @@
|
||||
/* Tosses things in a certain direction */
|
||||
|
||||
/obj/effect/step_trigger/thrower
|
||||
var/direction = SOUTH // the direction of throw
|
||||
var/tiles = 3 // if 0: forever until atom hits a stopper
|
||||
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
|
||||
var/speed = 1 // delay of movement
|
||||
var/facedir = 0 // if 1: atom faces the direction of movement
|
||||
var/nostop = 0 // if 1: will only be stopped by teleporters
|
||||
/// The direction of throw.
|
||||
var/direction = SOUTH
|
||||
/// If 0: forever until atom hits a stopper.
|
||||
var/tiles = 3
|
||||
/// If nonzero: prevents mobs from moving while they're being flung.
|
||||
var/immobilize = 1
|
||||
/// Delay of movement.
|
||||
var/speed = 1
|
||||
/// If 1: atom faces the direction of movement.
|
||||
var/facedir = 0
|
||||
/// If 1: will only be stopped by teleporters.
|
||||
var/nostop = 0
|
||||
var/list/affecting = list()
|
||||
|
||||
Trigger(var/atom/A)
|
||||
if(!A || !istype(A, /atom/movable) || isobserver(A))
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !istype(A, /atom/movable) || isobserver(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
break
|
||||
|
||||
curtiles++
|
||||
curtiles++
|
||||
|
||||
sleep(speed)
|
||||
sleep(speed)
|
||||
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, direction)
|
||||
if(!facedir)
|
||||
AM.setDir(predir)
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, direction)
|
||||
if(!facedir)
|
||||
AM.setDir(predir)
|
||||
|
||||
|
||||
|
||||
affecting.Remove(AM)
|
||||
affecting.Remove(AM)
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
|
||||
/* Stops things thrown by a thrower, doesn't do anything */
|
||||
|
||||
@@ -156,11 +162,11 @@
|
||||
var/teleport_y_offset = 0
|
||||
var/teleport_z_offset = 0
|
||||
|
||||
Trigger(var/atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
|
||||
A.forceMove(T)
|
||||
/obj/effect/step_trigger/teleporter/random/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
|
||||
A.forceMove(T)
|
||||
|
||||
/* Teleporter that sends objects stepping on it to a specific landmark. */
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
|
||||
// #define EMPDEBUG 10
|
||||
|
||||
proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
|
||||
if(!epicenter) return
|
||||
/proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
|
||||
if(!epicenter)
|
||||
return
|
||||
|
||||
if(!istype(epicenter, /turf))
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//TODO: Flash range does nothing currently
|
||||
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
|
||||
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
|
||||
var/multi_z_scalar = config_legacy.multi_z_explosion_scalar
|
||||
spawn(0)
|
||||
var/start = world.timeofday
|
||||
@@ -121,6 +121,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
defer_powernet_rebuild = 0
|
||||
return 1
|
||||
|
||||
proc/secondaryexplosion(turf/epicenter, range)
|
||||
/proc/secondaryexplosion(turf/epicenter, range)
|
||||
for(var/turf/tile in range(range, epicenter))
|
||||
tile.ex_act(2)
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
var/turf/T = get_turf(src.mob)
|
||||
explosion_rec(T, power)
|
||||
|
||||
/obj
|
||||
var/explosion_resistance
|
||||
/obj/var/explosion_resistance
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +12,7 @@ var/list/explosion_turfs = list()
|
||||
var/explosion_in_progress = 0
|
||||
|
||||
|
||||
proc/explosion_rec(turf/epicenter, power)
|
||||
/proc/explosion_rec(turf/epicenter, power)
|
||||
|
||||
var/loopbreak = 0
|
||||
while(explosion_in_progress)
|
||||
|
||||
@@ -7,25 +7,26 @@
|
||||
icon_state = "bodybag_folded"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
/obj/item/bodybag/attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/storage/box/bodybags
|
||||
name = "body bags"
|
||||
desc = "This box contains body bags."
|
||||
icon_state = "bodybags"
|
||||
New()
|
||||
..()
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
|
||||
/obj/item/storage/box/bodybags/New()
|
||||
..()
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
new /obj/item/bodybag(src)
|
||||
|
||||
|
||||
/obj/structure/closet/body_bag
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifdef T_BOARD
|
||||
#error T_BOARD already defined elsewhere, we can't use it.
|
||||
#endif
|
||||
#define T_BOARD(name) "circuit board (" + (name) + ")"
|
||||
#define T_BOARD(name) "circuit board (" + (name) + ")"
|
||||
|
||||
// TODO: split into machine, computer, etc circuits
|
||||
/**
|
||||
@@ -16,8 +16,8 @@
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "id_mod"
|
||||
origin_tech = list(TECH_DATA = 2)
|
||||
density = 0
|
||||
anchored = 0
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
force = 5.0
|
||||
throw_force = 5.0
|
||||
@@ -25,11 +25,17 @@
|
||||
throw_range = 15
|
||||
var/build_path = null
|
||||
var/board_type = new /datum/frame/frame_types/computer
|
||||
var/list/req_components // Components required by the machine.
|
||||
// Example: list(/obj/item/stock_parts/matter_bin = 5)
|
||||
/**
|
||||
* Components required by the machine.
|
||||
* Example: list(/obj/item/stock_parts/matter_bin = 5)
|
||||
*/
|
||||
var/list/req_components
|
||||
|
||||
var/list/def_components // Default replacements for req_components, to be used in apply_default_parts instead of req_components types
|
||||
// Example: list(/obj/item/stock_parts/matter_bin = /obj/item/stock_parts/matter_bin/super)
|
||||
/**
|
||||
* Components that are optional for the machine.
|
||||
* Example: list(/obj/item/stock_parts/matter_bin = 5)
|
||||
*/
|
||||
var/list/def_components
|
||||
|
||||
var/contain_parts = TRUE
|
||||
|
||||
@@ -50,8 +56,8 @@
|
||||
/obj/item/circuitboard/proc/after_deconstruct(atom/A)
|
||||
return
|
||||
|
||||
//Should be called from the constructor of any machine to automatically populate the default parts
|
||||
/obj/item/circuitboard/proc/apply_default_parts(var/obj/machinery/M)
|
||||
/// Should be called from the constructor of any machine to automatically populate the default parts.
|
||||
/obj/item/circuitboard/proc/apply_default_parts(obj/machinery/M)
|
||||
if(LAZYLEN(M.component_parts))
|
||||
// This really shouldn't happen. If it somehow does, print out a stack trace and gracefully handle it.
|
||||
stack_trace("apply_defauly_parts called on machine that already had component_parts: [M]")
|
||||
@@ -103,5 +109,4 @@
|
||||
if(!ispath(A))
|
||||
continue
|
||||
nice_list += list("[req_components[A]] [initial(A.name)]")
|
||||
. += "<span class='notice'>Required components: [english_list(nice_list)].</span>"
|
||||
|
||||
. += SPAN_NOTICE("Required components: [english_list(nice_list)].")
|
||||
@@ -9,9 +9,10 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
|
||||
// Board for the algae oxygen generator in algae_generator.dm
|
||||
/obj/item/circuitboard/algae_farm
|
||||
@@ -20,10 +21,11 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
|
||||
//Board for the High performance gas pump
|
||||
/obj/item/circuitboard/massive_gas_pump
|
||||
@@ -32,9 +34,10 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_POWER = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/capacitor = 1)
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/massive_heat_pump
|
||||
name = T_BOARD("High performance heat pump")
|
||||
@@ -42,9 +45,10 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_POWER = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/capacitor = 2)
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 2,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
)
|
||||
|
||||
// Board for the thermal regulator in airconditioner_vr.dm
|
||||
/obj/item/circuitboard/thermoregulator
|
||||
@@ -53,8 +57,9 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_POWER = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 20,
|
||||
/obj/item/stock_parts/capacitor/super = 3)
|
||||
/obj/item/stack/cable_coil = 20,
|
||||
/obj/item/stock_parts/capacitor/super = 3,
|
||||
)
|
||||
|
||||
// Board for the bomb tester in bomb_tester_vr.dm
|
||||
/obj/item/circuitboard/bomb_tester
|
||||
@@ -63,8 +68,9 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_PHORON = 3, TECH_DATA = 2, TECH_MAGNET = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin/adv = 1,
|
||||
/obj/item/stock_parts/scanning_module = 5)
|
||||
/obj/item/stock_parts/matter_bin/adv = 1,
|
||||
/obj/item/stock_parts/scanning_module = 5,
|
||||
)
|
||||
|
||||
// Board for the timeclock terminal in timeclock_vr.dm
|
||||
/obj/item/circuitboard/timeclock
|
||||
@@ -6,14 +6,17 @@
|
||||
name = T_BOARD("atmosphere monitoring console")
|
||||
build_path = /obj/machinery/computer/general_air_control
|
||||
var/frequency = 1439
|
||||
|
||||
/obj/item/circuitboard/air_management/tank_control
|
||||
name = T_BOARD("tank control")
|
||||
build_path = /obj/machinery/computer/general_air_control/large_tank_control
|
||||
frequency = 1441
|
||||
|
||||
/obj/item/circuitboard/air_management/supermatter_core
|
||||
name = T_BOARD("core control")
|
||||
build_path = /obj/machinery/computer/general_air_control/supermatter_core
|
||||
frequency = 1438
|
||||
|
||||
/obj/item/circuitboard/air_management/injector_control
|
||||
name = T_BOARD("injector control")
|
||||
build_path = /obj/machinery/computer/general_air_control/fuel_injection
|
||||
@@ -7,7 +7,7 @@
|
||||
build_path = /obj/machinery/computer/security
|
||||
req_access = list(access_security)
|
||||
var/list/network
|
||||
var/locked = 1
|
||||
var/locked = TRUE
|
||||
var/emagged = 0
|
||||
|
||||
/obj/item/circuitboard/security/Initialize(mapload)
|
||||
@@ -57,28 +57,28 @@
|
||||
var/obj/machinery/computer/security/S = A
|
||||
network = S.network.Copy()
|
||||
|
||||
/obj/item/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
|
||||
/obj/item/circuitboard/security/emag_act(remaining_charges, mob/user)
|
||||
if(emagged)
|
||||
to_chat(user, "Circuit lock is already removed.")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You override the circuit lock and open controls.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You override the circuit lock and open controls."))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
locked = FALSE
|
||||
return 1
|
||||
|
||||
/obj/item/circuitboard/security/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/card/id))
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>Circuit lock does not respond.</span>")
|
||||
to_chat(user, SPAN_WARNING("Circuit lock does not respond."))
|
||||
return
|
||||
if(check_access(I))
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You [locked ? "" : "un"]lock the circuit controls.</span>")
|
||||
to_chat(user, SPAN_NOTICE("You [locked ? "" : "un"]lock the circuit controls."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(user, SPAN_WARNING("Access denied."))
|
||||
else if(istype(I,/obj/item/multitool))
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>Circuit controls are locked.</span>")
|
||||
to_chat(user, SPAN_WARNING("Circuit controls are locked."))
|
||||
return
|
||||
var/existing_networks = jointext(network,",")
|
||||
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
@@ -8,14 +8,18 @@
|
||||
|
||||
/obj/item/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
playsound(src, I.tool_sound, 50, 1)
|
||||
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
|
||||
playsound(src, I.tool_sound, 50, TRUE)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] adjusts the jumper on \the [src]'s access protocol pins."),
|
||||
SPAN_NOTICE("You adjust the jumper on the access protocol pins."),
|
||||
SPAN_HEAR("You hear a clicking sound.")
|
||||
)
|
||||
if(build_path == /obj/machinery/computer/rdconsole/core)
|
||||
name = T_BOARD("RD Console - Robotics")
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
to_chat(user, "<span class='notice'>Access protocols set to robotics.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Access protocols set to robotics."))
|
||||
else
|
||||
name = T_BOARD("RD Console")
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
to_chat(user, "<span class='notice'>Access protocols set to default.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Access protocols set to default."))
|
||||
return
|
||||
@@ -6,7 +6,7 @@
|
||||
name = T_BOARD("supply ordering console")
|
||||
build_path = /obj/machinery/computer/supplycomp
|
||||
origin_tech = list(TECH_DATA = 2)
|
||||
var/contraband_enabled = 0
|
||||
var/contraband_enabled = FALSE
|
||||
|
||||
/obj/item/circuitboard/supplycomp/control
|
||||
name = T_BOARD("supply ordering console")
|
||||
@@ -27,8 +27,8 @@
|
||||
var/obj/machinery/computer/supplycomp/S = A
|
||||
contraband_enabled = S.can_order_contraband
|
||||
|
||||
/obj/item/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/multitool))
|
||||
/obj/item/circuitboard/supplycomp/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
var/catastasis = src.contraband_enabled
|
||||
var/opposite_catastasis
|
||||
if(catastasis)
|
||||
@@ -38,12 +38,11 @@
|
||||
opposite_catastasis = "BROAD"
|
||||
catastasis = "STANDARD"
|
||||
|
||||
switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") )
|
||||
if("Switch to STANDARD","Switch to BROAD")
|
||||
src.contraband_enabled = !src.contraband_enabled
|
||||
|
||||
if("Cancel")
|
||||
return
|
||||
else
|
||||
to_chat(user, "DERP! BUG! Report this (And what you were doing to cause it) to Agouri")
|
||||
var/choice = tgui_alert(user, "Current receiver spectrum is set to: [catastasis]", "Multitool-Circuitboard interface", list("Switch to [opposite_catastasis]", "Cancel"))
|
||||
if(choice == "Switch to [catastasis]")
|
||||
src.contraband_enabled = !src.contraband_enabled
|
||||
if(choice == "Cancel")
|
||||
return
|
||||
else
|
||||
to_chat(user, SPAN_DEBUGERROR("DERP! BUG! Report this (And what you were doing to cause it) to the Maintainers"))
|
||||
return
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
//Circuitboards for frames (mostly wall based frames). Most of these don't fit into other categories.
|
||||
|
||||
//Display
|
||||
//! Displays
|
||||
|
||||
/obj/item/circuitboard/guestpass
|
||||
name = T_BOARD("guestpass console")
|
||||
@@ -42,7 +42,7 @@
|
||||
board_type = new /datum/frame/frame_types/supply_request_console
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
|
||||
//Alarm
|
||||
//! Alarms
|
||||
|
||||
/obj/item/circuitboard/firealarm
|
||||
name = T_BOARD("fire alarm")
|
||||
@@ -68,7 +68,7 @@
|
||||
board_type = new /datum/frame/frame_types/keycard_authenticator
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
|
||||
//Computer
|
||||
//! Computers
|
||||
|
||||
/obj/item/circuitboard/holopad
|
||||
name = T_BOARD("holopad")
|
||||
@@ -88,7 +88,7 @@
|
||||
board_type = new /datum/frame/frame_types/medical_console
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
|
||||
//Machine
|
||||
//! Machines
|
||||
|
||||
/obj/item/circuitboard/photocopier
|
||||
name = T_BOARD("photocopier")
|
||||
@@ -96,10 +96,10 @@
|
||||
board_type = new /datum/frame/frame_types/photocopier
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/fax
|
||||
@@ -108,10 +108,10 @@
|
||||
board_type = new /datum/frame/frame_types/fax
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/conveyor
|
||||
@@ -119,9 +119,9 @@
|
||||
build_path = /obj/machinery/conveyor
|
||||
board_type = new /datum/frame/frame_types/conveyor
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/gear = 2,
|
||||
/obj/item/stock_parts/motor = 2,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/microwave
|
||||
@@ -130,9 +130,9 @@
|
||||
board_type = new /datum/frame/frame_types/microwave
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/recharger
|
||||
@@ -140,8 +140,8 @@
|
||||
build_path = /obj/machinery/recharger
|
||||
board_type = new /datum/frame/frame_types/recharger
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/recharger/wrecharger
|
||||
@@ -154,8 +154,8 @@
|
||||
build_path = /obj/machinery/cell_charger
|
||||
board_type = new /datum/frame/frame_types/cell_charger
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/washing
|
||||
@@ -164,8 +164,8 @@
|
||||
board_type = new /datum/frame/frame_types/washing_machine
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/gear = 2,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/grinder
|
||||
@@ -173,9 +173,9 @@
|
||||
build_path = /obj/machinery/reagentgrinder
|
||||
board_type = new /datum/frame/frame_types/grinder
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
/obj/item/reagent_containers/glass/beaker/large = 1,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/distiller
|
||||
@@ -183,9 +183,9 @@
|
||||
board_type = new /datum/frame/frame_types/reagent_distillery
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/motor = 2,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/tele_pad
|
||||
@@ -194,9 +194,9 @@
|
||||
board_type = "tele_pad"
|
||||
origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 4,
|
||||
/obj/item/stock_parts/micro_laser = 4,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stock_parts/micro_laser = 4,
|
||||
/obj/item/stock_parts/scanning_module = 4,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/tele_projector
|
||||
@@ -205,9 +205,9 @@
|
||||
board_type = "tele_projector"
|
||||
origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/body_scanner
|
||||
@@ -216,8 +216,8 @@
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 3,
|
||||
/obj/item/stack/material/glass/reinforced = 2,
|
||||
/obj/item/stock_parts/scanning_module = 3,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/sleeper
|
||||
@@ -226,11 +226,11 @@
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 3,
|
||||
/obj/item/reagent_containers/syringe = 3,
|
||||
/obj/item/stack/material/glass/reinforced = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/vr_sleeper
|
||||
@@ -239,8 +239,8 @@
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stack/material/glass/reinforced = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/dna_analyzer
|
||||
@@ -249,9 +249,9 @@
|
||||
board_type = new /datum/frame/frame_types/dna_analyzer
|
||||
origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/mass_driver
|
||||
@@ -259,11 +259,11 @@
|
||||
build_path = /obj/machinery/mass_driver
|
||||
board_type = new /datum/frame/frame_types/mass_driver
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/gear = 2,
|
||||
/obj/item/stock_parts/motor = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/spring = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/operating_table
|
||||
@@ -272,12 +272,12 @@
|
||||
board_type = new /datum/frame/frame_types/operating_table
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/healthanalyzer = 1,
|
||||
/obj/item/stack/material/glass/reinforced = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/arf_generator
|
||||
@@ -286,8 +286,8 @@
|
||||
board_type = new /datum/frame/frame_types/arfgs
|
||||
origin_tech = list(TECH_MAGNET = 4, TECH_POWER = 4, TECH_BIO = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/micro_laser/high = 2, //field emitters
|
||||
/obj/item/stock_parts/scanning_module = 1, //atmosphere sensor
|
||||
/obj/item/stock_parts/capacitor/adv = 1, //for the JUICE
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stock_parts/capacitor/adv = 1, //for the JUICE
|
||||
/obj/item/stock_parts/micro_laser/high = 2, //field emitters
|
||||
/obj/item/stock_parts/scanning_module = 1, //atmosphere sensor
|
||||
)
|
||||
@@ -8,5 +8,6 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
)
|
||||
@@ -8,10 +8,11 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3, TECH_BIO = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/clonescanner
|
||||
name = T_BOARD("cloning scanner")
|
||||
@@ -19,8 +20,9 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
)
|
||||
@@ -8,6 +8,7 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1)
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/gear = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
)
|
||||
45
code/game/objects/items/circuitboards/machinery/event.dm
Normal file
45
code/game/objects/items/circuitboards/machinery/event.dm
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
*! Magma Pump Components
|
||||
*? NOTE: Comment these out after the event, or else they'll be constructable and confuse people.
|
||||
*/
|
||||
/obj/item/circuitboard/magma_pump
|
||||
name = T_BOARD("magma pump")
|
||||
build_path = /obj/machinery/magma_pump
|
||||
board_type = new /datum/frame/frame_types/magma_pump
|
||||
origin_tech = list(TECH_MAGNET = 9, TECH_ENGINEERING = 9, TECH_MATERIAL = 9)
|
||||
req_components = list(
|
||||
/obj/item/stack/material/durasteel = 5,
|
||||
/obj/item/stack/material/glass/phoronrglass = 2,
|
||||
/obj/item/stock_parts/capacitor/hyper = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/gear = 5,
|
||||
/obj/item/stock_parts/motor = 5,
|
||||
/obj/item/stock_parts/scanning_module/hyper = 1,
|
||||
)
|
||||
|
||||
/datum/frame/frame_types/magma_pump
|
||||
name = "Magma Pump"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
|
||||
/**
|
||||
*! Magma Reservoir Components
|
||||
*? NOTE: Comment these out after the event, or else they'll be constructable and confuse people.
|
||||
*/
|
||||
/obj/item/circuitboard/magma_reservoir
|
||||
name = T_BOARD("magma reservoir")
|
||||
build_path = /obj/machinery/magma_reservoir
|
||||
board_type = new /datum/frame/frame_types/magma_reservoir
|
||||
origin_tech = list(TECH_MAGNET = 9, TECH_ENGINEERING = 9, TECH_MATERIAL = 9)
|
||||
req_components = list(
|
||||
/obj/item/stack/material/durasteel = 5,
|
||||
/obj/item/stack/material/glass/phoronrglass = 5,
|
||||
/obj/item/stock_parts/capacitor/hyper = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/matter_bin/hyper = 5,
|
||||
/obj/item/stock_parts/motor = 2,
|
||||
/obj/item/stock_parts/scanning_module/hyper = 1,
|
||||
)
|
||||
|
||||
/datum/frame/frame_types/magma_reservoir
|
||||
name = "Magma Reservoir"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
@@ -8,6 +8,7 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_DATA = 1)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
)
|
||||
@@ -8,6 +8,7 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 2, TECH_POWER = 2, TECH_ENGINEERING = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 2)
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
@@ -8,10 +8,11 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/cell = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
/obj/item/cell = 1,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/miningdrillbrace
|
||||
name = T_BOARD("mining drill brace")
|
||||
@@ -8,10 +8,11 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3, TECH_POWER = 3, TECH_PHORON = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/capacitor = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/pacman/super
|
||||
name = T_BOARD("SUPERPACMAN-type generator")
|
||||
@@ -8,6 +8,7 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
/obj/item/stock_parts/gear = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
/obj/item/stock_parts/gear = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/motor = 1,
|
||||
)
|
||||
@@ -7,7 +7,10 @@
|
||||
build_path = /obj/machinery/power/smes/buildable
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_POWER = 6, TECH_ENGINEERING = 4)
|
||||
req_components = list(/obj/item/smes_coil = 1, /obj/item/stack/cable_coil = 30)
|
||||
req_components = list(
|
||||
/obj/item/smes_coil = 1,
|
||||
/obj/item/stack/cable_coil = 30,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/smes/after_construct(atom/A)
|
||||
. = ..()
|
||||
@@ -21,21 +24,28 @@
|
||||
build_path = /obj/machinery/power/smes/batteryrack
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 2)
|
||||
req_components = list(/obj/item/cell = 3)
|
||||
req_components = list(
|
||||
/obj/item/cell = 3,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/ghettosmes
|
||||
name = T_BOARD("makeshift PSU")
|
||||
desc = "An APC circuit repurposed into some power storage device controller"
|
||||
build_path = /obj/machinery/power/smes/batteryrack/makeshift
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
req_components = list(/obj/item/cell = 3)
|
||||
req_components = list(
|
||||
/obj/item/cell = 3,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/grid_checker
|
||||
name = T_BOARD("power grid checker")
|
||||
build_path = /obj/machinery/power/grid_checker
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3)
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 3, /obj/item/stack/cable_coil = 10)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stock_parts/capacitor = 3,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/breakerbox
|
||||
name = T_BOARD("breaker box")
|
||||
@@ -43,9 +53,10 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/spring = 1,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 10)
|
||||
/obj/item/stock_parts/spring = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/machine/rtg
|
||||
name = T_BOARD("radioisotope TEG")
|
||||
@@ -54,8 +65,9 @@
|
||||
origin_tech = list(TECH_DATA = 3, TECH_POWER = 3, TECH_PHORON = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stack/material/uranium = 10, // We have no Pu-238, and this is the closest thing to it.
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/material/uranium = 10) // We have no Pu-238, and this is the closest thing to it.
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/machine/rtg/advanced
|
||||
name = T_BOARD("advanced radioisotope TEG")
|
||||
@@ -63,10 +75,11 @@
|
||||
origin_tech = list(TECH_DATA = 5, TECH_POWER = 5, TECH_PHORON = 5, TECH_ENGINEERING = 5)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stack/material/phoron = 5,
|
||||
/obj/item/stack/material/uranium = 10,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/material/uranium = 10,
|
||||
/obj/item/stack/material/phoron = 5)
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/machine/abductor/core
|
||||
name = T_BOARD("void generator")
|
||||
@@ -75,7 +88,8 @@
|
||||
origin_tech = list(TECH_DATA = 8, TECH_POWER = 8, TECH_PHORON = 8, TECH_ENGINEERING = 8)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor/omni = 1)
|
||||
/obj/item/stock_parts/capacitor/omni = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/machine/abductor/core/hybrid
|
||||
name = T_BOARD("void generator (hybrid)")
|
||||
@@ -85,4 +99,5 @@
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor/omni = 1,
|
||||
/obj/item/stock_parts/micro_laser/omni = 1)
|
||||
/obj/item/stock_parts/micro_laser/omni = 1,
|
||||
)
|
||||
@@ -8,10 +8,11 @@
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/cell = 1)
|
||||
/obj/item/cell = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
)
|
||||
def_components = list(
|
||||
/obj/item/cell = /obj/item/cell/super
|
||||
)
|
||||
@@ -2,27 +2,32 @@
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
obj/item/circuitboard/rdserver
|
||||
/obj/item/circuitboard/rdserver
|
||||
name = T_BOARD("R&D server")
|
||||
build_path = /obj/machinery/r_n_d/server/core
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/item/circuitboard/rdserver/attackby(obj/item/I, mob/user)
|
||||
if(I.is_screwdriver())
|
||||
playsound(src, I.tool_sound, 50, 1)
|
||||
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] adjusts the jumper on \the [src]'s access protocol pins."),
|
||||
SPAN_NOTICE("You adjust the jumper on the access protocol pins."),
|
||||
SPAN_HEAR("You hear a clicking sound."),
|
||||
)
|
||||
if(build_path == /obj/machinery/r_n_d/server/core)
|
||||
name = T_BOARD("RD Console - Robotics")
|
||||
build_path = /obj/machinery/r_n_d/server/robotics
|
||||
to_chat(user, "<span class='notice'>Access protocols set to robotics.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Access protocols set to robotics."))
|
||||
else
|
||||
name = T_BOARD("RD Console")
|
||||
build_path = /obj/machinery/r_n_d/server/core
|
||||
to_chat(user, "<span class='notice'>Access protocols set to default.</span>")
|
||||
to_chat(user, SPAN_NOTICE("Access protocols set to default."))
|
||||
return
|
||||
|
||||
/obj/item/circuitboard/destructive_analyzer
|
||||
@@ -31,9 +36,10 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/autolathe
|
||||
name = T_BOARD("autolathe")
|
||||
@@ -41,9 +47,10 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 3,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 3,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/protolathe
|
||||
name = T_BOARD("protolathe")
|
||||
@@ -51,9 +58,10 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
/obj/item/reagent_containers/glass/beaker = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/circuit_imprinter
|
||||
name = T_BOARD("circuit imprinter")
|
||||
@@ -61,9 +69,10 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/reagent_containers/glass/beaker = 2)
|
||||
/obj/item/reagent_containers/glass/beaker = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/mechfab
|
||||
name = "Circuit board (Exosuit Fabricator)"
|
||||
@@ -71,10 +80,11 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/prosthetics
|
||||
name = "Circuit board (Prosthetics Fabricator)"
|
||||
@@ -82,10 +92,11 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/ntnet_relay
|
||||
name = "Circuit board (NTNet Quantum Relay)"
|
||||
@@ -93,7 +104,8 @@ obj/item/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
|
||||
board_type = "machine"
|
||||
origin_tech = list(TECH_DATA = 4)
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 15)
|
||||
/obj/item/stack/cable_coil = 15,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/dnarevive
|
||||
name = T_BOARD("fossil reviver pod")
|
||||
@@ -2,22 +2,20 @@
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
//
|
||||
// New shield generator
|
||||
//
|
||||
|
||||
/// New shield generator
|
||||
/obj/item/circuitboard/shield_generator
|
||||
name = T_BOARD("advanced shield generator")
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
build_path = /obj/machinery/power/shield_generator
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_POWER = 4, TECH_BLUESPACE = 2, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/smes_coil = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/shield_diffuser
|
||||
name = T_BOARD("shield diffuser")
|
||||
@@ -26,25 +24,24 @@
|
||||
origin_tech = list(TECH_MAGNET = 4, TECH_POWER = 2, TECH_ILLEGAL = 1)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/console_screen = 1)
|
||||
|
||||
//
|
||||
// Legacy shield generators
|
||||
//
|
||||
)
|
||||
|
||||
/// Legacy shield generators
|
||||
/obj/item/circuitboard/shield_gen_ex
|
||||
name = T_BOARD("hull shield generator")
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
build_path = /obj/machinery/shield_gen/external
|
||||
origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/transmitter = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/transmitter = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/shield_gen
|
||||
name = T_BOARD("bubble shield generator")
|
||||
@@ -52,12 +49,13 @@
|
||||
build_path = /obj/machinery/shield_gen
|
||||
origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/transmitter = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/transmitter = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/shield_cap
|
||||
name = T_BOARD("shield capacitor")
|
||||
@@ -65,9 +63,10 @@
|
||||
build_path = /obj/machinery/shield_capacitor
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_POWER = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 1,
|
||||
/obj/item/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 5)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stock_parts/manipulator/pico = 2,
|
||||
/obj/item/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 1,
|
||||
)
|
||||
@@ -10,8 +10,8 @@
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_COMBAT = 2)
|
||||
req_components = list(
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/capacitor = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/pointdefense_control
|
||||
@@ -10,69 +10,76 @@
|
||||
build_path = /obj/machinery/telecomms/receiver
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1)
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/hub
|
||||
name = T_BOARD("hub mainframe")
|
||||
build_path = /obj/machinery/telecomms/hub
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/relay
|
||||
name = T_BOARD("relay mainframe")
|
||||
build_path = /obj/machinery/telecomms/relay
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 4, TECH_BLUESPACE = 3)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/bus
|
||||
name = T_BOARD("bus mainframe")
|
||||
build_path = /obj/machinery/telecomms/bus
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1)
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/processor
|
||||
name = T_BOARD("processor unit")
|
||||
build_path = /obj/machinery/telecomms/processor
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 3,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/manipulator = 3,
|
||||
/obj/item/stock_parts/subspace/amplifier = 1,
|
||||
/obj/item/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/server
|
||||
name = T_BOARD("telecommunication server")
|
||||
build_path = /obj/machinery/telecomms/server
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1)
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/broadcaster
|
||||
name = T_BOARD("subspace broadcaster")
|
||||
build_path = /obj/machinery/telecomms/broadcaster
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_BLUESPACE = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/micro_laser/high = 2)
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser/high = 2,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
)
|
||||
|
||||
//This isn't a real telecomms board but I don't want to make a whole file to hold only one circuitboard.
|
||||
/obj/item/circuitboard/telecomms/exonet_node
|
||||
@@ -80,21 +87,23 @@
|
||||
build_path = /obj/machinery/exonet_node
|
||||
origin_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5, TECH_BLUESPACE = 4)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
)
|
||||
|
||||
/obj/item/circuitboard/telecomms/pda_multicaster
|
||||
name = T_BOARD("pda multicaster")
|
||||
build_path = /obj/machinery/pda_multicaster
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2, TECH_BLUESPACE = 2)
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 1,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/sub_filter = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 1,
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user