mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Merge remote-tracking branch 'upstream/master' into his-grace-ascended
This commit is contained in:
@@ -35,11 +35,6 @@ jobs:
|
||||
git commit -m "NanoMap Auto-Update (`date`)" -a || true
|
||||
git push -f -u origin nanomap-render
|
||||
|
||||
- name: 'Push Maps'
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
with:
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
#define CONTRACT_POWER "Power"
|
||||
#define CONTRACT_WEALTH "Wealth"
|
||||
#define CONTRACT_PRESTIGE "Prestige"
|
||||
#define CONTRACT_MAGIC "Magic"
|
||||
#define CONTRACT_REVIVE "Revive"
|
||||
#define CONTRACT_KNOWLEDGE "Knowledge"
|
||||
#define CONTRACT_UNWILLING "Unwilling"
|
||||
#define CONTRACT_FRIENDSHIP "Friendship"
|
||||
// FIXME: Implement these
|
||||
#define CONTRACT_ETALENT "Engineering Talent"
|
||||
#define CONTRACT_CTALENT "Chemistry Talent"
|
||||
#define CONTRACT_RETURNDEAD "Return Dead"
|
||||
#define CONTRACT_AUGMENT "Cybernetic Augmentations"
|
||||
#define CONTRACT_CANDY "Endless Candy"
|
||||
#define CONTRACT_ECHANCE "An Extra Chance"
|
||||
#define CONTRACT_ATECH "Advanced Technology"
|
||||
#define CONTRACT_DEVILSMACHINE "Devil's Machinery"
|
||||
#define CONTRACT_YOUTH "Eternal Youth"
|
||||
#define CONTRACT_FOOD "Food"
|
||||
#define CONTRACT_SPACE "Space Gear"
|
||||
#define CONTRACT_CALAMITY "Calamity"
|
||||
|
||||
#define BANE_SALT "salt"
|
||||
#define BANE_LIGHT "light"
|
||||
#define BANE_IRON "iron"
|
||||
#define BANE_WHITECLOTHES "whiteclothes"
|
||||
#define BANE_SILVER "silver"
|
||||
#define BANE_HARVEST "harvest"
|
||||
#define BANE_TOOLBOX "toolbox"
|
||||
|
||||
#define OBLIGATION_FOOD "food"
|
||||
#define OBLIGATION_FIDDLE "fiddle"
|
||||
#define OBLIGATION_DANCEOFF "danceoff"
|
||||
#define OBLIGATION_GREET "greet"
|
||||
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
|
||||
#define OBLIGATION_SAYNAME "sayname"
|
||||
#define OBLIGATION_ANNOUNCEKILL "announcekill"
|
||||
#define OBLIGATION_ANSWERTONAME "answername"
|
||||
|
||||
#define BAN_HURTWOMAN "hurtwoman"
|
||||
#define BAN_HURTMAN "hurtman"
|
||||
#define BAN_CHAPEL "chapel"
|
||||
#define BAN_HURTPRIEST "hurtpriest"
|
||||
#define BAN_AVOIDWATER "avoidwater"
|
||||
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
|
||||
#define BAN_HURTLIZARD "hurtlizard"
|
||||
#define BAN_HURTANIMAL "hurtanimal"
|
||||
|
||||
#define BANISH_WATER "water"
|
||||
#define BANISH_COFFIN "coffin"
|
||||
#define BANISH_FORMALDYHIDE "embalm"
|
||||
#define BANISH_RUNES "runes"
|
||||
#define BANISH_CANDLES "candles"
|
||||
#define BANISH_DESTRUCTION "destruction"
|
||||
#define BANISH_FUNERAL_GARB "funeral"
|
||||
|
||||
#define LORE 1
|
||||
#define LAW 2
|
||||
@@ -53,9 +53,8 @@
|
||||
#define ANTAG_HUD_VAMPIRE 16
|
||||
#define ANTAG_HUD_ABDUCTOR 17
|
||||
#define DATA_HUD_ABDUCTOR 18
|
||||
#define ANTAG_HUD_DEVIL 19
|
||||
#define ANTAG_HUD_EVENTMISC 20
|
||||
#define ANTAG_HUD_BLOB 21
|
||||
#define ANTAG_HUD_EVENTMISC 19
|
||||
#define ANTAG_HUD_BLOB 20
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
|
||||
@@ -54,8 +54,9 @@
|
||||
#define PREFTOGGLE_2_EMOTE_BUBBLE 256
|
||||
// Yes I know this being an "enable to disable" is misleading, but it avoids having to tweak all existing pref entries
|
||||
#define PREFTOGGLE_2_REVERB_DISABLE 512
|
||||
#define PREFTOGGLE_2_FORCE_WHITE_RUNECHAT 1024
|
||||
|
||||
#define TOGGLES_2_TOTAL 1023 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
#define TOGGLES_2_TOTAL 2047 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
|
||||
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE)
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#define ROLE_REVENANT "revenant"
|
||||
#define ROLE_HOG_GOD "hand of god: god" // We're prolly gonna port this one day or another
|
||||
#define ROLE_HOG_CULTIST "hand of god: cultist"
|
||||
#define ROLE_DEVIL "devil"
|
||||
#define ROLE_RAIDER "vox raider"
|
||||
#define ROLE_TRADER "trader"
|
||||
#define ROLE_VAMPIRE "vampire"
|
||||
@@ -54,7 +53,6 @@ GLOBAL_LIST_INIT(special_roles, list(
|
||||
ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling
|
||||
ROLE_BORER, // Cortical borer
|
||||
ROLE_CULTIST = /datum/game_mode/cult, // Cultist
|
||||
ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil
|
||||
ROLE_GSPIDER, // Giant spider
|
||||
ROLE_GUARDIAN, // Guardian
|
||||
ROLE_MORPH, // Morph
|
||||
|
||||
@@ -4,26 +4,26 @@
|
||||
* The spin from being thrown will interrupt most of these animations as will grabs, account for that accordingly.
|
||||
*/
|
||||
|
||||
/proc/animate_fade_grayscale(var/atom/A, var/time = 5)
|
||||
/proc/animate_fade_grayscale(atom/A, time = 5)
|
||||
if(!istype(A) && !istype(A, /client))
|
||||
return
|
||||
A.color = null
|
||||
animate(A, color = MATRIX_GREYSCALE, time = time, easing = SINE_EASING)
|
||||
|
||||
/proc/animate_melt_pixel(var/atom/A)
|
||||
/proc/animate_melt_pixel(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
animate(A, pixel_y = 0, time = 50 - A.pixel_y, alpha = 175, easing = BOUNCE_EASING)
|
||||
animate(alpha = 0, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_explode_pixel(var/atom/A)
|
||||
/proc/animate_explode_pixel(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/floatdegrees = rand(5, 20)
|
||||
var/side = pick(-1, 1)
|
||||
animate(A, pixel_x = rand(-64, 64), pixel_y = rand(-64, 64), transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = 10, alpha = 0, easing = SINE_EASING)
|
||||
|
||||
/proc/animate_float(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
/proc/animate_float(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/floatdegrees = rand(5, 20)
|
||||
@@ -35,7 +35,7 @@
|
||||
animate(A, pixel_y = 32, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
|
||||
/proc/animate_levitate(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
/proc/animate_levitate(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/floatdegrees = rand(5, 20)
|
||||
@@ -47,7 +47,7 @@
|
||||
animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
animate(pixel_y = 0, transform = null, time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
|
||||
/proc/animate_ghostly_presence(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
/proc/animate_ghostly_presence(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/floatdegrees = rand(5, 20)
|
||||
@@ -59,7 +59,7 @@
|
||||
animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
|
||||
|
||||
/proc/animate_fading_leap_up(var/atom/A)
|
||||
/proc/animate_fading_leap_up(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/matrix/M = matrix()
|
||||
@@ -71,7 +71,7 @@
|
||||
sleep(1)
|
||||
A.alpha = 0
|
||||
|
||||
/proc/animate_fading_leap_down(var/atom/A)
|
||||
/proc/animate_fading_leap_down(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/matrix/M = matrix()
|
||||
@@ -84,7 +84,7 @@
|
||||
sleep(1)
|
||||
animate(A, transform = M, pixel_z = 0, alpha = 255, time = 1, loop = 1, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_shake(var/atom/A, var/amount = 5, var/x_severity = 2, var/y_severity = 2)
|
||||
/proc/animate_shake(atom/A, amount = 5, x_severity = 2, y_severity = 2)
|
||||
// Wiggles the sprite around on its tile then returns it to normal
|
||||
if(!istype(A))
|
||||
return
|
||||
@@ -101,7 +101,7 @@
|
||||
spawn(amount)
|
||||
animate(A, transform = null, pixel_y = 0, pixel_x = 0,time = 1,loop = 1, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_teleport(var/atom/A)
|
||||
/proc/animate_teleport(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/matrix/M = matrix(1, 3, MATRIX_SCALE)
|
||||
@@ -110,7 +110,7 @@
|
||||
animate(transform = M, time = 5, color = "#1111ff", alpha = 0, easing = CIRCULAR_EASING)
|
||||
animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING)
|
||||
|
||||
/proc/animate_teleport_wiz(var/atom/A)
|
||||
/proc/animate_teleport_wiz(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/matrix/M = matrix(0, 4, MATRIX_SCALE)
|
||||
@@ -119,14 +119,14 @@
|
||||
animate(time = 8, transform = M, alpha = 5) //Do nothing, essentially
|
||||
animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING)
|
||||
|
||||
/proc/animate_rainbow_glow_old(var/atom/A)
|
||||
/proc/animate_rainbow_glow_old(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
animate(color = "#00FF00", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_rainbow_glow(var/atom/A)
|
||||
/proc/animate_rainbow_glow(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
@@ -136,37 +136,37 @@
|
||||
animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
animate(color = "#FF00FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_fade_to_color_fill(var/atom/A, var/the_color, var/time)
|
||||
/proc/animate_fade_to_color_fill(atom/A, the_color, time)
|
||||
if(!istype(A) || !the_color || !time)
|
||||
return
|
||||
animate(A, color = the_color, time = time, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_flash_color_fill(var/atom/A, var/the_color, var/loops, var/time)
|
||||
/proc/animate_flash_color_fill(atom/A, the_color, loops, time)
|
||||
if(!istype(A) || !the_color || !time || !loops)
|
||||
return
|
||||
animate(A, color = the_color, time = time, easing = LINEAR_EASING)
|
||||
animate(color = "#FFFFFF", time = 5, loop = loops, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_flash_color_fill_inherit(var/atom/A, var/the_color, var/loops, var/time)
|
||||
/proc/animate_flash_color_fill_inherit(atom/A, the_color, loops, time)
|
||||
if(!istype(A) || !the_color || !time || !loops)
|
||||
return
|
||||
var/color_old = A.color
|
||||
animate(A, color = the_color, time = time, loop = loops, easing = LINEAR_EASING)
|
||||
animate(A, color = color_old, time = time, loop = loops, easing = LINEAR_EASING)
|
||||
|
||||
/proc/animate_clownspell(var/atom/A)
|
||||
/proc/animate_clownspell(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
animate(A, transform = matrix(1.3, MATRIX_SCALE), time = 5, color = "#00ff00", easing = BACK_EASING)
|
||||
animate(transform = null, time = 5, color = "#ffffff", easing = ELASTIC_EASING)
|
||||
|
||||
/proc/animate_wiggle_then_reset(var/atom/A, var/loops = 5, var/speed = 5, var/x_var = 3, var/y_var = 3)
|
||||
/proc/animate_wiggle_then_reset(atom/A, loops = 5, speed = 5, x_var = 3, y_var = 3)
|
||||
if(!istype(A) || !loops || !speed)
|
||||
return
|
||||
animate(A, pixel_x = rand(-x_var, x_var), pixel_y = rand(-y_var, y_var), time = speed * 2,loop = loops, easing = rand(2,7))
|
||||
animate(pixel_x = 0, pixel_y = 0, time = speed, easing = rand(2,7))
|
||||
|
||||
/proc/animate_spin(var/atom/A, var/dir = "L", var/T = 1, var/looping = -1)
|
||||
/proc/animate_spin(atom/A, dir = "L", T = 1, looping = -1)
|
||||
if(!istype(A))
|
||||
return
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping)
|
||||
animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping)
|
||||
|
||||
/proc/animate_shockwave(var/atom/A)
|
||||
/proc/animate_shockwave(atom/A)
|
||||
if(!istype(A))
|
||||
return
|
||||
var/punchstr = rand(10, 20)
|
||||
|
||||
@@ -149,7 +149,7 @@ GLOBAL_PROTECT(log_end)
|
||||
|
||||
// A logging proc that only outputs after setup is done, to
|
||||
// help devs test initialization stuff that happens a lot
|
||||
/proc/log_after_setup(var/message)
|
||||
/proc/log_after_setup(message)
|
||||
if(SSticker && SSticker.current_state > GAME_STATE_SETTING_UP)
|
||||
to_chat(world, "<span class='danger'>[message]</span>")
|
||||
log_world(message)
|
||||
@@ -160,7 +160,7 @@ GLOBAL_PROTECT(log_end)
|
||||
|
||||
// Helper procs for building detailed log lines
|
||||
|
||||
/proc/datum_info_line(var/datum/d)
|
||||
/proc/datum_info_line(datum/d)
|
||||
if(!istype(d))
|
||||
return
|
||||
if(!istype(d, /mob))
|
||||
@@ -168,7 +168,7 @@ GLOBAL_PROTECT(log_end)
|
||||
var/mob/m = d
|
||||
return "[m] ([m.ckey]) ([m.type])"
|
||||
|
||||
/proc/atom_loc_line(var/atom/a)
|
||||
/proc/atom_loc_line(atom/a)
|
||||
if(!istype(a))
|
||||
return
|
||||
var/turf/t = get_turf(a)
|
||||
|
||||
+9
-19
@@ -51,7 +51,7 @@
|
||||
|
||||
// Like view but bypasses luminosity check
|
||||
|
||||
/proc/hear(var/range, var/atom/source)
|
||||
/proc/hear(range, atom/source)
|
||||
var/lum = source.luminosity
|
||||
source.luminosity = 6
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
// 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_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)
|
||||
@@ -174,7 +174,7 @@
|
||||
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
|
||||
// This new system will loop at around 1000 in an empty server.
|
||||
|
||||
/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)
|
||||
@@ -200,7 +200,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)
|
||||
. = list()
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
@@ -263,7 +263,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/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)
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
if(AM.Move(get_step(T, direction)))
|
||||
break
|
||||
|
||||
/proc/get_mob_by_key(var/key)
|
||||
/proc/get_mob_by_key(key)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(M.ckey == lowertext(key))
|
||||
return M
|
||||
@@ -339,16 +339,6 @@
|
||||
O.screen_loc = screen_loc
|
||||
return O
|
||||
|
||||
/proc/Show2Group4Delay(obj/O, list/group, delay=0)
|
||||
if(!isobj(O)) return
|
||||
if(!group) group = GLOB.clients
|
||||
for(var/client/C in group)
|
||||
C.screen += O
|
||||
if(delay)
|
||||
spawn(delay)
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
|
||||
/proc/remove_images_from_clients(image/I, list/show_to)
|
||||
for(var/client/C in show_to)
|
||||
C.images -= I
|
||||
@@ -402,7 +392,7 @@
|
||||
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]
|
||||
@@ -420,7 +410,7 @@
|
||||
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
|
||||
|
||||
|
||||
/proc/mobs_in_area(var/area/the_area, var/client_needed=0, var/moblist=GLOB.mob_list)
|
||||
/proc/mobs_in_area(area/the_area, client_needed=0, moblist=GLOB.mob_list)
|
||||
var/list/mobs_found[0]
|
||||
var/area/our_area = get_area(the_area)
|
||||
for(var/mob/M in moblist)
|
||||
@@ -431,7 +421,7 @@
|
||||
mobs_found += M
|
||||
return mobs_found
|
||||
|
||||
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
|
||||
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
|
||||
var/area/our_area = get_area(the_area)
|
||||
for(var/C in GLOB.alive_mob_list)
|
||||
if(!istype(C, check_type))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
Sink(1)
|
||||
|
||||
//Get a node up to its right position in the heap
|
||||
/datum/heap/proc/Swim(var/index)
|
||||
/datum/heap/proc/Swim(index)
|
||||
var/parent = round(index * 0.5)
|
||||
|
||||
while(parent > 0 && (call(cmp)(L[index], L[parent]) > 0))
|
||||
@@ -42,7 +42,7 @@
|
||||
parent = round(index * 0.5)
|
||||
|
||||
//Get a node down to its right position in the heap
|
||||
/datum/heap/proc/Sink(var/index)
|
||||
/datum/heap/proc/Sink(index)
|
||||
var/g_child = GetGreaterChild(index)
|
||||
|
||||
while(g_child > 0 && (call(cmp)(L[index], L[g_child]) < 0))
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
//Returns the greater (relative to the comparison proc) of a node children
|
||||
//or 0 if there's no child
|
||||
/datum/heap/proc/GetGreaterChild(var/index)
|
||||
/datum/heap/proc/GetGreaterChild(index)
|
||||
if(index * 2 > L.len)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
|
||||
//Icon smoothing helpers
|
||||
|
||||
/proc/smooth_zlevel(var/zlevel, now = FALSE)
|
||||
/proc/smooth_zlevel(zlevel, now = FALSE)
|
||||
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
|
||||
for(var/V in away_turfs)
|
||||
var/turf/T = V
|
||||
|
||||
@@ -894,7 +894,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
|
||||
return composite
|
||||
|
||||
/proc/adjust_brightness(var/color, var/value)
|
||||
/proc/adjust_brightness(color, value)
|
||||
if(!color) return "#FFFFFF"
|
||||
if(!value) return color
|
||||
|
||||
@@ -904,7 +904,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
RGB[3] = clamp(RGB[3]+value,0,255)
|
||||
return rgb(RGB[1],RGB[2],RGB[3])
|
||||
|
||||
/proc/sort_atoms_by_layer(var/list/atoms)
|
||||
/proc/sort_atoms_by_layer(list/atoms)
|
||||
// Comb sort icons based on levels
|
||||
var/list/result = atoms.Copy()
|
||||
var/gap = result.len
|
||||
@@ -925,7 +925,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
//Interface for using DrawBox() to draw 1 pixel on a coordinate.
|
||||
//Returns the same icon specifed in the argument, but with the pixel drawn
|
||||
/proc/DrawPixel(var/icon/I,var/colour,var/drawX,var/drawY)
|
||||
/proc/DrawPixel(icon/I, colour, drawX, drawY)
|
||||
if(!I)
|
||||
return 0
|
||||
var/Iwidth = I.Width()
|
||||
@@ -938,7 +938,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
return I
|
||||
|
||||
//Interface for easy drawing of one pixel on an atom.
|
||||
/atom/proc/DrawPixelOn(var/colour, var/drawX, var/drawY)
|
||||
/atom/proc/DrawPixelOn(colour, drawX, drawY)
|
||||
var/icon/I = new(icon)
|
||||
var/icon/J = DrawPixel(I, colour, drawX, drawY)
|
||||
if(J) //Only set the icon if it succeeded, the icon without the pixel is 1000x better than a black square.
|
||||
@@ -961,7 +961,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
//Imagine removing pixels from the main icon that are covered by pixels from the mask icon.
|
||||
//Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below.
|
||||
/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready)
|
||||
/proc/get_icon_difference(icon/main, icon/mask, mask_ready)
|
||||
/*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work.
|
||||
e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/
|
||||
|
||||
|
||||
+27
-27
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if(!total)
|
||||
return "[nothing_text]"
|
||||
@@ -60,7 +60,7 @@
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
/proc/listgetindex(var/list/list,index)
|
||||
/proc/listgetindex(list/list, index)
|
||||
if(istype(list) && list.len)
|
||||
if(isnum(index))
|
||||
if(InRange(index,1,list.len))
|
||||
@@ -158,7 +158,7 @@
|
||||
* If skiprep = 1, repeated elements are treated as one.
|
||||
* If either of arguments is not a list, returns null
|
||||
*/
|
||||
/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
|
||||
/proc/difflist(list/first, list/second, skiprep=0)
|
||||
if(!islist(first) || !islist(second))
|
||||
return
|
||||
var/list/result = new
|
||||
@@ -176,7 +176,7 @@
|
||||
* If skipref = 1, repeated elements are treated as one.
|
||||
* If either of arguments is not a list, returns null
|
||||
*/
|
||||
/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
|
||||
/proc/uniquemergelist(list/first, list/second, skiprep=0)
|
||||
if(!islist(first) || !islist(second))
|
||||
return
|
||||
var/list/result = new
|
||||
@@ -236,7 +236,7 @@
|
||||
return output
|
||||
|
||||
//Randomize: Return the list in a random order
|
||||
/proc/shuffle(var/list/L)
|
||||
/proc/shuffle(list/L)
|
||||
if(!L)
|
||||
return
|
||||
L = L.Copy()
|
||||
@@ -247,20 +247,20 @@
|
||||
return L
|
||||
|
||||
//Return a list with no duplicate entries
|
||||
/proc/uniquelist(var/list/L)
|
||||
/proc/uniquelist(list/L)
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
. |= i
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortKey(var/list/client/L, var/order = 1)
|
||||
/proc/sortKey(list/client/L, order = 1)
|
||||
if(isnull(L) || L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1
|
||||
return mergeKey(sortKey(L.Copy(0,middle)), sortKey(L.Copy(middle)), order)
|
||||
|
||||
//Mergsort: does the actual sorting and returns the results back to sortAtom
|
||||
/proc/mergeKey(var/list/client/L, var/list/client/R, var/order = 1)
|
||||
/proc/mergeKey(list/client/L, list/client/R, order = 1)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -277,7 +277,7 @@
|
||||
return (result + R.Copy(Ri, 0))
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortAtom(var/list/atom/L, var/order = 1)
|
||||
/proc/sortAtom(list/atom/L, order = 1)
|
||||
listclearnulls(L)
|
||||
if(isnull(L) || L.len < 2)
|
||||
return L
|
||||
@@ -285,7 +285,7 @@
|
||||
return mergeAtoms(sortAtom(L.Copy(0,middle)), sortAtom(L.Copy(middle)), order)
|
||||
|
||||
//Mergsort: does the actual sorting and returns the results back to sortAtom
|
||||
/proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1)
|
||||
/proc/mergeAtoms(list/atom/L, list/atom/R, order = 1)
|
||||
if(!L || !R) return 0
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
|
||||
//Mergesort: Specifically for record datums in a list.
|
||||
/proc/sortRecord(var/list/datum/data/record/L, var/field = "name", var/order = 1)
|
||||
/proc/sortRecord(list/datum/data/record/L, field = "name", order = 1)
|
||||
if(isnull(L))
|
||||
return list()
|
||||
if(L.len < 2)
|
||||
@@ -315,7 +315,7 @@
|
||||
return mergeRecordLists(sortRecord(L.Copy(0, middle), field, order), sortRecord(L.Copy(middle), field, order), field, order)
|
||||
|
||||
//Mergsort: does the actual sorting and returns the results back to sortRecord
|
||||
/proc/mergeRecordLists(var/list/datum/data/record/L, var/list/datum/data/record/R, var/field = "name", var/order = 1)
|
||||
/proc/mergeRecordLists(list/datum/data/record/L, list/datum/data/record/R, field = "name", order = 1)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -342,20 +342,20 @@
|
||||
|
||||
|
||||
//Mergesort: any value in a list
|
||||
/proc/sortList(var/list/L)
|
||||
/proc/sortList(list/L)
|
||||
if(L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1 // Copy is first,second-1
|
||||
return mergeLists(sortList(L.Copy(0,middle)), sortList(L.Copy(middle))) //second parameter null = to end of list
|
||||
|
||||
//Mergsorge: uses sortAssoc() but uses the var's name specifically. This should probably be using mergeAtom() instead
|
||||
/proc/sortNames(var/list/L)
|
||||
/proc/sortNames(list/L)
|
||||
var/list/Q = new()
|
||||
for(var/atom/x in L)
|
||||
Q[x.name] = x
|
||||
return sortAssoc(Q)
|
||||
|
||||
/proc/mergeLists(var/list/L, var/list/R)
|
||||
/proc/mergeLists(list/L, list/R)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -371,13 +371,13 @@
|
||||
|
||||
|
||||
// List of lists, sorts by element[key] - for things like crew monitoring computer sorting records by name.
|
||||
/proc/sortByKey(var/list/L, var/key)
|
||||
/proc/sortByKey(list/L, key)
|
||||
if(L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1
|
||||
return mergeKeyedLists(sortByKey(L.Copy(0, middle), key), sortByKey(L.Copy(middle), key), key)
|
||||
|
||||
/proc/mergeKeyedLists(var/list/L, var/list/R, var/key)
|
||||
/proc/mergeKeyedLists(list/L, list/R, key)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -396,13 +396,13 @@
|
||||
|
||||
|
||||
//Mergesort: any value in a list, preserves key=value structure
|
||||
/proc/sortAssoc(var/list/L)
|
||||
/proc/sortAssoc(list/L)
|
||||
if(L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1 // Copy is first,second-1
|
||||
return mergeAssoc(sortAssoc(L.Copy(0,middle)), sortAssoc(L.Copy(middle))) //second parameter null = to end of list
|
||||
|
||||
/proc/mergeAssoc(var/list/L, var/list/R)
|
||||
/proc/mergeAssoc(list/L, list/R)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -434,7 +434,7 @@
|
||||
return r
|
||||
|
||||
// Returns the key based on the index
|
||||
/proc/get_key_by_index(var/list/L, var/index)
|
||||
/proc/get_key_by_index(list/L, index)
|
||||
var/i = 1
|
||||
for(var/key in L)
|
||||
if(index == i)
|
||||
@@ -442,7 +442,7 @@
|
||||
i++
|
||||
return null
|
||||
|
||||
/proc/count_by_type(var/list/L, type)
|
||||
/proc/count_by_type(list/L, type)
|
||||
var/i = 0
|
||||
for(var/T in L)
|
||||
if(istype(T, type))
|
||||
@@ -450,7 +450,7 @@
|
||||
return i
|
||||
|
||||
//Don't use this on lists larger than half a dozen or so
|
||||
/proc/insertion_sort_numeric_list_ascending(var/list/L)
|
||||
/proc/insertion_sort_numeric_list_ascending(list/L)
|
||||
//log_world("ascending len input: [L.len]")
|
||||
var/list/out = list(pop(L))
|
||||
for(var/entry in L)
|
||||
@@ -467,7 +467,7 @@
|
||||
//log_world(" output: [out.len]")
|
||||
return out
|
||||
|
||||
/proc/insertion_sort_numeric_list_descending(var/list/L)
|
||||
/proc/insertion_sort_numeric_list_descending(list/L)
|
||||
//log_world("descending len input: [L.len]")
|
||||
var/list/out = insertion_sort_numeric_list_ascending(L)
|
||||
//log_world(" output: [out.len]")
|
||||
@@ -483,13 +483,13 @@
|
||||
if(islist(.[i]))
|
||||
.[i] = .(.[i])
|
||||
|
||||
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
|
||||
/proc/dd_sortedObjectList(list/L, list/cache = list())
|
||||
if(L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1 // Copy is first,second-1
|
||||
return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list
|
||||
|
||||
/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache)
|
||||
/proc/dd_mergeObjectList(list/L, list/R, list/cache)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
@@ -514,7 +514,7 @@
|
||||
return (result + R.Copy(Ri, 0))
|
||||
|
||||
// Insert an object into a sorted list, preserving sortedness
|
||||
/proc/dd_insertObjectList(var/list/L, var/O)
|
||||
/proc/dd_insertObjectList(list/L, O)
|
||||
var/min = 1
|
||||
var/max = L.len
|
||||
var/Oval = O:dd_SortValue()
|
||||
@@ -658,7 +658,7 @@ proc/dd_sortedObjectList(list/incoming)
|
||||
var/case_sensitive = 1
|
||||
return dd_sortedtextlist(incoming, case_sensitive)
|
||||
|
||||
/proc/subtypesof(var/path) //Returns a list containing all subtypes of the given path, but not the given path itself.
|
||||
/proc/subtypesof(path) //Returns a list containing all subtypes of the given path, but not the given path itself.
|
||||
if(!path || !ispath(path))
|
||||
CRASH("Invalid path, failed to fetch subtypes of \"[path]\".")
|
||||
return (typesof(path) - path)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/proc/GetOppositeDir(var/dir)
|
||||
/proc/GetOppositeDir(dir)
|
||||
switch(dir)
|
||||
if(NORTH) return SOUTH
|
||||
if(SOUTH) return NORTH
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
return pick(valid_picks)
|
||||
|
||||
/proc/random_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead)
|
||||
/proc/random_hair_style(gender, species = "Human", datum/robolimb/robohead)
|
||||
var/h_style = "Bald"
|
||||
var/list/valid_hairstyles = list()
|
||||
for(var/hairstyle in GLOB.hair_styles_public_list)
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
return h_style
|
||||
|
||||
/proc/random_facial_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead)
|
||||
/proc/random_facial_hair_style(gender, species = "Human", datum/robolimb/robohead)
|
||||
var/f_style = "Shaved"
|
||||
var/list/valid_facial_hairstyles = list()
|
||||
for(var/facialhairstyle in GLOB.facial_hair_styles_list)
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
return ha_style
|
||||
|
||||
/proc/random_marking_style(var/location = "body", species = "Human", var/datum/robolimb/robohead, var/body_accessory, var/alt_head)
|
||||
/proc/random_marking_style(location = "body", species = "Human", datum/robolimb/robohead, body_accessory, alt_head)
|
||||
var/m_style = "None"
|
||||
var/list/valid_markings = list()
|
||||
for(var/marking in GLOB.marking_styles_list)
|
||||
|
||||
+18
-18
@@ -22,7 +22,7 @@
|
||||
return html_encode(txt)
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/strip_html_simple(t, limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
t = copytext(t,1,limit)
|
||||
for(var/char in strip_chars)
|
||||
@@ -33,13 +33,13 @@
|
||||
return t
|
||||
|
||||
//Removes a few problematic characters
|
||||
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
/proc/sanitize_simple(t, list/repl_chars = list("\n"="#","\t"="#"))
|
||||
for(var/char in repl_chars)
|
||||
t = replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
|
||||
//Runs byond's sanitization proc along-side sanitize_simple
|
||||
/proc/sanitize(var/t,var/list/repl_chars = null)
|
||||
/proc/sanitize(t, list/repl_chars = null)
|
||||
return html_encode(sanitize_simple(t,repl_chars))
|
||||
|
||||
// Gut ANYTHING that isnt alphanumeric, or brackets
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
//Runs sanitize and strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode()
|
||||
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/strip_html(t, limit=MAX_MESSAGE_LEN)
|
||||
return copytext((sanitize(strip_html_simple(t))),1,limit)
|
||||
|
||||
// Used to get a properly sanitized multiline input, of max_length
|
||||
@@ -67,12 +67,12 @@
|
||||
|
||||
//Runs byond's sanitization proc along-side strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause
|
||||
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
/proc/adminscrub(t, limit=MAX_MESSAGE_LEN)
|
||||
return copytext((html_encode(strip_html_simple(t))),1,limit)
|
||||
|
||||
|
||||
//Returns null if there is any bad text in the string
|
||||
/proc/reject_bad_text(var/text, var/max_length=512)
|
||||
/proc/reject_bad_text(text, max_length=512)
|
||||
if(length(text) > max_length) return //message too long
|
||||
var/non_whitespace = 0
|
||||
for(var/i=1, i<=length(text), i++)
|
||||
@@ -106,7 +106,7 @@
|
||||
return msg
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN)
|
||||
// Decode so that names with characters like < are still rejected
|
||||
t_in = html_decode(t_in)
|
||||
if(!t_in || length(t_in) > max_length)
|
||||
@@ -174,7 +174,7 @@
|
||||
//checks text for html tags
|
||||
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
|
||||
//relpaces < with <
|
||||
/proc/checkhtml(var/t)
|
||||
/proc/checkhtml(t)
|
||||
t = sanitize_simple(t, list("&#"="."))
|
||||
var/p = findtext(t,"<",1)
|
||||
while(p) //going through all the tags
|
||||
@@ -226,7 +226,7 @@
|
||||
* Text modification
|
||||
*/
|
||||
// See bygex.dm
|
||||
/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
|
||||
@@ -277,7 +277,7 @@
|
||||
return trim_left(trim_right(text))
|
||||
|
||||
//Returns a string with the first element of the string capitalized.
|
||||
/proc/capitalize(var/t as text)
|
||||
/proc/capitalize(t as text)
|
||||
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
||||
|
||||
//Centers text by adding spaces to either side of the string.
|
||||
@@ -305,7 +305,7 @@
|
||||
return copytext(message, 1, length + 1)
|
||||
|
||||
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
/proc/stringmerge(text, 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
|
||||
@@ -326,7 +326,7 @@
|
||||
return 0
|
||||
return newtext
|
||||
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
/proc/stringpercent(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.
|
||||
if(!text || !character)
|
||||
@@ -338,7 +338,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)
|
||||
@@ -347,7 +347,7 @@
|
||||
//This proc strips html properly, but it's not lazy like the other procs.
|
||||
//This means that it doesn't just remove < and > and call it a day.
|
||||
//Also limit the size of the input, if specified.
|
||||
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
/proc/strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
if(!input)
|
||||
return
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
@@ -371,12 +371,12 @@
|
||||
input = copytext(input,1,max_length)
|
||||
return sanitize(input, allow_lines ? list("\t" = " ") : list("\n" = " ", "\t" = " "))
|
||||
|
||||
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
/proc/trim_strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0)
|
||||
return trim(strip_html_properly(input, max_length, allow_lines))
|
||||
|
||||
//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)
|
||||
/proc/TextPreview(string, len=40)
|
||||
if(length(string) <= len)
|
||||
if(!length(string))
|
||||
return "\[...\]"
|
||||
@@ -386,14 +386,14 @@
|
||||
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)
|
||||
/proc/copytext_preserve_html(text, first, last)
|
||||
return html_encode(copytext(html_decode(text), first, last))
|
||||
|
||||
//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)
|
||||
/proc/sanitizeSafe(input, max_length = MAX_MESSAGE_LEN, encode = 1, trim = 1, extra = 1)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return time2text(station_time(time, TRUE), format)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
/proc/isDay(var/month, var/day)
|
||||
/proc/isDay(month, 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
|
||||
@@ -94,13 +94,13 @@
|
||||
return GLOB.month_names.Find(number)
|
||||
|
||||
//Take a value in seconds and returns a string of minutes and seconds in the format X minute(s) and X seconds.
|
||||
/proc/seconds_to_time(var/seconds as num)
|
||||
/proc/seconds_to_time(seconds as num)
|
||||
var/numSeconds = seconds % 60
|
||||
var/numMinutes = (seconds - numSeconds) / 60
|
||||
return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds"
|
||||
|
||||
//Take a value in seconds and makes it display like a clock
|
||||
/proc/seconds_to_clock(var/seconds as num)
|
||||
/proc/seconds_to_clock(seconds as num)
|
||||
return "[add_zero(num2text((seconds / 60) % 60), 2)]:[add_zero(num2text(seconds % 60), 2)]"
|
||||
|
||||
//Takes a value of time in deciseconds.
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
return
|
||||
|
||||
//Converts an angle (degrees) into an ss13 direction
|
||||
/proc/angle2dir(var/degree)
|
||||
/proc/angle2dir(degree)
|
||||
degree = ((degree+22.5)%365)
|
||||
if(degree < 45) return NORTH
|
||||
if(degree < 90) return NORTHEAST
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
//returns the north-zero clockwise angle in degrees, given a direction
|
||||
|
||||
/proc/dir2angle(var/D)
|
||||
/proc/dir2angle(D)
|
||||
switch(D)
|
||||
if(NORTH) return 0
|
||||
if(SOUTH) return 180
|
||||
@@ -183,7 +183,7 @@
|
||||
else return null
|
||||
|
||||
//Returns the angle in english
|
||||
/proc/angle2text(var/degree)
|
||||
/proc/angle2text(degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
//Converts a blend_mode constant to one acceptable to icon.Blend()
|
||||
@@ -281,7 +281,7 @@
|
||||
if(3*hue < 2) return (a+(b-a)*((2/3)-hue)*6)
|
||||
return a
|
||||
|
||||
/proc/num2septext(var/theNum, var/sigFig = 7,var/sep=",") // default sigFig (1,000,000)
|
||||
/proc/num2septext(theNum, sigFig = 7, sep=",") // default sigFig (1,000,000)
|
||||
var/finalNum = num2text(theNum, sigFig)
|
||||
|
||||
// Start from the end, or from the decimal point
|
||||
@@ -323,7 +323,7 @@
|
||||
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
|
||||
|
||||
//Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't
|
||||
/proc/text2matrix(var/matrixtext)
|
||||
/proc/text2matrix(matrixtext)
|
||||
var/list/matrixtext_list = splittext(matrixtext, " ")
|
||||
var/list/matrix_list = list()
|
||||
for(var/item in matrixtext_list)
|
||||
@@ -351,7 +351,7 @@
|
||||
//The string is well, obviously the string being checked
|
||||
//The datum is used as a source for var names, to check validity
|
||||
//Otherwise every single word could technically be a variable!
|
||||
/proc/string2listofvars(var/t_string, var/datum/var_source)
|
||||
/proc/string2listofvars(t_string, datum/var_source)
|
||||
if(!t_string || !var_source)
|
||||
return list()
|
||||
|
||||
|
||||
+34
-34
@@ -5,7 +5,7 @@
|
||||
/* Get the direction of startObj relative to endObj.
|
||||
* Return values: To the right, 1. Below, 2. To the left, 3. Above, 4. Not found adjacent in cardinal directions, 0.
|
||||
*/
|
||||
/proc/getRelativeDirection(var/atom/movable/startObj, var/atom/movable/endObj)
|
||||
/proc/getRelativeDirection(atom/movable/startObj, atom/movable/endObj)
|
||||
if(endObj.x == startObj.x + 1 && endObj.y == startObj.y)
|
||||
return EAST
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
return 0
|
||||
|
||||
//Returns the middle-most value
|
||||
/proc/dd_range(var/low, var/high, var/num)
|
||||
/proc/dd_range(low, high, num)
|
||||
return max(low,min(high,num))
|
||||
|
||||
//Returns whether or not A is the middle most value
|
||||
/proc/InRange(var/A, var/lower, var/upper)
|
||||
/proc/InRange(A, lower, upper)
|
||||
if(A < lower) return 0
|
||||
if(A > upper) return 0
|
||||
return 1
|
||||
@@ -152,7 +152,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
// Returns true if direction is blocked from loc
|
||||
// Checks if doors are open
|
||||
/proc/DirBlocked(turf/loc,var/dir)
|
||||
/proc/DirBlocked(turf/loc, dir)
|
||||
for(var/obj/structure/window/D in loc)
|
||||
if(!D.density)
|
||||
continue
|
||||
@@ -240,7 +240,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return 1
|
||||
|
||||
//Ensure the frequency is within bounds of what it should be sending/recieving at
|
||||
/proc/sanitize_frequency(var/f, var/low = PUBLIC_LOW_FREQ, var/high = PUBLIC_HIGH_FREQ)
|
||||
/proc/sanitize_frequency(f, low = PUBLIC_LOW_FREQ, high = PUBLIC_HIGH_FREQ)
|
||||
f = round(f)
|
||||
f = max(low, f)
|
||||
f = min(high, f)
|
||||
@@ -249,10 +249,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return f
|
||||
|
||||
//Turns 1479 into 147.9
|
||||
/proc/format_frequency(var/f)
|
||||
/proc/format_frequency(f)
|
||||
return "[round(f / 10)].[f % 10]"
|
||||
|
||||
/obj/proc/atmosanalyzer_scan(var/datum/gas_mixture/air_contents, mob/user, var/obj/target = src)
|
||||
/obj/proc/atmosanalyzer_scan(datum/gas_mixture/air_contents, mob/user, obj/target = src)
|
||||
var/obj/icon = target
|
||||
user.visible_message("[user] has used the analyzer on [target].", "<span class='notice'>You use the analyzer on [target].</span>")
|
||||
var/pressure = air_contents.return_pressure()
|
||||
@@ -320,7 +320,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return selected
|
||||
|
||||
/proc/select_active_ai(var/mob/user)
|
||||
/proc/select_active_ai(mob/user)
|
||||
var/list/ais = active_ais()
|
||||
if(ais.len)
|
||||
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
|
||||
@@ -438,7 +438,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return DisplayJoules(units * SSmachines.wait * 0.1 / GLOB.CELLRATE)
|
||||
|
||||
//Forces a variable to be posative
|
||||
/proc/modulus(var/M)
|
||||
/proc/modulus(M)
|
||||
if(M >= 0)
|
||||
return M
|
||||
if(M < 0)
|
||||
@@ -478,7 +478,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
Returns 1 if the chain up to the area contains the given typepath
|
||||
0 otherwise
|
||||
*/
|
||||
/atom/proc/is_found_within(var/typepath)
|
||||
/atom/proc/is_found_within(typepath)
|
||||
var/atom/A = src
|
||||
while(A.loc)
|
||||
if(istype(A.loc, typepath))
|
||||
@@ -494,7 +494,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
// returns the turf located at the map edge in the specified direction relative to A
|
||||
// used for mass driver
|
||||
/proc/get_edge_target_turf(var/atom/A, var/direction)
|
||||
/proc/get_edge_target_turf(atom/A, direction)
|
||||
|
||||
var/turf/target = locate(A.x, A.y, A.z)
|
||||
if(!A || !target)
|
||||
@@ -518,7 +518,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
// result is bounded to map size
|
||||
// note range is non-pythagorean
|
||||
// used for disposal system
|
||||
/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range)
|
||||
/proc/get_ranged_target_turf(atom/A, direction, range)
|
||||
|
||||
var/x = A.x
|
||||
var/y = A.y
|
||||
@@ -536,17 +536,17 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
// returns turf relative to A offset in dx and dy tiles
|
||||
// bound to map limits
|
||||
/proc/get_offset_target_turf(var/atom/A, var/dx, var/dy)
|
||||
/proc/get_offset_target_turf(atom/A, dx, dy)
|
||||
var/x = min(world.maxx, max(1, A.x + dx))
|
||||
var/y = min(world.maxy, max(1, A.y + dy))
|
||||
return locate(x,y,A.z)
|
||||
|
||||
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
|
||||
/proc/between(var/low, var/middle, var/high)
|
||||
/proc/between(low, middle, high)
|
||||
return max(min(middle, high), low)
|
||||
|
||||
//returns random gauss number
|
||||
/proc/GaussRand(var/sigma)
|
||||
/proc/GaussRand(sigma)
|
||||
var/x,y,rsq
|
||||
do
|
||||
x=2*rand()-1
|
||||
@@ -556,7 +556,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
return sigma*y*sqrt(-2*log(rsq)/rsq)
|
||||
|
||||
//returns random gauss number, rounded to 'roundto'
|
||||
/proc/GaussRandRound(var/sigma,var/roundto)
|
||||
/proc/GaussRandRound(sigma, roundto)
|
||||
return round(GaussRand(sigma),roundto)
|
||||
|
||||
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
|
||||
@@ -579,7 +579,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
return weight
|
||||
|
||||
//Step-towards method of determining whether one atom can see another. Similar to viewers()
|
||||
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
|
||||
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
|
||||
var/turf/current = get_turf(source)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
var/steps = 1
|
||||
@@ -609,7 +609,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/get_step_towards2(var/atom/ref , var/atom/trg)
|
||||
/proc/get_step_towards2(atom/ref , atom/trg)
|
||||
var/base_dir = get_dir(ref, get_step_towards(ref,trg))
|
||||
var/turf/temp = get_step_towards(ref,trg)
|
||||
|
||||
@@ -639,7 +639,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
//Takes: Anything that could possibly have variables and a varname to check.
|
||||
//Returns: 1 if found, 0 if not.
|
||||
/proc/hasvar(var/datum/A, var/varname)
|
||||
/proc/hasvar(datum/A, varname)
|
||||
if(A.vars.Find(lowertext(varname))) return 1
|
||||
else return 0
|
||||
|
||||
@@ -656,7 +656,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all areas of that type in the world.
|
||||
/proc/get_areas(var/areatype)
|
||||
/proc/get_areas(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -670,7 +670,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all turfs in areas of that type of that type in the world.
|
||||
/proc/get_area_turfs(var/areatype)
|
||||
/proc/get_area_turfs(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -685,7 +685,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world.
|
||||
/proc/get_area_all_atoms(var/areatype)
|
||||
/proc/get_area_all_atoms(areatype)
|
||||
if(!areatype) return null
|
||||
if(istext(areatype)) areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
@@ -704,7 +704,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
var/y_pos = null
|
||||
var/z_pos = null
|
||||
|
||||
/area/proc/move_contents_to(var/area/A, var/turftoleave=null, var/direction = null)
|
||||
/area/proc/move_contents_to(area/A, turftoleave=null, direction = null)
|
||||
//Takes: Area. Optional: turf type to leave behind.
|
||||
//Returns: Nothing.
|
||||
//Notes: Attempts to move the contents of one area to another area.
|
||||
@@ -843,7 +843,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
|
||||
|
||||
/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0, var/atom/newloc = null)
|
||||
/proc/DuplicateObject(obj/original, perfectcopy = 0 , sameloc = 0, atom/newloc = null)
|
||||
if(!original)
|
||||
return null
|
||||
|
||||
@@ -870,7 +870,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
O.update_icon()
|
||||
return O
|
||||
|
||||
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
|
||||
/area/proc/copy_contents_to(area/A , platingRequired = 0 )
|
||||
//Takes: Area. Optional: If it should copy to areas that don't have plating
|
||||
//Returns: Nothing.
|
||||
//Notes: Attempts to move the contents of one area to another area.
|
||||
@@ -1099,7 +1099,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
//centered = 0 counts from turf edge to edge
|
||||
//centered = 1 counts from turf center to turf center
|
||||
//of course mathematically this is just adding world.icon_size on again
|
||||
/proc/getPixelDistance(var/atom/A, var/atom/B, var/centered = 1)
|
||||
/proc/getPixelDistance(atom/A, atom/B, centered = 1)
|
||||
if(!istype(A)||!istype(B))
|
||||
return 0
|
||||
. = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2)))
|
||||
@@ -1189,7 +1189,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/reverse_direction(var/dir)
|
||||
/proc/reverse_direction(dir)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
return SOUTH
|
||||
@@ -1264,7 +1264,7 @@ GLOBAL_LIST_INIT(wall_items, typecacheof(list(/obj/machinery/power/apc, /obj/mac
|
||||
Standard way to write links -Sayu
|
||||
*/
|
||||
|
||||
/proc/topic_link(var/datum/D, var/arglist, var/content)
|
||||
/proc/topic_link(datum/D, arglist, content)
|
||||
if(istype(arglist,/list))
|
||||
arglist = list2params(arglist)
|
||||
return "<a href='?src=[D.UID()];[arglist]'>[content]</a>"
|
||||
@@ -1375,7 +1375,7 @@ Standard way to write links -Sayu
|
||||
chance = max(chance - (initial_chance / steps), 0)
|
||||
steps--
|
||||
|
||||
/proc/get_random_colour(var/simple, var/lower, var/upper)
|
||||
/proc/get_random_colour(simple, lower, upper)
|
||||
var/colour
|
||||
if(simple)
|
||||
colour = pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))
|
||||
@@ -1387,7 +1387,7 @@ Standard way to write links -Sayu
|
||||
colour += temp_col
|
||||
return colour
|
||||
|
||||
/proc/get_distant_turf(var/turf/T,var/direction,var/distance)
|
||||
/proc/get_distant_turf(turf/T, direction, distance)
|
||||
if(!T || !direction || !distance) return
|
||||
|
||||
var/dest_x = T.x
|
||||
@@ -1408,7 +1408,7 @@ Standard way to write links -Sayu
|
||||
GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
|
||||
//Version of view() which ignores darkness, because BYOND doesn't have it.
|
||||
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
|
||||
/proc/dview(range = world.view, center, invis_flags = 0)
|
||||
if(!center)
|
||||
return
|
||||
|
||||
@@ -1577,7 +1577,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
//The y dimension of the icon file used in the image
|
||||
// eg: center_image(I, 32,32)
|
||||
// eg2: center_image(I, 96,96)
|
||||
/proc/center_image(var/image/I, x_dimension = 0, y_dimension = 0)
|
||||
/proc/center_image(image/I, x_dimension = 0, y_dimension = 0)
|
||||
if(!I)
|
||||
return
|
||||
|
||||
@@ -1732,7 +1732,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
chosen = matches[chosen]
|
||||
return chosen
|
||||
|
||||
/proc/make_types_fancy(var/list/types)
|
||||
/proc/make_types_fancy(list/types)
|
||||
if(ispath(types))
|
||||
types = list(types)
|
||||
. = list()
|
||||
@@ -1965,7 +1965,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
result += (1 << num)
|
||||
return result
|
||||
|
||||
/proc/pixel_shift_dir(var/dir, var/amount_x = 32, var/amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed.
|
||||
/proc/pixel_shift_dir(dir, amount_x = 32, amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed.
|
||||
amount_x = min(max(0, amount_x), 32) //No less than 0, no greater than 32.
|
||||
amount_y = min(max(0, amount_x), 32)
|
||||
var/list/shift = list("x" = 0, "y" = 0)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//what could possibly go wrong
|
||||
GLOBAL_LIST_INIT(devil_machines, typecacheof(/obj/item/circuitboard, TRUE) - list(
|
||||
/obj/item/circuitboard/shuttle,
|
||||
/obj/item/circuitboard/swfdoor,
|
||||
/obj/item/circuitboard/olddoor,
|
||||
/obj/item/circuitboard/computer,
|
||||
/obj/item/circuitboard/machine
|
||||
))
|
||||
@@ -10,11 +10,11 @@
|
||||
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you
|
||||
to check that the mob is not inside of something
|
||||
*/
|
||||
/atom/proc/Adjacent(var/atom/neighbor) // basic inheritance, unused
|
||||
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
|
||||
return 0
|
||||
|
||||
// Not a sane use of the function and (for now) indicative of an error elsewhere
|
||||
/area/Adjacent(var/atom/neighbor)
|
||||
/area/Adjacent(atom/neighbor)
|
||||
CRASH("Call to /area/Adjacent(), unimplemented proc")
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
|
||||
* Passing through in this case ignores anything with the LETPASSTHROW flag, such as tables, racks, and morgue trays.
|
||||
*/
|
||||
/turf/Adjacent(var/atom/neighbor, var/atom/target = null)
|
||||
/turf/Adjacent(atom/neighbor, atom/target = null)
|
||||
var/turf/T0 = get_turf(neighbor)
|
||||
if(T0 == src)
|
||||
return 1
|
||||
@@ -63,7 +63,7 @@
|
||||
Note: Multiple-tile objects are created when the bound_width and bound_height are creater than the tile size.
|
||||
This is not used in stock /tg/station currently.
|
||||
*/
|
||||
/atom/movable/Adjacent(var/atom/neighbor)
|
||||
/atom/movable/Adjacent(atom/neighbor)
|
||||
if(neighbor == loc) return 1
|
||||
if(!isturf(loc)) return 0
|
||||
for(var/turf/T in locs)
|
||||
@@ -72,7 +72,7 @@
|
||||
return 0
|
||||
|
||||
// This is necessary for storage items not on your person.
|
||||
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
|
||||
/obj/item/Adjacent(atom/neighbor, recurse = 1)
|
||||
if(neighbor == loc) return 1
|
||||
if(istype(loc,/obj/item))
|
||||
if(recurse > 0)
|
||||
@@ -85,7 +85,7 @@
|
||||
This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW.
|
||||
The border_only flag allows you to not objects (for source and destination squares)
|
||||
*/
|
||||
/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null)
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null)
|
||||
for(var/obj/O in src)
|
||||
if( !O.density || O == target_atom || (O.pass_flags & LETPASSTHROW))
|
||||
continue // LETPASSTHROW is used for anything you can click through
|
||||
|
||||
+16
-16
@@ -196,7 +196,7 @@
|
||||
return FALSE
|
||||
|
||||
// Default behavior: ignore double clicks, consider them normal clicks instead
|
||||
/mob/proc/DblClickOn(var/atom/A, var/params)
|
||||
/mob/proc/DblClickOn(atom/A, params)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -209,7 +209,7 @@
|
||||
proximity_flag is not currently passed to attack_hand, and is instead used
|
||||
in human click code to allow glove touches only at melee range.
|
||||
*/
|
||||
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
|
||||
/mob/proc/UnarmedAttack(atom/A, proximity_flag)
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return
|
||||
@@ -230,14 +230,14 @@
|
||||
Used when you are handcuffed and click things.
|
||||
Not currently used by anything but could easily be.
|
||||
*/
|
||||
/mob/proc/RestrainedClickOn(var/atom/A)
|
||||
/mob/proc/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Middle click
|
||||
Only used for swapping hands
|
||||
*/
|
||||
/mob/proc/MiddleClickOn(var/atom/A)
|
||||
/mob/proc/MiddleClickOn(atom/A)
|
||||
pointed(A)
|
||||
return
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
// In case of use break glass
|
||||
/*
|
||||
/atom/proc/MiddleClick(var/mob/M as mob)
|
||||
/atom/proc/MiddleClick(mob/M as mob)
|
||||
return
|
||||
*/
|
||||
|
||||
@@ -294,10 +294,10 @@
|
||||
For most mobs, examine.
|
||||
This is overridden in ai.dm
|
||||
*/
|
||||
/mob/proc/ShiftClickOn(var/atom/A)
|
||||
/mob/proc/ShiftClickOn(atom/A)
|
||||
A.ShiftClick(src)
|
||||
return
|
||||
/atom/proc/ShiftClick(var/mob/user)
|
||||
/atom/proc/ShiftClick(mob/user)
|
||||
if(user.client && get_turf(user.client.eye) == get_turf(user))
|
||||
user.examinate(src)
|
||||
return
|
||||
@@ -306,7 +306,7 @@
|
||||
Ctrl click
|
||||
For most objects, pull
|
||||
*/
|
||||
/mob/proc/CtrlClickOn(var/atom/A)
|
||||
/mob/proc/CtrlClickOn(atom/A)
|
||||
A.CtrlClick(src)
|
||||
return
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
Alt click
|
||||
Unused except for AI
|
||||
*/
|
||||
/mob/proc/AltClickOn(var/atom/A)
|
||||
/mob/proc/AltClickOn(atom/A)
|
||||
A.AltClick(src)
|
||||
return
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/atom/proc/AltClick(var/mob/user)
|
||||
/atom/proc/AltClick(mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
if(user.TurfAdjacent(T))
|
||||
@@ -342,25 +342,25 @@
|
||||
user.listed_turf = null
|
||||
return
|
||||
|
||||
/mob/proc/TurfAdjacent(var/turf/T)
|
||||
/mob/proc/TurfAdjacent(turf/T)
|
||||
return T.Adjacent(src)
|
||||
|
||||
/*
|
||||
Control+Shift/Alt+Shift click
|
||||
Unused except for AI
|
||||
*/
|
||||
/mob/proc/CtrlShiftClickOn(var/atom/A)
|
||||
/mob/proc/CtrlShiftClickOn(atom/A)
|
||||
A.CtrlShiftClick(src)
|
||||
return
|
||||
|
||||
/atom/proc/CtrlShiftClick(var/mob/user)
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
return
|
||||
|
||||
/mob/proc/AltShiftClickOn(var/atom/A)
|
||||
/mob/proc/AltShiftClickOn(atom/A)
|
||||
A.AltShiftClick(src)
|
||||
return
|
||||
|
||||
/atom/proc/AltShiftClick(var/mob/user)
|
||||
/atom/proc/AltShiftClick(mob/user)
|
||||
return
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
LE.fire()
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/mob/proc/face_atom(var/atom/A)
|
||||
/mob/proc/face_atom(atom/A)
|
||||
if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return
|
||||
var/dx = A.x - x
|
||||
var/dy = A.y - y
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/datum/middleClickOverride/
|
||||
|
||||
/datum/middleClickOverride/proc/onClick(var/atom/A, var/mob/living/user)
|
||||
/datum/middleClickOverride/proc/onClick(atom/A, mob/living/user)
|
||||
user.middleClickOverride = null
|
||||
return 1
|
||||
/* Note, when making a new click override it is ABSOLUTELY VITAL that you set the source's clickOverride to null at some point if you don't want them to be stuck with it forever.
|
||||
@@ -35,7 +35,7 @@
|
||||
/datum/middleClickOverride/badminClicker
|
||||
var/summon_path = /obj/item/reagent_containers/food/snacks/cookie
|
||||
|
||||
/datum/middleClickOverride/badminClicker/onClick(var/atom/A, var/mob/living/user)
|
||||
/datum/middleClickOverride/badminClicker/onClick(atom/A, mob/living/user)
|
||||
var/atom/movable/newObject = new summon_path
|
||||
newObject.loc = get_turf(A)
|
||||
to_chat(user, "<span class='notice'>You release the power you had stored up, summoning \a [newObject.name]! </span>")
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
//Middle left indicators
|
||||
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistant menu
|
||||
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
|
||||
//Soul counter is stored with the humans, it does weird when you place it here apparently...
|
||||
|
||||
|
||||
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
static_inventory += mymob.pullin
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
devilsouldisplay = new /obj/screen/devil/soul_counter
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
for(var/obj/screen/inventory/inv in static_inventory)
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
|
||||
/datum/hud/devil/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/true_devil/D = mymob
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/carbon/true_devil/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style))
|
||||
@@ -27,8 +27,6 @@
|
||||
var/obj/screen/move_intent
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
var/list/hotkeybuttons = list() //the buttons that can be used via hotkeys
|
||||
@@ -89,7 +87,6 @@
|
||||
alien_plasma_display = null
|
||||
vampire_blood_display = null
|
||||
nightvisionicon = null
|
||||
devilsouldisplay = null
|
||||
|
||||
QDEL_LIST_ASSOC_VAL(plane_masters)
|
||||
|
||||
|
||||
@@ -36,35 +36,6 @@
|
||||
var/mob/living/carbon/U = usr
|
||||
U.unset_sting()
|
||||
|
||||
/obj/screen/devil
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/devil/soul_counter
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
name = "souls owned"
|
||||
icon_state = "Devil-6"
|
||||
screen_loc = ui_devilsouldisplay
|
||||
|
||||
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
|
||||
invisibility = 0
|
||||
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
|
||||
switch(souls)
|
||||
if(0,null)
|
||||
icon_state = "Devil-1"
|
||||
if(1,2)
|
||||
icon_state = "Devil-2"
|
||||
if(3 to 5)
|
||||
icon_state = "Devil-3"
|
||||
if(6 to 8)
|
||||
icon_state = "Devil-4"
|
||||
if(9 to INFINITY)
|
||||
icon_state = "Devil-5"
|
||||
else
|
||||
icon_state = "Devil-6"
|
||||
|
||||
/obj/screen/devil/soul_counter/proc/clear()
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/ling/chems
|
||||
name = "chemical storage"
|
||||
icon_state = "power_display"
|
||||
@@ -85,7 +56,7 @@
|
||||
/datum/hud/human
|
||||
var/hud_alpha = 255
|
||||
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner, var/ui_style = 'icons/mob/screen_white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_white.dmi', ui_color = "#ffffff", ui_alpha = 255)
|
||||
..()
|
||||
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
|
||||
|
||||
@@ -372,9 +343,6 @@
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
devilsouldisplay = new /obj/screen/devil/soul_counter
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.color = ui_color
|
||||
zone_select.icon = ui_style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
|
||||
/mob/dead/observer/DblClickOn(atom/A, params)
|
||||
if(client.click_intercept)
|
||||
// Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc.
|
||||
// But we return here since we don't want to do regular dblclick handling
|
||||
@@ -18,7 +18,7 @@
|
||||
forceMove(get_turf(A))
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
/mob/dead/observer/ClickOn(atom/A, params)
|
||||
if(client.click_intercept)
|
||||
client.click_intercept.InterceptClickOn(src, params, A)
|
||||
return
|
||||
@@ -55,7 +55,7 @@
|
||||
A.attack_ghost(src)
|
||||
|
||||
// We don't need a fucking toggle.
|
||||
/mob/dead/observer/ShiftClickOn(var/atom/A)
|
||||
/mob/dead/observer/ShiftClickOn(atom/A)
|
||||
examinate(A)
|
||||
|
||||
/atom/proc/attack_ghost(mob/user)
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
return
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) -- Handled by carbons
|
||||
/mob/living/carbon/human/RestrainedClickOn(atom/A) -- Handled by carbons
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/living/carbon/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, params)
|
||||
@@ -54,17 +54,17 @@
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(var/atom/A)
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(var/atom/A)
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
AttackingTarget()
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
|
||||
/mob/living/RestrainedClickOn(var/atom/A)
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -109,5 +109,5 @@
|
||||
return
|
||||
|
||||
// pAIs are not intended to interact with anything in the world
|
||||
/mob/living/silicon/pai/UnarmedAttack(var/atom/A)
|
||||
/mob/living/silicon/pai/UnarmedAttack(atom/A)
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Blob Overmind Controls
|
||||
|
||||
|
||||
/mob/camera/blob/ClickOn(var/atom/A, var/params) //Expand blob
|
||||
/mob/camera/blob/ClickOn(atom/A, params) //Expand blob
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, var/slot)
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) )
|
||||
return
|
||||
qdel(src)
|
||||
@@ -151,7 +151,7 @@
|
||||
if(!.)
|
||||
return I == focus
|
||||
|
||||
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/user)
|
||||
/obj/item/tk_grab/proc/focus_object(obj/target, mob/user)
|
||||
if(!istype(target,/obj))
|
||||
return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
|
||||
@@ -283,7 +283,7 @@ SUBSYSTEM_DEF(air)
|
||||
for(var/turf/simulated/S in T.atmos_adjacent_turfs)
|
||||
add_to_active(S)
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_allturfs(var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz)))
|
||||
/datum/controller/subsystem/air/proc/setup_allturfs(list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz)))
|
||||
var/list/active_turfs = src.active_turfs
|
||||
|
||||
// Clear active turfs - faster than removing every single turf in the world
|
||||
@@ -321,7 +321,7 @@ SUBSYSTEM_DEF(air)
|
||||
ET.excited = 1
|
||||
. += ET
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_atmos_machinery(var/list/machines_to_init)
|
||||
/datum/controller/subsystem/air/proc/setup_atmos_machinery(list/machines_to_init)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Initializing atmospherics machinery...")
|
||||
var/count = _setup_atmos_machinery(machines_to_init)
|
||||
@@ -329,7 +329,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
// this underscored variant is so that we can have a means of late initing
|
||||
// atmos machinery without a loud announcement to the world
|
||||
/datum/controller/subsystem/air/proc/_setup_atmos_machinery(var/list/machines_to_init)
|
||||
/datum/controller/subsystem/air/proc/_setup_atmos_machinery(list/machines_to_init)
|
||||
var/count = 0
|
||||
for(var/obj/machinery/atmospherics/A in machines_to_init)
|
||||
A.atmos_init()
|
||||
@@ -345,7 +345,7 @@ SUBSYSTEM_DEF(air)
|
||||
//this can't be done with setup_atmos_machinery() because
|
||||
// all atmos machinery has to initalize before the first
|
||||
// pipenet can be built.
|
||||
/datum/controller/subsystem/air/proc/setup_pipenets(var/list/pipes)
|
||||
/datum/controller/subsystem/air/proc/setup_pipenets(list/pipes)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Initializing pipe networks...")
|
||||
var/count = _setup_pipenets(pipes)
|
||||
@@ -353,7 +353,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
// An underscored wrapper that exists for the same reason
|
||||
// the machine init wrapper does
|
||||
/datum/controller/subsystem/air/proc/_setup_pipenets(var/list/pipes)
|
||||
/datum/controller/subsystem/air/proc/_setup_pipenets(list/pipes)
|
||||
var/count = 0
|
||||
for(var/obj/machinery/atmospherics/machine in pipes)
|
||||
machine.build_network()
|
||||
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
return
|
||||
batch_update_player_exp(announce = FALSE) // Set this to true if you ever want to inform players about their EXP gains
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
|
||||
/datum/controller/subsystem/jobs/proc/SetupOccupations(list/faction = list("Station"))
|
||||
occupations = list()
|
||||
var/list/all_jobs = subtypesof(/datum/job)
|
||||
if(!all_jobs.len)
|
||||
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
return 1
|
||||
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/Debug(var/text)
|
||||
/datum/controller/subsystem/jobs/proc/Debug(text)
|
||||
if(!GLOB.debug2)
|
||||
return 0
|
||||
job_debug.Add(text)
|
||||
@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
/datum/controller/subsystem/jobs/proc/GetPlayerAltTitle(mob/new_player/player, rank)
|
||||
return player.client.prefs.GetPlayerAltTitle(GetJob(rank))
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
|
||||
/datum/controller/subsystem/jobs/proc/AssignRole(mob/new_player/player, rank, latejoin = 0)
|
||||
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
|
||||
if(player && player.mind && rank)
|
||||
var/datum/job/job = GetJob(rank)
|
||||
@@ -110,7 +110,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
Debug("AR has failed, Player: [player], Rank: [rank]")
|
||||
return 0
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/FreeRole(var/rank) //making additional slot on the fly
|
||||
/datum/controller/subsystem/jobs/proc/FreeRole(rank) //making additional slot on the fly
|
||||
var/datum/job/job = GetJob(rank)
|
||||
if(job && job.current_positions >= job.total_positions && job.total_positions != -1)
|
||||
job.total_positions++
|
||||
@@ -145,7 +145,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
candidates += player
|
||||
return candidates
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/GiveRandomJob(var/mob/new_player/player)
|
||||
/datum/controller/subsystem/jobs/proc/GiveRandomJob(mob/new_player/player)
|
||||
Debug("GRJ Giving random job, Player: [player]")
|
||||
for(var/datum/job/job in shuffle(occupations))
|
||||
if(!job)
|
||||
@@ -229,7 +229,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
|
||||
|
||||
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
/datum/controller/subsystem/jobs/proc/CheckHeadPositions(var/level)
|
||||
/datum/controller/subsystem/jobs/proc/CheckHeadPositions(level)
|
||||
for(var/command_position in GLOB.command_positions)
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job)
|
||||
@@ -409,7 +409,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
log_debug("Dividing Occupations took [stop_watch(watch)]s")
|
||||
return 1
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/AssignRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
/datum/controller/subsystem/jobs/proc/AssignRank(mob/living/carbon/human/H, rank, joined_late = 0)
|
||||
if(!H)
|
||||
return null
|
||||
var/datum/job/job = GetJob(rank)
|
||||
|
||||
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(radio)
|
||||
var/list/datum/radio_frequency/frequencies = list()
|
||||
|
||||
// This is fucking disgusting and needs to die
|
||||
/datum/controller/subsystem/radio/proc/frequency_span_class(var/frequency)
|
||||
/datum/controller/subsystem/radio/proc/frequency_span_class(frequency)
|
||||
// Antags!
|
||||
if(frequency in ANTAG_FREQS)
|
||||
return "syndradio"
|
||||
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(radio)
|
||||
return "radio"
|
||||
|
||||
|
||||
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
|
||||
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
@@ -87,7 +87,7 @@ SUBSYSTEM_DEF(radio)
|
||||
|
||||
return 1
|
||||
|
||||
/datum/controller/subsystem/radio/proc/return_frequency(var/new_frequency as num)
|
||||
/datum/controller/subsystem/radio/proc/return_frequency(new_frequency as num)
|
||||
var/f_text = num2text(new_frequency)
|
||||
var/datum/radio_frequency/frequency = frequencies[f_text]
|
||||
|
||||
|
||||
@@ -125,14 +125,14 @@ SUBSYSTEM_DEF(ticker)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
Master.SetRunLevel(RUNLEVEL_POSTGAME) // This shouldnt process more than once, but you never know
|
||||
auto_toggle_ooc(TRUE) // Turn it on
|
||||
|
||||
declare_completion()
|
||||
addtimer(CALLBACK(src, .proc/call_reboot), 5 SECONDS)
|
||||
|
||||
spawn(50)
|
||||
if(mode.station_was_nuked)
|
||||
reboot_helper("Station destroyed by Nuclear Device.", "nuke")
|
||||
else
|
||||
reboot_helper("Round ended.", "proper completion")
|
||||
/datum/controller/subsystem/ticker/proc/call_reboot()
|
||||
if(mode.station_was_nuked)
|
||||
reboot_helper("Station destroyed by Nuclear Device.", "nuke")
|
||||
else
|
||||
reboot_helper("Round ended.", "proper completion")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/setup()
|
||||
cultdat = setupcult()
|
||||
|
||||
@@ -597,7 +597,7 @@ UI STUFF
|
||||
else
|
||||
usr.client.resolveAllAdminTickets()
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/takeTicket(var/index)
|
||||
/datum/controller/subsystem/tickets/proc/takeTicket(index)
|
||||
if(assignStaffToTicket(usr.client, index))
|
||||
if(span_class == "mentorhelp")
|
||||
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) has taken [ticket_name] number [index]</span>")
|
||||
|
||||
@@ -184,7 +184,7 @@ SUBSYSTEM_DEF(vote)
|
||||
|
||||
return .
|
||||
|
||||
/datum/controller/subsystem/vote/proc/submit_vote(var/ckey, var/vote)
|
||||
/datum/controller/subsystem/vote/proc/submit_vote(ckey, vote)
|
||||
if(mode)
|
||||
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
|
||||
return 0
|
||||
@@ -197,7 +197,7 @@ SUBSYSTEM_DEF(vote)
|
||||
return vote
|
||||
return 0
|
||||
|
||||
/datum/controller/subsystem/vote/proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
/datum/controller/subsystem/vote/proc/initiate_vote(vote_type, initiator_key)
|
||||
if(!mode)
|
||||
if(started_time != null && !check_rights(R_ADMIN))
|
||||
var/next_allowed_time = (started_time + config.vote_delay)
|
||||
@@ -280,7 +280,7 @@ SUBSYSTEM_DEF(vote)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/controller/subsystem/vote/proc/browse_to(var/client/C)
|
||||
/datum/controller/subsystem/vote/proc/browse_to(client/C)
|
||||
if(!C)
|
||||
return
|
||||
var/admin = check_rights(R_ADMIN, 0, user = C.mob)
|
||||
@@ -330,10 +330,10 @@ SUBSYSTEM_DEF(vote)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/controller/subsystem/vote/proc/update_panel(var/client/C)
|
||||
/datum/controller/subsystem/vote/proc/update_panel(client/C)
|
||||
C << output(url_encode(vote_html(C)), "vote.browser:update_vote_div")
|
||||
|
||||
/datum/controller/subsystem/vote/proc/vote_html(var/client/C)
|
||||
/datum/controller/subsystem/vote/proc/vote_html(client/C)
|
||||
. = ""
|
||||
if(question)
|
||||
. += "<h2>Vote: '[question]'</h2>"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/button_icon_state = "default"
|
||||
var/mob/owner
|
||||
|
||||
/datum/action/New(var/Target)
|
||||
/datum/action/New(Target)
|
||||
target = Target
|
||||
button = new
|
||||
button.linked_action = src
|
||||
|
||||
+29
-60
@@ -17,10 +17,6 @@
|
||||
/datum/ai_law/zero/get_index()
|
||||
return 0
|
||||
|
||||
/datum/ai_law/sixsixsix/get_index()
|
||||
return 666
|
||||
|
||||
|
||||
/datum/ai_laws
|
||||
var/name = "Unknown Laws"
|
||||
var/law_header = "Prime Directives"
|
||||
@@ -31,11 +27,9 @@
|
||||
var/list/datum/ai_law/inherent_laws = list()
|
||||
var/list/datum/ai_law/supplied_laws = list()
|
||||
var/list/datum/ai_law/ion/ion_laws = list()
|
||||
var/list/datum/ai_law/sixsixsix/devil_laws = list()
|
||||
var/list/datum/ai_law/sorted_laws = list()
|
||||
|
||||
var/state_zeroth = 0
|
||||
var/list/state_devil = list()
|
||||
var/list/state_ion = list()
|
||||
var/list/state_inherent = list()
|
||||
var/list/state_supplied = list()
|
||||
@@ -68,9 +62,6 @@
|
||||
for(var/ion_law in ion_laws)
|
||||
sorted_laws += ion_law
|
||||
|
||||
for(var/evil_law in devil_laws)
|
||||
sorted_laws += evil_law
|
||||
|
||||
var/index = 1
|
||||
for(var/datum/ai_law/inherent_law in inherent_laws)
|
||||
inherent_law.index = index++
|
||||
@@ -81,7 +72,7 @@
|
||||
if(istype(AL))
|
||||
sorted_laws += AL
|
||||
|
||||
/datum/ai_laws/proc/sync(var/mob/living/silicon/S, var/full_sync = 1)
|
||||
/datum/ai_laws/proc/sync(mob/living/silicon/S, full_sync = 1)
|
||||
// Add directly to laws to avoid log-spam
|
||||
S.sync_zeroth(zeroth_law, zeroth_law_borg)
|
||||
|
||||
@@ -101,7 +92,7 @@
|
||||
S.laws.add_supplied_law(law.index, law.law)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
|
||||
/mob/living/silicon/proc/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
|
||||
if(!is_special_character(src) || mind.original != src)
|
||||
if(zeroth_law_borg)
|
||||
laws.set_zeroth_law(zeroth_law_borg.law)
|
||||
@@ -110,14 +101,14 @@
|
||||
else
|
||||
laws.clear_zeroth_laws()
|
||||
|
||||
/mob/living/silicon/ai/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
|
||||
/mob/living/silicon/ai/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
|
||||
if(zeroth_law)
|
||||
laws.set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null)
|
||||
|
||||
/****************
|
||||
* Add Laws *
|
||||
****************/
|
||||
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
|
||||
/datum/ai_laws/proc/set_zeroth_law(law, law_borg = null)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -128,22 +119,7 @@
|
||||
zeroth_law_borg = null
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/set_sixsixsix_law(var/law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
for(var/datum/ai_law/AL in devil_laws)
|
||||
if(AL.law == law)
|
||||
return
|
||||
|
||||
var/new_law = new/datum/ai_law/sixsixsix(law)
|
||||
devil_laws += new_law
|
||||
if(state_devil.len < devil_laws.len)
|
||||
state_devil += 1
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_ion_law(var/law)
|
||||
/datum/ai_laws/proc/add_ion_law(law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -158,7 +134,7 @@
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_inherent_law(var/law)
|
||||
/datum/ai_laws/proc/add_inherent_law(law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -173,7 +149,7 @@
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
|
||||
/datum/ai_laws/proc/add_supplied_law(number, law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -200,31 +176,28 @@
|
||||
/****************
|
||||
* Remove Laws *
|
||||
*****************/
|
||||
/datum/ai_laws/proc/delete_law(var/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/delete_law(datum/ai_law/law)
|
||||
if(istype(law))
|
||||
law.delete_law(src)
|
||||
|
||||
/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/proc/delete_law(datum/ai_laws/laws)
|
||||
|
||||
/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/zero/delete_law(datum/ai_laws/laws)
|
||||
laws.clear_zeroth_laws()
|
||||
|
||||
/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/ion/delete_law(datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.ion_laws, laws.state_ion, src)
|
||||
|
||||
/datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.devil_laws, laws.state_devil, src)
|
||||
|
||||
/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/inherent/delete_law(datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src)
|
||||
|
||||
/datum/ai_law/supplied/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/supplied/delete_law(datum/ai_laws/laws)
|
||||
var/index = laws.supplied_laws.Find(src)
|
||||
if(index)
|
||||
laws.supplied_laws[index] = ""
|
||||
laws.state_supplied[index] = 1
|
||||
|
||||
/datum/ai_laws/proc/internal_delete_law(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/internal_delete_law(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
laws -= law
|
||||
@@ -239,10 +212,6 @@
|
||||
zeroth_law = null
|
||||
zeroth_law_borg = null
|
||||
|
||||
/datum/ai_laws/proc/clear_sixsixsix_laws()
|
||||
devil_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/clear_ion_laws()
|
||||
ion_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
@@ -255,7 +224,7 @@
|
||||
supplied_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/show_laws(var/who)
|
||||
/datum/ai_laws/proc/show_laws(who)
|
||||
sort_laws()
|
||||
for(var/datum/ai_law/law in sorted_laws)
|
||||
if(law == zeroth_law_borg)
|
||||
@@ -271,25 +240,25 @@
|
||||
/********
|
||||
* Get *
|
||||
********/
|
||||
/datum/ai_laws/proc/get_state_law(var/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/get_state_law(datum/ai_law/law)
|
||||
return law.get_state_law(src)
|
||||
|
||||
/datum/ai_law/proc/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/proc/get_state_law(datum/ai_laws/laws)
|
||||
|
||||
/datum/ai_law/zero/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/zero/get_state_law(datum/ai_laws/laws)
|
||||
if(src == laws.zeroth_law)
|
||||
return laws.state_zeroth
|
||||
|
||||
/datum/ai_law/ion/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/ion/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.ion_laws, laws.state_ion, src)
|
||||
|
||||
/datum/ai_law/inherent/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/inherent/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.inherent_laws, laws.state_inherent, src)
|
||||
|
||||
/datum/ai_law/supplied/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/supplied/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.supplied_laws, laws.state_supplied, src)
|
||||
|
||||
/datum/ai_laws/proc/get_state_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/get_state_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
return state[index]
|
||||
@@ -298,25 +267,25 @@
|
||||
/********
|
||||
* Set *
|
||||
********/
|
||||
/datum/ai_laws/proc/set_state_law(var/datum/ai_law/law, var/state)
|
||||
/datum/ai_laws/proc/set_state_law(datum/ai_law/law, state)
|
||||
law.set_state_law(src, state)
|
||||
|
||||
/datum/ai_law/proc/set_state_law(var/datum/ai_law/law, var/state)
|
||||
/datum/ai_law/proc/set_state_law(datum/ai_law/law, state)
|
||||
|
||||
/datum/ai_law/zero/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/zero/set_state_law(datum/ai_laws/laws, state)
|
||||
if(src == laws.zeroth_law)
|
||||
laws.state_zeroth = state
|
||||
|
||||
/datum/ai_law/ion/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/ion/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.ion_laws, laws.state_ion, src, state)
|
||||
|
||||
/datum/ai_law/inherent/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/inherent/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.inherent_laws, laws.state_inherent, src, state)
|
||||
|
||||
/datum/ai_law/supplied/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/supplied/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.supplied_laws, laws.state_supplied, src, state)
|
||||
|
||||
/datum/ai_laws/proc/set_state_law_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law, var/do_state)
|
||||
/datum/ai_laws/proc/set_state_law_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law, do_state)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
state[index] = do_state
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/title_buttons = ""
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
@@ -101,7 +101,7 @@
|
||||
[get_footer()]
|
||||
"}
|
||||
|
||||
/datum/browser/proc/open(var/use_onclose = 1)
|
||||
/datum/browser/proc/open(use_onclose = 1)
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
@@ -145,7 +145,7 @@
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
/proc/onclose(mob/user, windowid, atom/ref=null)
|
||||
if(!user || !user.client) return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
@@ -161,7 +161,7 @@
|
||||
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
|
||||
// otherwise, just reset the client mob's machine var.
|
||||
//
|
||||
/client/verb/windowclose(var/atomref as text)
|
||||
/client/verb/windowclose(atomref as text)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new())
|
||||
|
||||
/datum/repository/powermonitor/proc/powermonitor_data(var/refresh = 0)
|
||||
/datum/repository/powermonitor/proc/powermonitor_data(refresh = 0)
|
||||
var/pMonData[0]
|
||||
|
||||
var/datum/cache_entry/cache_entry = cache_data
|
||||
|
||||
@@ -71,5 +71,5 @@
|
||||
if(strength >= cleanable)
|
||||
qdel(src)
|
||||
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user, var/list/examine_list)
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
examine_list += description
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
return amt
|
||||
return FALSE
|
||||
|
||||
/datum/component/material_container/proc/transer_amt_to(var/datum/component/material_container/T, amt, id)
|
||||
/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, id)
|
||||
if((amt==0)||(!T)||(!id))
|
||||
return FALSE
|
||||
if(amt<0)
|
||||
|
||||
@@ -345,7 +345,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
|
||||
locked += L
|
||||
return
|
||||
|
||||
/proc/get_id_photo(mob/living/carbon/human/H, var/custom_job = null)
|
||||
/proc/get_id_photo(mob/living/carbon/human/H, custom_job = null)
|
||||
var/icon/preview_icon = null
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
var/obj/item/organ/internal/eyes/eyes_organ = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
usr << browse(html, "window=variables[refid];size=475x650")
|
||||
|
||||
#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing )
|
||||
/proc/debug_variable(name, value, level, var/datum/DA = null, sanitize = TRUE)
|
||||
/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE)
|
||||
var/header
|
||||
if(DA)
|
||||
if(islist(DA))
|
||||
|
||||
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
|
||||
/datum/disease/advance/New(process = 1, datum/disease/advance/D)
|
||||
if(!istype(D))
|
||||
D = null
|
||||
// Generate symptoms if we weren't given any.
|
||||
@@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
*/
|
||||
|
||||
// Mix a list of advance diseases and return the mixed result.
|
||||
/proc/Advance_Mix(var/list/D_list)
|
||||
/proc/Advance_Mix(list/D_list)
|
||||
|
||||
// to_chat(world, "Mixing!!!!")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Cold
|
||||
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Flu
|
||||
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/flu/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// Voice Changing
|
||||
|
||||
/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/voice_change/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Epiglottis Mutation"
|
||||
symptoms = list(new/datum/symptom/voice_change)
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
// Toxin Filter
|
||||
|
||||
/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/heal/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Liver Enhancer"
|
||||
symptoms = list(new/datum/symptom/heal)
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
// Hullucigen
|
||||
|
||||
/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/hullucigen/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Impairment"
|
||||
symptoms = list(new/datum/symptom/hallucigen)
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
// Sensory Restoration
|
||||
|
||||
/datum/disease/advance/sensory_restoration/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/sensory_restoration/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Enhancer"
|
||||
symptoms = list(new/datum/symptom/sensory_restoration)
|
||||
|
||||
@@ -36,15 +36,18 @@ BONUS
|
||||
if(3, 4)
|
||||
if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
spawn(50)
|
||||
head_organ.h_style = "Balding Hair"
|
||||
H.update_hair()
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, null, "Balding Hair"), 5 SECONDS)
|
||||
if(5)
|
||||
if(!(head_organ.f_style == "Shaved") || !(head_organ.h_style == "Bald"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
spawn(50)
|
||||
head_organ.f_style = "Shaved"
|
||||
head_organ.h_style = "Bald"
|
||||
H.update_hair()
|
||||
H.update_fhair()
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, "Shaved", "Bald"), 5 SECONDS)
|
||||
|
||||
/datum/symptom/shedding/proc/change_hair(mob/living/carbon/human/H, obj/item/organ/external/head/head_organ, f_style, h_style)
|
||||
if(!H || !head_organ)
|
||||
return
|
||||
if(f_style)
|
||||
head_organ.f_style = f_style
|
||||
H.update_fhair()
|
||||
if(h_style)
|
||||
head_organ.h_style = h_style
|
||||
H.update_hair()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(speak_emote)
|
||||
D.speak_emote = speak_emote
|
||||
|
||||
/datum/dog_fashion/proc/get_overlay(var/dir)
|
||||
/datum/dog_fashion/proc/get_overlay(dir)
|
||||
if(icon_file && obj_icon_state)
|
||||
var/image/corgI = image(icon_file, obj_icon_state, dir = dir)
|
||||
corgI.alpha = obj_alpha
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
text = replacetext(text,"{HOLDER}","[holder]")
|
||||
return text
|
||||
|
||||
/datum/construction/reversible2/custom_action(index, diff, used_atom, var/mob/user)
|
||||
/datum/construction/reversible2/custom_action(index, diff, used_atom, mob/user)
|
||||
if(!..(index,used_atom,user))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return result
|
||||
|
||||
// Callback function should take the result as the last argument
|
||||
/datum/async_input/proc/on_close(var/datum/callback/cb)
|
||||
/datum/async_input/proc/on_close(datum/callback/cb)
|
||||
onCloseCb = cb
|
||||
|
||||
/datum/async_input/proc/show()
|
||||
|
||||
@@ -84,14 +84,12 @@
|
||||
/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
if(sound)
|
||||
spawn(-1)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
return
|
||||
|
||||
//do the monkey dance
|
||||
|
||||
@@ -21,7 +21,6 @@ GLOBAL_LIST_INIT(huds, list( \
|
||||
ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
|
||||
DATA_HUD_ABDUCTOR = new/datum/atom_hud/abductor(),\
|
||||
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden()\
|
||||
))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
else
|
||||
. = subject
|
||||
|
||||
/datum/log_record/proc/get_health_string(var/mob/living/L)
|
||||
/datum/log_record/proc/get_health_string(mob/living/L)
|
||||
var/OX = L.getOxyLoss() > 50 ? "<b>[L.getOxyLoss()]</b>" : L.getOxyLoss()
|
||||
var/TX = L.getToxLoss() > 50 ? "<b>[L.getToxLoss()]</b>" : L.getToxLoss()
|
||||
var/BU = L.getFireLoss() > 50 ? "<b>[L.getFireLoss()]</b>" : L.getFireLoss()
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
|
||||
var/datum/mindslaves/som //stands for slave or master...hush..
|
||||
var/datum/devilinfo/devilinfo //Information about the devil, if any.
|
||||
var/damnation_type = 0
|
||||
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
|
||||
var/hasSoul = TRUE
|
||||
|
||||
var/isholy = FALSE // is this person a chaplain or admin role allowed to use bibles
|
||||
var/isblessed = FALSE // is this person blessed by a chaplain?
|
||||
@@ -76,7 +72,6 @@
|
||||
|
||||
/datum/mind/New(new_key)
|
||||
key = new_key
|
||||
soulOwner = src
|
||||
|
||||
/datum/mind/Destroy()
|
||||
SSticker.minds -= src
|
||||
@@ -88,7 +83,6 @@
|
||||
antag_datums = null
|
||||
current = null
|
||||
original = null
|
||||
soulOwner = null
|
||||
return ..()
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
@@ -314,22 +308,6 @@
|
||||
|
||||
. += _memory_edit_role_enabled(ROLE_ABDUCTOR)
|
||||
|
||||
/datum/mind/proc/memory_edit_devil(mob/living/H)
|
||||
. = _memory_edit_header("devil", list("devilagents"))
|
||||
if(src in SSticker.mode.devils)
|
||||
if(!devilinfo)
|
||||
. += "<b>No devilinfo found! Yell at a coder!</b>"
|
||||
else if(!devilinfo.ascendable)
|
||||
. += "<b>DEVIL</b>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else
|
||||
. += "<a href='?src=[UID()];devil=devil'>DEVIL</a>|<b>ASCENDABLE DEVIL</b>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else if(src in SSticker.mode.sintouched)
|
||||
. += "devil|Ascendable Devil|<b>SINTOUCHED</b>|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else
|
||||
. += "<a href='?src=[UID()];devil=devil'>devil</a>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|<a href='?src=[UID()];devil=sintouched'>sintouched</a>|<b>NO</b>"
|
||||
|
||||
. += _memory_edit_role_enabled(ROLE_DEVIL)
|
||||
|
||||
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
|
||||
. = _memory_edit_header("event", list())
|
||||
if(src in SSticker.mode.eventmiscs)
|
||||
@@ -461,10 +439,6 @@
|
||||
sections["shadowling"] = memory_edit_shadowling(H)
|
||||
/** Abductors **/
|
||||
sections["abductor"] = memory_edit_abductor(H)
|
||||
/** DEVIL ***/
|
||||
var/static/list/devils_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/carbon/true_devil, /mob/living/silicon/robot))
|
||||
if(is_type_in_typecache(current, devils_typecache))
|
||||
sections["devil"] = memory_edit_devil(H)
|
||||
sections["eventmisc"] = memory_edit_eventmisc(H)
|
||||
/** TRAITOR ***/
|
||||
sections["traitor"] = memory_edit_traitor()
|
||||
@@ -1104,76 +1078,6 @@
|
||||
SSticker.mode.update_eventmisc_icons_added(src)
|
||||
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
|
||||
log_admin("[key_name(usr)] has eventantag'ed [current].")
|
||||
else if(href_list["devil"])
|
||||
switch(href_list["devil"])
|
||||
if("clear")
|
||||
if(src in SSticker.mode.devils)
|
||||
if(istype(current,/mob/living/carbon/true_devil/))
|
||||
to_chat(usr,"<span class='warning'>This cannot be used on true or arch-devils.</span>")
|
||||
else
|
||||
SSticker.mode.devils -= src
|
||||
SSticker.mode.update_devil_icons_removed(src)
|
||||
special_role = null
|
||||
to_chat(current,"<span class='userdanger'>Your infernal link has been severed! You are no longer a devil!</span>")
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/infernal_jaunt)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/fireball/hellish)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/summon_contract)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/violin)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/summon_dancefloor)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch/ascended)
|
||||
message_admins("[key_name_admin(usr)] has de-devil'ed [current].")
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = current
|
||||
S.laws.clear_sixsixsix_laws()
|
||||
devilinfo = null
|
||||
log_admin("[key_name(usr)] has de-devil'ed [current].")
|
||||
else if(src in SSticker.mode.sintouched)
|
||||
SSticker.mode.sintouched -= src
|
||||
message_admins("[key_name_admin(usr)] has de-sintouch'ed [current].")
|
||||
log_admin("[key_name(usr)] has de-sintouch'ed [current].")
|
||||
if("devil")
|
||||
if(devilinfo)
|
||||
devilinfo.ascendable = FALSE
|
||||
message_admins("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
|
||||
log_admin("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
|
||||
return
|
||||
if(!ishuman(current) && !isrobot(current))
|
||||
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
|
||||
return
|
||||
SSticker.mode.devils += src
|
||||
special_role = "devil"
|
||||
SSticker.mode.update_devil_icons_added(src)
|
||||
SSticker.mode.finalize_devil(src, FALSE)
|
||||
SSticker.mode.forge_devil_objectives(src, 2)
|
||||
SSticker.mode.greet_devil(src)
|
||||
message_admins("[key_name_admin(usr)] has devil'ed [current].")
|
||||
log_admin("[key_name(usr)] has devil'ed [current].")
|
||||
if("ascendable_devil")
|
||||
if(devilinfo)
|
||||
devilinfo.ascendable = TRUE
|
||||
message_admins("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
|
||||
log_admin("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
|
||||
return
|
||||
if(!ishuman(current) && !isrobot(current))
|
||||
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
|
||||
return
|
||||
SSticker.mode.devils += src
|
||||
special_role = "devil"
|
||||
SSticker.mode.update_devil_icons_added(src)
|
||||
SSticker.mode.finalize_devil(src, TRUE)
|
||||
SSticker.mode.forge_devil_objectives(src, 2)
|
||||
SSticker.mode.greet_devil(src)
|
||||
message_admins("[key_name_admin(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
|
||||
log_admin("[key_name(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
|
||||
if("sintouched")
|
||||
var/mob/living/carbon/human/H = current
|
||||
H.influenceSin()
|
||||
message_admins("[key_name_admin(usr)] has sintouch'ed [current].")
|
||||
log_admin("[key_name(usr)] has sintouch'ed [current].")
|
||||
|
||||
else if(href_list["traitor"])
|
||||
switch(href_list["traitor"])
|
||||
@@ -1805,17 +1709,6 @@
|
||||
var/obj/effect/proc_holder/spell/S = X
|
||||
S.action.Grant(new_character)
|
||||
|
||||
/datum/mind/proc/disrupt_spells(delay, list/exceptions = New())
|
||||
for(var/X in spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = X
|
||||
for(var/type in exceptions)
|
||||
if(istype(S, type))
|
||||
continue
|
||||
S.charge_counter = delay
|
||||
spawn(0)
|
||||
S.start_recharge()
|
||||
S.updateButtonIcon()
|
||||
|
||||
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
|
||||
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
|
||||
if(G.mind == src)
|
||||
@@ -1891,18 +1784,6 @@
|
||||
to_chat(current, "<span class='warning'><b>You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.</b></span>")
|
||||
to_chat(current, "<span class='warning'><b>This means you don't remember who you were working for or what you were doing.</b></span>")
|
||||
|
||||
/datum/mind/proc/is_revivable() //Note, this ONLY checks the mind.
|
||||
if(damnation_type)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// returns a mob to message to produce something visible for the target mind
|
||||
/datum/mind/proc/messageable_mob()
|
||||
if(!QDELETED(current) && current.client)
|
||||
return current
|
||||
else
|
||||
return get_ghost(even_if_they_cant_reenter = TRUE)
|
||||
|
||||
//Initialisation procs
|
||||
/mob/proc/mind_initialize()
|
||||
if(mind)
|
||||
|
||||
@@ -370,13 +370,13 @@ GLOBAL_LIST_EMPTY(rpd_pipe_list) //Some pipes we don't want to be dispensable
|
||||
pipe_id = PIPE_DISPOSALS_JUNCTION_LEFT
|
||||
pipe_icon = "pipe-j2"
|
||||
|
||||
/proc/get_pipe_name(var/pipe_id, var/pipe_type)
|
||||
/proc/get_pipe_name(pipe_id, pipe_type)
|
||||
for(var/datum/pipes/P in GLOB.construction_pipe_list)
|
||||
if(P.pipe_id == pipe_id && P.pipe_type == pipe_type)
|
||||
return P.pipe_name
|
||||
return "unknown pipe"
|
||||
|
||||
/proc/get_pipe_icon(var/pipe_id)
|
||||
/proc/get_pipe_icon(pipe_id)
|
||||
for(var/datum/pipes/P in GLOB.construction_pipe_list)
|
||||
if(P.pipe_id == pipe_id)
|
||||
return P.pipe_icon
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var/frequency as num
|
||||
var/list/obj/devices = list()
|
||||
|
||||
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
|
||||
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, filter = null as text|null, range = null as num|null)
|
||||
var/turf/start_point
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
@@ -19,7 +19,7 @@
|
||||
send_to_filter(source, signal, next_filter, start_point, range)
|
||||
|
||||
//Sends a signal to all machines belonging to a given filter. Should be called by post_signal()
|
||||
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null)
|
||||
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, filter, turf/start_point = null, range = null)
|
||||
if(range && !start_point)
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
|
||||
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
|
||||
/datum/radio_frequency/proc/add_listener(obj/device as obj, filter as text|null)
|
||||
if(!filter)
|
||||
filter = RADIO_DEFAULT
|
||||
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
/mob/living
|
||||
var/list/ownedSoullinks //soullinks we are the owner of
|
||||
var/list/sharedSoullinks //soullinks we are a/the sharer of
|
||||
|
||||
/mob/living/Destroy()
|
||||
for(var/s in ownedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.ownerDies(FALSE)
|
||||
qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d
|
||||
ownedSoullinks = null
|
||||
for(var/s in sharedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.sharerDies(FALSE)
|
||||
S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed
|
||||
sharedSoullinks = null
|
||||
return ..()
|
||||
|
||||
//Keeps track of a Mob->Mob (potentially Player->Player) connection
|
||||
//Can be used to trigger actions on one party when events happen to another
|
||||
//Eg: shared deaths
|
||||
//Can be used to form a linked list of mob-hopping
|
||||
//Does NOT transfer with minds
|
||||
/datum/soullink
|
||||
var/mob/living/soulowner
|
||||
var/mob/living/soulsharer
|
||||
var/id //Optional ID, for tagging and finding specific instances
|
||||
|
||||
/datum/soullink/Destroy()
|
||||
if(soulowner)
|
||||
LAZYREMOVE(soulowner.ownedSoullinks, src)
|
||||
soulowner = null
|
||||
if(soulsharer)
|
||||
LAZYREMOVE(soulsharer.sharedSoullinks, src)
|
||||
soulsharer = null
|
||||
return ..()
|
||||
|
||||
/datum/soullink/proc/removeSoulsharer(mob/living/sharer)
|
||||
if(soulsharer == sharer)
|
||||
soulsharer = null
|
||||
LAZYREMOVE(sharer.sharedSoullinks, src)
|
||||
|
||||
//Used to assign variables, called primarily by soullink()
|
||||
//Override this to create more unique soullinks (Eg: 1->Many relationships)
|
||||
//Return TRUE/FALSE to return the soullink/null in soullink()
|
||||
/datum/soullink/proc/parseArgs(mob/living/owner, mob/living/sharer)
|
||||
if(!owner || !sharer)
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharer = sharer
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
LAZYADD(sharer.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/ownerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/sharerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Runs after /living update_revive()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/ownerRevives(mob/living/owner)
|
||||
|
||||
//Runs after /living update_revive()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/sharerRevives(mob/living/owner)
|
||||
|
||||
//Quick-use helper
|
||||
/proc/soullink(typepath, ...)
|
||||
var/datum/soullink/S = new typepath()
|
||||
if(S.parseArgs(arglist(args.Copy(2, 0))))
|
||||
return S
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// MULTISHARER //
|
||||
/////////////////
|
||||
//Abstract soullink for use with 1 Owner -> Many Sharer setups
|
||||
/datum/soullink/multisharer
|
||||
var/list/soulsharers
|
||||
|
||||
/datum/soullink/multisharer/parseArgs(mob/living/owner, list/sharers)
|
||||
if(!owner || !LAZYLEN(sharers))
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharers = sharers
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
for(var/l in sharers)
|
||||
var/mob/living/L = l
|
||||
LAZYADD(L.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
/datum/soullink/multisharer/removeSoulsharer(mob/living/sharer)
|
||||
LAZYREMOVE(soulsharers, sharer)
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// SHARED FATE //
|
||||
/////////////////
|
||||
//When the soulowner dies, the soulsharer dies, and vice versa
|
||||
//This is intended for two players(or AI) and two mobs
|
||||
|
||||
/datum/soullink/sharedfate/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulsharer)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedfate/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner)
|
||||
soulowner.death(gibbed)
|
||||
|
||||
/////////////////
|
||||
// Demon Bind //
|
||||
/////////////////
|
||||
//When the soulowner dies, the soulsharer dies, but NOT vice versa
|
||||
//This is intended for two players(or AI) and two mobs
|
||||
|
||||
/datum/soullink/oneway/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulsharer)
|
||||
soulsharer.dust(FALSE)
|
||||
|
||||
/datum/soullink/oneway/devilfriend
|
||||
|
||||
/////////////////
|
||||
// SHARED BODY //
|
||||
/////////////////
|
||||
//When the soulsharer dies, they're placed in the soulowner, who remains alive
|
||||
//If the soulowner dies, the soulsharer is killed and placed into the soulowner (who is still dying)
|
||||
//This one is intended for one player moving between many mobs
|
||||
|
||||
/datum/soullink/sharedbody/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulowner && soulsharer)
|
||||
if(soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedbody/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner && soulsharer && soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
// REPLACEMENT POOL //
|
||||
//////////////////////
|
||||
//When the owner dies, one of the sharers is placed in the owner's body, fully healed
|
||||
//Sort of a "winner-stays-on" soullink
|
||||
//Gibbing ends it immediately
|
||||
|
||||
/datum/soullink/multisharer/replacementpool/ownerDies(gibbed, mob/living/owner)
|
||||
if(LAZYLEN(soulsharers) && !gibbed) //let's not put them in some gibs
|
||||
var/list/souls = shuffle(soulsharers.Copy())
|
||||
for(var/l in souls)
|
||||
var/mob/living/L = l
|
||||
if(L.stat != DEAD && L.mind)
|
||||
L.mind.transfer_to(soulowner)
|
||||
soulowner.revive(TRUE, TRUE)
|
||||
L.death(FALSE)
|
||||
|
||||
//Lose your claim to the throne!
|
||||
/datum/soullink/multisharer/replacementpool/sharerDies(gibbed, mob/living/sharer)
|
||||
removeSoulsharer(sharer)
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
spell.remove_ranged_ability(spell.ranged_ability_user)
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, var/msg)
|
||||
/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, msg)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
if(user.ranged_ability && user.ranged_ability != src)
|
||||
@@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
if(C && ranged_mousepointer && C.mouse_pointer_icon == ranged_mousepointer)
|
||||
C.mouse_pointer_icon = initial(C.mouse_pointer_icon)
|
||||
|
||||
/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, var/msg)
|
||||
/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, msg)
|
||||
if(!user || (user.ranged_ability && user.ranged_ability != src)) //To avoid removing the wrong ability
|
||||
return
|
||||
user.ranged_ability = null
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
summoned_object.admin_spawned = TRUE
|
||||
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
qdel(summoned_object)
|
||||
QDEL_IN(summoned_object, summon_lifespan)
|
||||
else
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork
|
||||
name = "Summon Pitchfork"
|
||||
desc = "A devil's weapon of choice. Use this to summon/unsummon your pitchfork."
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic
|
||||
action_icon_state = "pitchfork"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic/greater
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic/ascended
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/violin
|
||||
item_type = /obj/item/instrument/violin/golden
|
||||
desc = "A devil's instrument of choice. Use this to summon/unsummon your golden violin."
|
||||
invocation_type = "whisper"
|
||||
invocation = "I ain't have this much fun since Georgia."
|
||||
action_icon_state = "golden_violin"
|
||||
name = "Summon golden violin"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/summon_contract
|
||||
name = "Summon infernal contract"
|
||||
desc = "Skip making a contract by hand, just do it by magic."
|
||||
invocation_type = "whisper"
|
||||
invocation = "Just sign on the dotted line."
|
||||
selection_activated_message = "<span class='notice'>You prepare a detailed contract. Click on a target to summon the contract in his hands.</span>"
|
||||
selection_deactivated_message = "<span class='notice'>You archive the contract for later use.</span>"
|
||||
include_user = FALSE
|
||||
range = 5
|
||||
auto_target_single = FALSE // Prevent an accidental contract from summoning
|
||||
click_radius = -1 // Precision clicking required
|
||||
allowed_type = /mob/living/carbon
|
||||
clothes_req = FALSE
|
||||
school = "conjuration"
|
||||
charge_max = 150
|
||||
cooldown_min = 10
|
||||
action_icon_state = "spell_default"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/summon_contract/cast(list/targets, mob/user = usr)
|
||||
for(var/target in targets)
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.mind && user.mind)
|
||||
if(C.stat == DEAD)
|
||||
if(user.drop_item())
|
||||
var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind)
|
||||
user.put_in_hands(contract)
|
||||
else
|
||||
var/obj/item/paper/contract/infernal/contract
|
||||
var/contractTypeName = input(user, "What type of contract?") in list (CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_KNOWLEDGE, CONTRACT_FRIENDSHIP) //TODO: Refactor this to be less boilerplate-y
|
||||
switch(contractTypeName)
|
||||
if(CONTRACT_POWER)
|
||||
contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_WEALTH)
|
||||
contract = new /obj/item/paper/contract/infernal/wealth(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_PRESTIGE)
|
||||
contract = new /obj/item/paper/contract/infernal/prestige(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_MAGIC)
|
||||
contract = new /obj/item/paper/contract/infernal/magic(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_KNOWLEDGE)
|
||||
contract = new /obj/item/paper/contract/infernal/knowledge(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_FRIENDSHIP)
|
||||
contract = new /obj/item/paper/contract/infernal/friendship(C.loc, C.mind, user.mind)
|
||||
C.put_in_hands(contract)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>[C] seems to not be sentient. You are unable to summon a contract for them.</span>")
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/fireball/hellish
|
||||
name = "Hellfire"
|
||||
desc = "This spell launches hellfire at the target."
|
||||
school = "evocation"
|
||||
charge_max = 80
|
||||
clothes_req = FALSE
|
||||
invocation = "Your very soul will catch fire!"
|
||||
invocation_type = "shout"
|
||||
fireball_type = /obj/item/projectile/magic/fireball/infernal
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/fireball/hellish/cast(list/targets, mob/living/user = usr)
|
||||
add_attack_logs(user, targets, "has fired a Hellfire ball", ATKLOG_FEW)
|
||||
.=..()
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infernal_jaunt
|
||||
name = "Infernal Jaunt"
|
||||
desc = "Use hellfire to phase out of existence."
|
||||
charge_max = 200
|
||||
clothes_req = FALSE
|
||||
selection_type = "range"
|
||||
range = -1
|
||||
cooldown_min = 0
|
||||
overlay = null
|
||||
include_user = TRUE
|
||||
action_icon_state = "jaunt"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infernal_jaunt/cast(list/targets, mob/living/user = usr)
|
||||
if(istype(user))
|
||||
if(istype(user.loc, /obj/effect/dummy/slaughter))
|
||||
var/continuing = 0
|
||||
if(istype(get_area(user), /area/shuttle)) // Can always phase in in a shuttle.
|
||||
continuing = TRUE
|
||||
else
|
||||
for(var/mob/living/C in orange(2, get_turf(user.loc))) //Can also phase in when nearby a potential buyer.
|
||||
if (C.mind && C.mind.soulOwner == C.mind)
|
||||
continuing = TRUE
|
||||
break
|
||||
if(continuing)
|
||||
to_chat(user,"<span class='warning'>You are now phasing in.</span>")
|
||||
if(do_mob(user,user,150))
|
||||
user.infernalphasein()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>You can only re-appear near a potential signer or on a shuttle.</span>")
|
||||
revert_cast()
|
||||
return ..()
|
||||
else
|
||||
user.notransform = TRUE
|
||||
user.fakefire()
|
||||
to_chat(user,"<span class='warning'>You begin to phase back into sinful flames.</span>")
|
||||
if(do_mob(user,user,150))
|
||||
user.infernalphaseout()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>You must remain still while exiting.</span>")
|
||||
user.ExtinguishMob()
|
||||
start_recharge()
|
||||
return
|
||||
revert_cast()
|
||||
|
||||
|
||||
/mob/living/proc/infernalphaseout()
|
||||
dust_animation()
|
||||
visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
|
||||
playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1)
|
||||
var/obj/effect/dummy/slaughter/s_holder = new(loc)
|
||||
ExtinguishMob()
|
||||
forceMove(s_holder)
|
||||
holder = s_holder
|
||||
notransform = FALSE
|
||||
fakefireextinguish()
|
||||
|
||||
/mob/living/proc/infernalphasein()
|
||||
if(notransform)
|
||||
to_chat(src,"<span class='warning'>You're too busy to jaunt in.</span>")
|
||||
return 0
|
||||
fakefire()
|
||||
forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'><B>[src] appears in a firey blaze!</B></span>")
|
||||
playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1)
|
||||
spawn(15)
|
||||
fakefireextinguish(TRUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch
|
||||
name = "Sin Touch"
|
||||
desc = "Subtly encourage someone to sin."
|
||||
charge_max = 1800
|
||||
clothes_req = FALSE
|
||||
selection_type = "range"
|
||||
range = 2
|
||||
cooldown_min = 0
|
||||
overlay = null
|
||||
include_user = FALSE
|
||||
action_icon_state = "sintouch"
|
||||
action_background_icon_state = "bg_demon"
|
||||
random_target = TRUE
|
||||
random_target_priority = TARGET_RANDOM
|
||||
max_targets = 3
|
||||
invocation = "TASTE SIN AND INDULGE!!"
|
||||
invocation_type = "shout"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch/ascended
|
||||
name = "Greater sin touch"
|
||||
charge_max = 100
|
||||
range = 7
|
||||
max_targets = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch/cast(list/targets, mob/living/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
if(!H.mind)
|
||||
continue
|
||||
for(var/datum/objective/sintouched/A in H.mind.objectives)
|
||||
continue
|
||||
H.influenceSin()
|
||||
H.Weaken(2)
|
||||
H.Stun(2)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_dancefloor
|
||||
name = "Summon Dancefloor"
|
||||
desc = "When what a Devil really needs is funk."
|
||||
include_user = TRUE
|
||||
range = -1
|
||||
clothes_req = FALSE
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 10
|
||||
cooldown_min = 50 //5 seconds, so the smoke can't be spammed
|
||||
action_icon_state = "funk"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
var/list/dancefloor_turfs
|
||||
var/list/dancefloor_turfs_types
|
||||
var/dancefloor_exists = FALSE
|
||||
// var/datum/effect_system/smoke_spread/transparent/dancefloor_devil/smoke
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_dancefloor/cast(list/targets, mob/user = usr)
|
||||
LAZYINITLIST(dancefloor_turfs)
|
||||
LAZYINITLIST(dancefloor_turfs_types)
|
||||
|
||||
/*
|
||||
if(!smoke)
|
||||
smoke = new()
|
||||
smoke.set_up(0, get_turf(user))
|
||||
smoke.start()
|
||||
*/
|
||||
|
||||
if(dancefloor_exists)
|
||||
dancefloor_exists = FALSE
|
||||
for(var/i in 1 to dancefloor_turfs.len)
|
||||
var/turf/T = dancefloor_turfs[i]
|
||||
T.ChangeTurf(dancefloor_turfs_types[i])
|
||||
else
|
||||
var/list/funky_turfs = RANGE_TURFS(1, user)
|
||||
for(var/turf/T in funky_turfs)
|
||||
if(T.density)
|
||||
to_chat(user, "<span class='warning'>You're too close to a wall.</span>")
|
||||
return
|
||||
dancefloor_exists = TRUE
|
||||
var/i = 1
|
||||
dancefloor_turfs.len = funky_turfs.len
|
||||
dancefloor_turfs_types.len = funky_turfs.len
|
||||
for(var/t in funky_turfs)
|
||||
var/turf/T = t
|
||||
dancefloor_turfs[i] = T
|
||||
dancefloor_turfs_types[i] = T.type
|
||||
T.ChangeTurf((i % 2 == 0) ? /turf/simulated/floor/light/colour_cycle/dancefloor_a : /turf/simulated/floor/light/colour_cycle/dancefloor_b)
|
||||
i++
|
||||
|
||||
/*
|
||||
/datum/effect_system/smoke_spread/transparent/dancefloor_devil
|
||||
effect_type = /obj/effect/particle_effect/smoke/transparent/dancefloor_devil
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent/dancefloor_devil
|
||||
lifetime = 2
|
||||
*/
|
||||
@@ -1,73 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/summon_wealth
|
||||
name = "Summon wealth"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
cooldown_min = 10
|
||||
action_icon_state = "moneybag"
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_wealth/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(user.drop_item())
|
||||
var/obj/item = pick(
|
||||
new /obj/item/coin/gold(user.loc),
|
||||
new /obj/item/coin/diamond(user.loc),
|
||||
new /obj/item/coin/silver(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/gold(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/silver(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/diamond(user.loc),
|
||||
new /obj/item/stack/spacecash/c1000(user.loc))
|
||||
C.put_in_hands(item)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/view_range
|
||||
name = "Distant vision"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
charge_max = 50
|
||||
cooldown_min = 10
|
||||
action_icon_state = "camera_jump"
|
||||
var/ranges = list(7,8,9,10/*,11,12*/)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/view_range/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/C in targets)
|
||||
if(!C.client)
|
||||
continue
|
||||
C.client.view = input("Select view range:", "Range", 4) in ranges
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_friend
|
||||
name = "Summon Friend"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
charge_max = 50
|
||||
cooldown_min = 10
|
||||
action_icon_state = "sacredflame"
|
||||
var/mob/living/friend
|
||||
var/obj/effect/mob_spawn/human/demonic_friend/friendShell
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_friend/cast(list/targets, mob/user = usr)
|
||||
if(!QDELETED(friend))
|
||||
to_chat(friend, "<span class='userdanger'>Your master has deemed you a poor friend. Your durance in hell will now resume.</span>")
|
||||
to_chat(user, "<span class='notice'>You banish your friend back to whence [friend.p_they()] came.</span>")
|
||||
friend.dust()
|
||||
qdel(friendShell)
|
||||
return
|
||||
if(!QDELETED(friendShell))
|
||||
qdel(friendShell)
|
||||
return
|
||||
for(var/C in targets)
|
||||
var/mob/living/L = C
|
||||
friendShell = new /obj/effect/mob_spawn/human/demonic_friend(L.loc, L.mind, src)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless
|
||||
clothes_req = FALSE
|
||||
+16
-12
@@ -16,19 +16,23 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr)
|
||||
for(var/turf/T in targets)
|
||||
for(var/obj/machinery/door/door in T.contents)
|
||||
spawn(1)
|
||||
if(istype(door,/obj/machinery/door/airlock/hatch/gamma))
|
||||
return
|
||||
if(istype(door,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = door
|
||||
A.unlock(1) //forced because it's magic!
|
||||
door.open()
|
||||
INVOKE_ASYNC(src, .proc/try_open_airlock, door)
|
||||
for(var/obj/structure/closet/C in T.contents)
|
||||
spawn(1)
|
||||
if(istype(C, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = C
|
||||
SC.locked = 0
|
||||
C.open()
|
||||
INVOKE_ASYNC(src, .proc/try_open_closet, C)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_airlock(obj/machinery/door/door)
|
||||
if(istype(door, /obj/machinery/door/airlock/hatch/gamma))
|
||||
return
|
||||
if(istype(door, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = door
|
||||
A.unlock(TRUE) //forced because it's magic!
|
||||
door.open()
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_closet(obj/structure/closet/C)
|
||||
if(istype(C, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = C
|
||||
SC.locked = FALSE
|
||||
C.open()
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
|
||||
name = "Greater Knock"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY_ENGINEER,SUPPLY_MEDICAL,SUPPLY_SCIENCE,SUPPLY_ORGANIC,SUPPLY_MATERIALS,SUPPLY_MISC,SUPPLY_VEND))
|
||||
|
||||
/proc/get_supply_group_name(var/cat)
|
||||
/proc/get_supply_group_name(cat)
|
||||
switch(cat)
|
||||
if(SUPPLY_EMERGENCY)
|
||||
return "Emergency"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
|
||||
/proc/get_uplink_items(var/job = null)
|
||||
/proc/get_uplink_items(job = null)
|
||||
var/list/uplink_items = list()
|
||||
var/list/sales_items = list()
|
||||
var/newreference = 1
|
||||
@@ -82,7 +82,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
var/refund_path = null // Alternative path for refunds, in case the item purchased isn't what is actually refunded (ie: holoparasites).
|
||||
var/refund_amount // specified refund amount in case there needs to be a TC penalty for refunds.
|
||||
|
||||
/datum/uplink_item/proc/spawn_item(var/turf/loc, var/obj/item/uplink/U)
|
||||
/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/uplink/U)
|
||||
|
||||
if(hijack_only && !(usr.mind.special_role == SPECIAL_ROLE_NUKEOPS))//nukies get items that regular traitors only get with hijack. If a hijack-only item is not for nukies, then exclude it via the gamemode list.
|
||||
if(!(locate(/datum/objective/hijack) in usr.mind.objectives))
|
||||
@@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
desc = replacetext(initial(temp.desc), "\n", "<br>")
|
||||
return desc
|
||||
|
||||
/datum/uplink_item/proc/buy(var/obj/item/uplink/hidden/U, var/mob/user)
|
||||
/datum/uplink_item/proc/buy(obj/item/uplink/hidden/U, mob/user)
|
||||
|
||||
if(!istype(U))
|
||||
return 0
|
||||
|
||||
@@ -14,37 +14,37 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event
|
||||
var/admin_announcement = 0 // Admin announcements are received regardless of being in range of a radio, unless you're in the lobby to prevent metagaming
|
||||
var/language = "Galactic Common"
|
||||
|
||||
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
|
||||
/datum/announcement/New(do_log = 0, new_sound = null, do_newscast = 0)
|
||||
sound = new_sound
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
|
||||
/datum/announcement/minor/New(var/do_log = 0, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/minor/New(do_log = 0, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Attention"
|
||||
announcement_type = "Minor Announcement"
|
||||
|
||||
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Priority Announcement"
|
||||
announcement_type = "Priority Announcement"
|
||||
|
||||
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/command/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
admin_announcement = 1
|
||||
title = "[command_name()] Update"
|
||||
announcement_type = "[command_name()] Update"
|
||||
|
||||
/datum/announcement/priority/command/event/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/command/event/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
admin_announcement = 0
|
||||
|
||||
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/security/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Security Announcement"
|
||||
announcement_type = "Security Announcement"
|
||||
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/from, var/msg_language)
|
||||
/datum/announcement/proc/Announce(message as text, new_title = "", new_sound = null, do_newscast = newscast, msg_sanitized = 0, from, msg_language)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -76,7 +76,7 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event
|
||||
Sound(message_sound, combined_receivers[1] + combined_receivers[2])
|
||||
Log(message, message_title)
|
||||
|
||||
/datum/announcement/proc/Get_Receivers(var/datum/language/message_language)
|
||||
/datum/announcement/proc/Get_Receivers(datum/language/message_language)
|
||||
var/list/receivers = list()
|
||||
var/list/garbled_receivers = list()
|
||||
|
||||
@@ -161,7 +161,7 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event
|
||||
news.can_be_redacted = 0
|
||||
announce_newscaster_news(news)
|
||||
|
||||
/datum/announcement/proc/Sound(var/message_sound, var/receivers)
|
||||
/datum/announcement/proc/Sound(message_sound, receivers)
|
||||
if(!message_sound)
|
||||
return
|
||||
for(var/mob/M in receivers)
|
||||
@@ -172,6 +172,6 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define TELECOMMS_RECEPTION_RECEIVER 2
|
||||
#define TELECOMMS_RECEPTION_BOTH 3
|
||||
|
||||
/proc/get_frequency_name(var/display_freq)
|
||||
/proc/get_frequency_name(display_freq)
|
||||
var/freq_text
|
||||
|
||||
// the name of the channel
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
qdel(dummy)
|
||||
return G
|
||||
|
||||
/proc/CreateSecurityRecord(var/name as text, var/id as text)
|
||||
/proc/CreateSecurityRecord(name as text, id as text)
|
||||
var/datum/data/record/R = new /datum/data/record()
|
||||
R.fields["name"] = name
|
||||
R.fields["id"] = id
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
#define ENVIRON 3
|
||||
*/
|
||||
|
||||
/area/proc/powered(var/chan) // return true if the area has power to given channel
|
||||
/area/proc/powered(chan) // return true if the area has power to given channel
|
||||
|
||||
if(!requires_power)
|
||||
return 1
|
||||
@@ -405,7 +405,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_AREA_POWER_CHANGE)
|
||||
updateicon()
|
||||
|
||||
/area/proc/usage(var/chan)
|
||||
/area/proc/usage(chan)
|
||||
var/used = 0
|
||||
switch(chan)
|
||||
if(LIGHT)
|
||||
@@ -439,7 +439,7 @@
|
||||
used_light = 0
|
||||
used_environ = 0
|
||||
|
||||
/area/proc/use_power(var/amount, var/chan)
|
||||
/area/proc/use_power(amount, chan)
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
used_equip += amount
|
||||
@@ -448,7 +448,7 @@
|
||||
if(ENVIRON)
|
||||
used_environ += amount
|
||||
|
||||
/area/proc/use_battery_power(var/amount, var/chan)
|
||||
/area/proc/use_battery_power(amount, chan)
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
used_equip += amount
|
||||
@@ -488,14 +488,14 @@
|
||||
else if(L && L.client && !(L.client.prefs.sound & SOUND_BUZZ))
|
||||
L.client.ambience_playing = FALSE
|
||||
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
/area/proc/gravitychange(gravitystate = 0, area/A)
|
||||
A.has_gravity = gravitystate
|
||||
|
||||
if(gravitystate)
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
thunk(M)
|
||||
|
||||
/area/proc/thunk(var/mob/living/carbon/human/M)
|
||||
/area/proc/thunk(mob/living/carbon/human/M)
|
||||
if(istype(M,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
|
||||
if(istype(M.shoes, /obj/item/clothing/shoes/magboots) && (M.shoes.flags & NOSLIP))
|
||||
return
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
for(var/obj/machinery/computer/syndicate_depot/C in src)
|
||||
C.security_lockout = FALSE
|
||||
|
||||
/area/syndicate_depot/core/proc/set_emergency_access(var/openaccess)
|
||||
/area/syndicate_depot/core/proc/set_emergency_access(openaccess)
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
if(istype(A, /obj/machinery/door/airlock/hatch/syndicate/vault))
|
||||
continue
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
// Used in shuttle movement and AI eye stuff.
|
||||
// Primarily used to notify objects being moved by a shuttle/bluespace fuckup.
|
||||
/atom/movable/proc/setLoc(var/T, var/teleported=0)
|
||||
/atom/movable/proc/setLoc(T, teleported=0)
|
||||
loc = T
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct = 0, movetime)
|
||||
@@ -308,7 +308,7 @@
|
||||
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
|
||||
//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
|
||||
//movement_dir == 0 when stopping or any dir when trying to move
|
||||
/atom/movable/proc/Process_Spacemove(var/movement_dir = 0)
|
||||
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
||||
if(has_gravity(src))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
return candidates
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/blobize(var/mob/living/carbon/human/blob)
|
||||
/datum/game_mode/blob/proc/blobize(mob/living/carbon/human/blob)
|
||||
var/datum/mind/blobmind = blob.mind
|
||||
if(!istype(blobmind))
|
||||
return 0
|
||||
@@ -79,7 +79,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
burst_blob(blobmind)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/blob/proc/make_blobs(var/count)
|
||||
/datum/game_mode/blob/proc/make_blobs(count)
|
||||
var/list/candidates = get_blob_candidates()
|
||||
var/mob/living/carbon/human/blob = null
|
||||
count=min(count, candidates.len)
|
||||
@@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
to_chat(world, "You must kill it all while minimizing the damage to the station.")
|
||||
|
||||
|
||||
/datum/game_mode/blob/proc/greet_blob(var/datum/mind/blob)
|
||||
/datum/game_mode/blob/proc/greet_blob(datum/mind/blob)
|
||||
to_chat(blob.current, "<span class='userdanger'>You are infected by the Blob!</span>")
|
||||
to_chat(blob.current, "<b>Your body is ready to give spawn to a new blob core which will eat this station.</b>")
|
||||
to_chat(blob.current, "<b>Find a good location to spawn the core and then take control and overwhelm the station!</b>")
|
||||
@@ -106,7 +106,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
SEND_SOUND(blob.current, sound('sound/magic/mutate.ogg'))
|
||||
return
|
||||
|
||||
/datum/game_mode/blob/proc/show_message(var/message)
|
||||
/datum/game_mode/blob/proc/show_message(message)
|
||||
for(var/datum/mind/blob in infected_crew)
|
||||
to_chat(blob.current, message)
|
||||
|
||||
@@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
for(var/datum/mind/blob in infected_crew)
|
||||
burst_blob(blob)
|
||||
|
||||
/datum/game_mode/blob/proc/burst_blob(var/datum/mind/blob, var/warned=0)
|
||||
/datum/game_mode/blob/proc/burst_blob(datum/mind/blob, warned=0)
|
||||
var/client/blob_client = null
|
||||
var/turf/location = null
|
||||
|
||||
@@ -190,7 +190,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/blob/proc/stage(var/stage)
|
||||
/datum/game_mode/blob/proc/stage(stage)
|
||||
switch(stage)
|
||||
if(0)
|
||||
send_intercept(1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/game_mode/blob/proc/send_intercept(var/report = 1)
|
||||
/datum/game_mode/blob/proc/send_intercept(report = 1)
|
||||
var/intercepttext = ""
|
||||
var/interceptname = ""
|
||||
switch(report)
|
||||
@@ -89,7 +89,7 @@
|
||||
else if(istype(O, /obj/machinery))
|
||||
src.mach += 1
|
||||
|
||||
/datum/station_state/proc/score(var/datum/station_state/result)
|
||||
/datum/station_state/proc/score(datum/station_state/result)
|
||||
if(!result) return 0
|
||||
var/output = 0
|
||||
output += (result.floor / max(floor,1))
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
fire_damage = 3
|
||||
var/mob/camera/blob/overmind = null
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/proc/adjustcolors(var/a_color)
|
||||
/mob/living/simple_animal/hostile/blob/proc/adjustcolors(a_color)
|
||||
if(a_color)
|
||||
color = a_color
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/New(loc, var/obj/structure/blob/factory/linked_node)
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/New(loc, obj/structure/blob/factory/linked_node)
|
||||
if(istype(linked_node))
|
||||
factory = linked_node
|
||||
factory.spores += src
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
adjustcolors(overmind?.blob_reagent_datum?.complementary_color)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/adjustcolors(var/a_color)
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/adjustcolors(a_color)
|
||||
color = a_color
|
||||
|
||||
if(is_zombie)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
point_rate = new_rate
|
||||
|
||||
|
||||
/obj/structure/blob/core/adjustcolors(var/a_color)
|
||||
/obj/structure/blob/core/adjustcolors(a_color)
|
||||
overlays.Cut()
|
||||
color = null
|
||||
var/image/I = new('icons/mob/blob.dmi', "blob")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
GLOB.blob_nodes += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/blob/node/adjustcolors(var/a_color)
|
||||
/obj/structure/blob/node/adjustcolors(a_color)
|
||||
overlays.Cut()
|
||||
color = null
|
||||
var/image/I = new('icons/mob/blob.dmi', "blob")
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
overmind.max_blob_points -= 50
|
||||
..()
|
||||
|
||||
/obj/structure/blob/storage/proc/update_max_blob_points(var/new_point_increase)
|
||||
/obj/structure/blob/storage/proc/update_max_blob_points(new_point_increase)
|
||||
if(overmind)
|
||||
overmind.max_blob_points += new_point_increase
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
if(blob_core && hud_used)
|
||||
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font face='Small Fonts' color='#e36600'>[round(blob_core.obj_integrity)]</font></div>"
|
||||
|
||||
/mob/camera/blob/proc/add_points(var/points)
|
||||
/mob/camera/blob/proc/add_points(points)
|
||||
if(points != 0)
|
||||
blob_points = clamp(blob_points + points, 0, max_blob_points)
|
||||
if(hud_used)
|
||||
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font face='Small Fonts' color='#82ed00'>[round(src.blob_points)]</font></div>"
|
||||
|
||||
/mob/camera/blob/say(var/message)
|
||||
/mob/camera/blob/say(message)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
stat(null, "Core Health: [blob_core.obj_integrity]")
|
||||
stat(null, "Power Stored: [blob_points]/[max_blob_points]")
|
||||
|
||||
/mob/camera/blob/Move(var/NewLoc, var/Dir = 0)
|
||||
/mob/camera/blob/Move(NewLoc, Dir = 0)
|
||||
var/obj/structure/blob/B = locate() in range("3x3", NewLoc)
|
||||
if(B)
|
||||
loc = NewLoc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Point controlling procs
|
||||
|
||||
/mob/camera/blob/proc/can_buy(var/cost = 15)
|
||||
/mob/camera/blob/proc/can_buy(cost = 15)
|
||||
if(blob_points < cost)
|
||||
to_chat(src, "<span class='warning'>You cannot afford this!</span>")
|
||||
return 0
|
||||
@@ -50,7 +50,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
create_shield(T)
|
||||
|
||||
/mob/camera/blob/proc/create_shield(var/turf/T)
|
||||
/mob/camera/blob/proc/create_shield(turf/T)
|
||||
|
||||
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
|
||||
var/obj/structure/blob/shield/S = locate(/obj/structure/blob/shield) in T
|
||||
@@ -283,7 +283,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
remove_blob(T)
|
||||
|
||||
/mob/camera/blob/proc/remove_blob(var/turf/T)
|
||||
/mob/camera/blob/proc/remove_blob(turf/T)
|
||||
|
||||
var/obj/structure/blob/B = locate(/obj/structure/blob) in T
|
||||
if(!T)
|
||||
@@ -312,7 +312,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
expand_blob(T)
|
||||
|
||||
/mob/camera/blob/proc/expand_blob(var/turf/T)
|
||||
/mob/camera/blob/proc/expand_blob(turf/T)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
rally_spores(T)
|
||||
|
||||
/mob/camera/blob/proc/rally_spores(var/turf/T)
|
||||
/mob/camera/blob/proc/rally_spores(turf/T)
|
||||
to_chat(src, "You rally your spores.")
|
||||
|
||||
var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z))
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
health_timestamp = world.time + 10 // 1 seconds
|
||||
|
||||
|
||||
/obj/structure/blob/proc/Pulse(var/pulse = 0, var/origin_dir = 0, var/a_color)//Todo: Fix spaceblob expand
|
||||
/obj/structure/blob/proc/Pulse(pulse = 0, origin_dir = 0, a_color)//Todo: Fix spaceblob expand
|
||||
RegenHealth()
|
||||
|
||||
if(run_action())//If we can do something here then we dont need to pulse more
|
||||
@@ -110,7 +110,7 @@
|
||||
if(iswallturf(loc))
|
||||
loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it
|
||||
|
||||
/obj/structure/blob/proc/expand(var/turf/T = null, var/prob = 1, var/a_color)
|
||||
/obj/structure/blob/proc/expand(turf/T = null, prob = 1, a_color)
|
||||
if(prob && !prob(obj_integrity))
|
||||
return
|
||||
if(istype(T, /turf/space) && prob(75)) return
|
||||
@@ -139,7 +139,7 @@
|
||||
A.blob_act(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/blob/Crossed(var/mob/living/L, oldloc)
|
||||
/obj/structure/blob/Crossed(mob/living/L, oldloc)
|
||||
..()
|
||||
L.blob_act(src)
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
if(. && obj_integrity > 0)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/blob/proc/change_to(var/type)
|
||||
/obj/structure/blob/proc/change_to(type)
|
||||
if(!ispath(type))
|
||||
error("[type] is an invalid type for the blob.")
|
||||
var/obj/structure/blob/B = new type(src.loc)
|
||||
@@ -198,7 +198,7 @@
|
||||
B.adjustcolors(color)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/blob/proc/adjustcolors(var/a_color)
|
||||
/obj/structure/blob/proc/adjustcolors(a_color)
|
||||
if(a_color)
|
||||
color = a_color
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@ if you override it, MAKE SURE you call parent or it will not be usable
|
||||
the same goes for Remove(). if you override Remove(), call parent or else your power wont be removed on respec
|
||||
*/
|
||||
|
||||
/datum/action/changeling/proc/on_purchase(var/mob/user)
|
||||
/datum/action/changeling/proc/on_purchase(mob/user)
|
||||
if(needs_button)
|
||||
Grant(user)
|
||||
|
||||
@@ -46,18 +46,18 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
|
||||
sting_feedback(user, target)
|
||||
take_chemical_cost(c)
|
||||
|
||||
/datum/action/changeling/proc/sting_action(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/proc/sting_action(mob/user, mob/target)
|
||||
return 0
|
||||
|
||||
/datum/action/changeling/proc/sting_feedback(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/proc/sting_feedback(mob/user, mob/target)
|
||||
return 0
|
||||
|
||||
/datum/action/changeling/proc/take_chemical_cost(var/datum/changeling/changeling)
|
||||
/datum/action/changeling/proc/take_chemical_cost(datum/changeling/changeling)
|
||||
changeling.chem_charges -= chemical_cost
|
||||
changeling.geneticdamage += genetic_damage
|
||||
|
||||
//Fairly important to remember to return 1 on success >.<
|
||||
/datum/action/changeling/proc/can_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/proc/can_sting(mob/user, mob/target)
|
||||
if(!ishuman(user)) //typecast everything from mob to carbon from this point onwards
|
||||
return 0
|
||||
if(req_human && (!ishuman(user) || issmall(user)))
|
||||
@@ -82,7 +82,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
|
||||
return 1
|
||||
|
||||
//used in /mob/Stat()
|
||||
/datum/action/changeling/proc/can_be_used_by(var/mob/user)
|
||||
/datum/action/changeling/proc/can_be_used_by(mob/user)
|
||||
if(!ishuman(user))
|
||||
return 0
|
||||
if(req_human && !ishuman(user))
|
||||
@@ -90,7 +90,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
|
||||
return 1
|
||||
|
||||
// Transform the target to the chosen dna. Used in transform.dm and tiny_prick.dm (handy for changes since it's the same thing done twice)
|
||||
/datum/action/changeling/proc/transform_dna(var/mob/living/carbon/human/H, var/datum/dna/D)
|
||||
/datum/action/changeling/proc/transform_dna(mob/living/carbon/human/H, datum/dna/D)
|
||||
if(!D)
|
||||
return
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
view_mode = new_view_mode
|
||||
return TRUE
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/mob/living/carbon/user, var/sting_name)
|
||||
/datum/changeling/proc/purchasePower(mob/living/carbon/user, sting_name)
|
||||
var/datum/action/changeling/thepower = null
|
||||
var/list/all_powers = init_subtypes(/datum/action/changeling)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
return TRUE
|
||||
|
||||
//Reselect powers
|
||||
/datum/changeling/proc/lingRespec(var/mob/user)
|
||||
/datum/changeling/proc/lingRespec(mob/user)
|
||||
if(!ishuman(user) || issmall(user))
|
||||
to_chat(user, "<span class='danger'>We can't remove our evolutions in this form!</span>")
|
||||
return FALSE
|
||||
@@ -136,7 +136,7 @@
|
||||
to_chat(user, "<span class='danger'>You lack the power to readapt your evolutions!</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/proc/make_changeling(var/get_free_powers = TRUE)
|
||||
/mob/proc/make_changeling(get_free_powers = TRUE)
|
||||
if(!mind)
|
||||
return
|
||||
if(!ishuman(src))
|
||||
@@ -170,7 +170,7 @@
|
||||
return 1
|
||||
|
||||
//Used to dump the languages from the changeling datum into the actual mob.
|
||||
/mob/proc/changeling_update_languages(var/updated_languages)
|
||||
/mob/proc/changeling_update_languages(updated_languages)
|
||||
|
||||
for(var/datum/language/L in updated_languages)
|
||||
add_language("L.name")
|
||||
@@ -190,7 +190,7 @@
|
||||
chem_recharge_slowdown = initial(chem_recharge_slowdown)
|
||||
mimicing = ""
|
||||
|
||||
/mob/proc/remove_changeling_powers(var/keep_free_powers=0)
|
||||
/mob/proc/remove_changeling_powers(keep_free_powers=0)
|
||||
if(ishuman(src))
|
||||
if(mind && mind.changeling)
|
||||
digitalcamo = 0
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
var/mob/living/carbon/target = G.affecting
|
||||
return changeling.can_absorb_dna(user,target)
|
||||
|
||||
/datum/action/changeling/absorbDNA/sting_action(var/mob/user)
|
||||
/datum/action/changeling/absorbDNA/sting_action(mob/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/obj/item/grab/G = user.get_active_hand()
|
||||
var/mob/living/carbon/human/target = G.affecting
|
||||
@@ -101,7 +101,7 @@
|
||||
return 1
|
||||
|
||||
//Absorbs the target DNA.
|
||||
/datum/changeling/proc/absorb_dna(mob/living/carbon/T, var/mob/user)
|
||||
/datum/changeling/proc/absorb_dna(mob/living/carbon/T, mob/user)
|
||||
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
|
||||
var/datum/dna/new_dna = T.dna.Clone()
|
||||
//Steal all of their languages!
|
||||
@@ -113,7 +113,7 @@
|
||||
absorbedcount++
|
||||
store_dna(new_dna, user)
|
||||
|
||||
/datum/changeling/proc/store_dna(var/datum/dna/new_dna, var/mob/user)
|
||||
/datum/changeling/proc/store_dna(datum/dna/new_dna, mob/user)
|
||||
for(var/datum/objective/escape/escape_with_identity/E in user.mind.objectives)
|
||||
if(E.target_real_name == new_dna.real_name)
|
||||
protected_dna |= new_dna
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
dna_cost = 1
|
||||
|
||||
//Prevents AIs tracking you but makes you easily detectable to the human-eye.
|
||||
/datum/action/changeling/digitalcamo/sting_action(var/mob/user)
|
||||
/datum/action/changeling/digitalcamo/sting_action(mob/user)
|
||||
|
||||
if(user.digitalcamo)
|
||||
to_chat(user, "<span class='notice'>We return to normal.</span>")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
req_stat = UNCONSCIOUS
|
||||
|
||||
//Recover from stuns.
|
||||
/datum/action/changeling/epinephrine/sting_action(var/mob/living/user)
|
||||
/datum/action/changeling/epinephrine/sting_action(mob/living/user)
|
||||
|
||||
if(user.lying)
|
||||
to_chat(user, "<span class='notice'>We arise.</span>")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
max_genetic_damage = 100
|
||||
|
||||
//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay.
|
||||
/datum/action/changeling/fakedeath/sting_action(var/mob/living/user)
|
||||
/datum/action/changeling/fakedeath/sting_action(mob/living/user)
|
||||
|
||||
to_chat(user, "<span class='notice'>We begin our stasis, preparing energy to arise once more.</span>")
|
||||
if(user.stat != DEAD)
|
||||
@@ -30,7 +30,7 @@
|
||||
var/datum/action/changeling/revive/R = new
|
||||
R.Grant(user)
|
||||
|
||||
/datum/action/changeling/fakedeath/can_sting(var/mob/user)
|
||||
/datum/action/changeling/fakedeath/can_sting(mob/user)
|
||||
if(HAS_TRAIT(user, TRAIT_FAKEDEATH))
|
||||
to_chat(user, "<span class='warning'>We are already regenerating.</span>")
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
recent_uses = max(1, recent_uses - (1 / healing_ticks))
|
||||
|
||||
//Starts healing you every second for 10 seconds. Can be used whilst unconscious.
|
||||
/datum/action/changeling/fleshmend/sting_action(var/mob/living/user)
|
||||
/datum/action/changeling/fleshmend/sting_action(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>We begin to heal rapidly.</span>")
|
||||
if(recent_uses > 1)
|
||||
to_chat(user, "<span class='warning'>Our healing's effectiveness is reduced \
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
chemical_cost = -1
|
||||
needs_button = FALSE
|
||||
|
||||
/datum/action/changeling/hivemind_comms/on_purchase(var/mob/user)
|
||||
/datum/action/changeling/hivemind_comms/on_purchase(mob/user)
|
||||
..()
|
||||
var/datum/changeling/changeling=user.mind.changeling
|
||||
changeling.changeling_speak = 1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
max_genetic_damage = 3
|
||||
|
||||
//Transform into a human.
|
||||
/datum/action/changeling/humanform/sting_action(var/mob/living/carbon/human/user)
|
||||
/datum/action/changeling/humanform/sting_action(mob/living/carbon/human/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/list/names = list()
|
||||
for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
req_human = 1
|
||||
|
||||
//Transform into a monkey.
|
||||
/datum/action/changeling/lesserform/sting_action(var/mob/living/carbon/human/user)
|
||||
/datum/action/changeling/lesserform/sting_action(mob/living/carbon/human/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
if(!user)
|
||||
return 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
// Fake Voice
|
||||
/datum/action/changeling/mimicvoice/sting_action(var/mob/user)
|
||||
/datum/action/changeling/mimicvoice/sting_action(mob/user)
|
||||
var/datum/changeling/changeling=user.mind.changeling
|
||||
if(changeling.mimicing)
|
||||
changeling.mimicing = ""
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/weapon_type
|
||||
var/weapon_name_simple
|
||||
|
||||
/datum/action/changeling/weapon/try_to_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/weapon/try_to_sting(mob/user, mob/target)
|
||||
if(istype(user.l_hand, weapon_type)) //Not the nicest way to do it, but eh
|
||||
qdel(user.l_hand)
|
||||
if(!silent)
|
||||
@@ -36,7 +36,7 @@
|
||||
return
|
||||
..(user, target)
|
||||
|
||||
/datum/action/changeling/weapon/sting_action(var/mob/user)
|
||||
/datum/action/changeling/weapon/sting_action(mob/user)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "The [user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!")
|
||||
return
|
||||
@@ -60,7 +60,7 @@
|
||||
var/recharge_slowdown = 0
|
||||
var/blood_on_castoff = 0
|
||||
|
||||
/datum/action/changeling/suit/try_to_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/suit/try_to_sting(mob/user, mob/target)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
if(!ishuman(user) || !changeling)
|
||||
return
|
||||
@@ -84,7 +84,7 @@
|
||||
return
|
||||
..(H, target)
|
||||
|
||||
/datum/action/changeling/suit/sting_action(var/mob/living/carbon/human/user)
|
||||
/datum/action/changeling/suit/sting_action(mob/living/carbon/human/user)
|
||||
if(!user.unEquip(user.wear_suit))
|
||||
to_chat(user, "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!")
|
||||
return
|
||||
@@ -358,7 +358,7 @@
|
||||
weapon_type = /obj/item/shield/changeling
|
||||
weapon_name_simple = "shield"
|
||||
|
||||
/datum/action/changeling/weapon/shield/sting_action(var/mob/user)
|
||||
/datum/action/changeling/weapon/shield/sting_action(mob/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling //So we can read the absorbedcount.
|
||||
if(!changeling)
|
||||
return
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
req_stat = UNCONSCIOUS
|
||||
|
||||
//Heals the things that the other regenerative abilities don't.
|
||||
/datum/action/changeling/panacea/sting_action(var/mob/user)
|
||||
/datum/action/changeling/panacea/sting_action(mob/user)
|
||||
|
||||
to_chat(user, "<span class='notice'>We cleanse impurities from our form.</span>")
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
always_keep = 1
|
||||
|
||||
//Revive from regenerative stasis
|
||||
/datum/action/changeling/revive/sting_action(var/mob/living/carbon/user)
|
||||
/datum/action/changeling/revive/sting_action(mob/living/carbon/user)
|
||||
user.setToxLoss(0, FALSE)
|
||||
user.setOxyLoss(0, FALSE)
|
||||
user.setCloneLoss(0, FALSE)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
req_human = 1
|
||||
|
||||
//A flashy ability, good for crowd control and sowing chaos.
|
||||
/datum/action/changeling/resonant_shriek/sting_action(var/mob/user)
|
||||
/datum/action/changeling/resonant_shriek/sting_action(mob/user)
|
||||
for(var/mob/living/M in get_mobs_in_view(4, user))
|
||||
if(iscarbon(M))
|
||||
if(ishuman(M))
|
||||
@@ -41,7 +41,7 @@
|
||||
dna_cost = 1
|
||||
|
||||
//A flashy ability, good for crowd control and sewing chaos.
|
||||
/datum/action/changeling/dissonant_shriek/sting_action(var/mob/user)
|
||||
/datum/action/changeling/dissonant_shriek/sting_action(mob/user)
|
||||
for(var/obj/machinery/light/L in range(5, usr))
|
||||
L.on = 1
|
||||
L.break_light_tube()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
req_dna = 5
|
||||
|
||||
//Makes some spiderlings. Good for setting traps and causing general trouble.
|
||||
/datum/action/changeling/spiders/sting_action(var/mob/user)
|
||||
/datum/action/changeling/spiders/sting_action(mob/user)
|
||||
for(var/i=0, i<2, i++)
|
||||
var/obj/structure/spider/spiderling/S = new(user.loc)
|
||||
S.grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/stacks = 0 //Increments every 5 seconds; damage increases over time
|
||||
var/enabled = 0 //Whether or not you are a hedgehog
|
||||
|
||||
/datum/action/changeling/strained_muscles/sting_action(var/mob/living/carbon/user)
|
||||
/datum/action/changeling/strained_muscles/sting_action(mob/living/carbon/user)
|
||||
enabled = !enabled
|
||||
if(enabled)
|
||||
to_chat(user, "<span class='notice'>Our muscles tense and strengthen.</span>")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
dna_cost = 1
|
||||
req_human = 1 //Monkeys can't grab
|
||||
|
||||
/datum/action/changeling/swap_form/can_sting(var/mob/living/carbon/user)
|
||||
/datum/action/changeling/swap_form/can_sting(mob/living/carbon/user)
|
||||
if(!..())
|
||||
return
|
||||
var/obj/item/grab/G = user.get_active_hand()
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
/datum/action/changeling/swap_form/sting_action(var/mob/living/carbon/user)
|
||||
/datum/action/changeling/swap_form/sting_action(mob/living/carbon/user)
|
||||
var/obj/item/grab/G = user.get_active_hand()
|
||||
var/mob/living/carbon/human/target = G.affecting
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(mind && mind.changeling && mind.changeling.chosen_sting)
|
||||
mind.changeling.chosen_sting.unset_sting(src)
|
||||
|
||||
/datum/action/changeling/sting/can_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/can_sting(mob/user, mob/target)
|
||||
if(!..())
|
||||
return
|
||||
if(!user.mind.changeling.chosen_sting)
|
||||
@@ -57,7 +57,7 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
/datum/action/changeling/sting/sting_feedback(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/sting_feedback(mob/user, mob/target)
|
||||
if(!target)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>We stealthily sting [target.name].</span>")
|
||||
@@ -91,7 +91,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/action/changeling/sting/transformation/can_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/transformation/can_sting(mob/user, mob/target)
|
||||
if(!..())
|
||||
return
|
||||
if(HAS_TRAIT(target, TRAIT_HUSK) || (!ishuman(target)))
|
||||
@@ -104,7 +104,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/changeling/sting/transformation/sting_action(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/transformation/sting_action(mob/user, mob/target)
|
||||
add_attack_logs(user, target, "Transformation sting (changeling) (new identity is [selected_dna.real_name])")
|
||||
if(issmall(target))
|
||||
to_chat(user, "<span class='notice'>Our genes cry out as we sting [target.name]!</span>")
|
||||
@@ -129,11 +129,11 @@
|
||||
chemical_cost = 25
|
||||
dna_cost = 0
|
||||
|
||||
/datum/action/changeling/sting/extract_dna/can_sting(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/extract_dna/can_sting(mob/user, mob/target)
|
||||
if(..())
|
||||
return user.mind.changeling.can_absorb_dna(user, target)
|
||||
|
||||
/datum/action/changeling/sting/extract_dna/sting_action(var/mob/user, var/mob/living/carbon/human/target)
|
||||
/datum/action/changeling/sting/extract_dna/sting_action(mob/user, mob/living/carbon/human/target)
|
||||
add_attack_logs(user, target, "Extraction sting (changeling)")
|
||||
if(!(user.mind.changeling.has_dna(target.dna)))
|
||||
user.mind.changeling.absorb_dna(target, user)
|
||||
@@ -149,7 +149,7 @@
|
||||
chemical_cost = 20
|
||||
dna_cost = 2
|
||||
|
||||
/datum/action/changeling/sting/mute/sting_action(var/mob/user, var/mob/living/carbon/target)
|
||||
/datum/action/changeling/sting/mute/sting_action(mob/user, mob/living/carbon/target)
|
||||
add_attack_logs(user, target, "Mute sting (changeling)")
|
||||
target.AdjustSilence(30)
|
||||
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
|
||||
@@ -164,7 +164,7 @@
|
||||
chemical_cost = 25
|
||||
dna_cost = 1
|
||||
|
||||
/datum/action/changeling/sting/blind/sting_action(var/mob/living/user, var/mob/living/target)
|
||||
/datum/action/changeling/sting/blind/sting_action(mob/living/user, mob/living/target)
|
||||
add_attack_logs(user, target, "Blind sting (changeling)")
|
||||
to_chat(target, "<span class='danger'>Your eyes burn horrifically!</span>")
|
||||
target.become_nearsighted(EYE_DAMAGE)
|
||||
@@ -182,7 +182,7 @@
|
||||
chemical_cost = 10
|
||||
dna_cost = 1
|
||||
|
||||
/datum/action/changeling/sting/LSD/sting_action(var/mob/user, var/mob/living/carbon/target)
|
||||
/datum/action/changeling/sting/LSD/sting_action(mob/user, mob/living/carbon/target)
|
||||
add_attack_logs(user, target, "LSD sting (changeling)")
|
||||
spawn(rand(300,600))
|
||||
if(target)
|
||||
@@ -199,7 +199,7 @@
|
||||
chemical_cost = 15
|
||||
dna_cost = 2
|
||||
|
||||
/datum/action/changeling/sting/cryo/sting_action(var/mob/user, var/mob/target)
|
||||
/datum/action/changeling/sting/cryo/sting_action(mob/user, mob/target)
|
||||
add_attack_logs(user, target, "Cryo sting (changeling)")
|
||||
if(target.reagents)
|
||||
target.reagents.add_reagent("frostoil", 30)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
max_genetic_damage = 3
|
||||
|
||||
//Change our DNA to that of somebody we've absorbed.
|
||||
/datum/action/changeling/transform/sting_action(var/mob/living/carbon/human/user)
|
||||
/datum/action/changeling/transform/sting_action(mob/living/carbon/human/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/datum/dna/chosen_dna = changeling.select_dna("Select the target DNA: ", "Target DNA")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]"))
|
||||
return 1
|
||||
|
||||
/datum/changeling/proc/select_dna(var/prompt, var/title)
|
||||
/datum/changeling/proc/select_dna(prompt, title)
|
||||
var/list/names = list()
|
||||
for(var/datum/dna/DNA in (absorbed_dna+protected_dna))
|
||||
names += "[DNA.real_name]"
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/obj/effect/mob_spawn/human/demonic_friend
|
||||
name = "Essence of friendship"
|
||||
desc = "Oh boy! Oh boy! A friend!"
|
||||
mob_name = "Demonic friend"
|
||||
icon = 'icons/obj/cardboard_cutout.dmi'
|
||||
icon_state = "cutout_basic"
|
||||
outfit = /datum/outfit/demonic_friend
|
||||
death = FALSE
|
||||
roundstart = FALSE
|
||||
random = TRUE
|
||||
id_job = "SuperFriend"
|
||||
id_access = "assistant"
|
||||
var/obj/effect/proc_holder/spell/targeted/summon_friend/spell
|
||||
var/datum/mind/owner
|
||||
assignedrole = "SuperFriend"
|
||||
|
||||
/obj/effect/mob_spawn/human/demonic_friend/Initialize(mapload, datum/mind/owner_mind, obj/effect/proc_holder/spell/targeted/summon_friend/summoning_spell)
|
||||
. = ..()
|
||||
owner = owner_mind
|
||||
description = "Be someone's loyal friend/slave. If they die, you die as well." //best I could think of in the moment, not sure how this role plays in practise, have never seen it.
|
||||
flavour_text = "You have been given a reprieve from your eternity of torment, to be [owner.name]'s friend for [owner.p_their()] short mortal coil. Be aware that if you do not live up to [owner.name]'s expectations, [owner.p_they()] can send you back to hell with a single thought. [owner.name]'s death will also return you to hell."
|
||||
var/area/A = get_area(src)
|
||||
if(!mapload && A)
|
||||
notify_ghosts("\A friendship shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = TRUE)
|
||||
objectives = "Be [owner.name]'s friend, and keep [owner.name] alive, so you don't get sent back to hell."
|
||||
spell = summoning_spell
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/demonic_friend/special(mob/living/L)
|
||||
if(!QDELETED(owner.current) && owner.current.stat != DEAD)
|
||||
L.real_name = "[owner.name]'s best friend"
|
||||
L.name = L.real_name
|
||||
soullink(/datum/soullink/oneway/devilfriend, owner.current, L)
|
||||
spell.friend = L
|
||||
spell.charge_counter = spell.charge_max
|
||||
L.mind.hasSoul = FALSE
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/worn = H.wear_id
|
||||
var/obj/item/card/id/id = worn.GetID()
|
||||
id.registered_name = L.real_name
|
||||
id.update_label()
|
||||
to_chat(owner.current, "<span class='notice'>Your friend has arrived!</span>")
|
||||
else
|
||||
to_chat(L, "<span class='userdanger'>Your owner is already dead! You will soon perish.</span>")
|
||||
addtimer(CALLBACK(L, /mob.proc/dust), 150) //Give em a few seconds as a mercy.
|
||||
|
||||
/datum/outfit/demonic_friend
|
||||
name = "Demonic Friend"
|
||||
uniform = /obj/item/clothing/under/assistantformal
|
||||
shoes = /obj/item/clothing/shoes/laceup
|
||||
r_pocket = /obj/item/radio/off
|
||||
back = /obj/item/storage/backpack
|
||||
implants = list(/obj/item/implant/mindshield) //No revolutionaries, he's MY friend.
|
||||
id = /obj/item/card/id
|
||||
@@ -1,48 +0,0 @@
|
||||
GLOBAL_LIST_INIT(whiteness, list(
|
||||
/obj/item/clothing/under/color/white = 2,
|
||||
/obj/item/clothing/under/rank/bartender = 1,
|
||||
/obj/item/clothing/under/rank/chef = 1,
|
||||
/obj/item/clothing/under/rank/chief_engineer = 1,
|
||||
/obj/item/clothing/under/rank/scientist = 1,
|
||||
/obj/item/clothing/under/rank/chemist = 1,
|
||||
/obj/item/clothing/under/rank/chief_medical_officer = 1,
|
||||
/obj/item/clothing/under/rank/geneticist = 1,
|
||||
/obj/item/clothing/under/rank/virologist = 1,
|
||||
/obj/item/clothing/under/rank/nursesuit = 1,
|
||||
/obj/item/clothing/under/rank/medical = 1,
|
||||
/obj/item/clothing/under/rank/psych = 1,
|
||||
/obj/item/clothing/under/rank/orderly = 1,
|
||||
/obj/item/clothing/under/rank/security/brigphys = 1,
|
||||
/obj/item/clothing/under/rank/internalaffairs = 1,
|
||||
/obj/item/clothing/under/rank/ntrep = 1,
|
||||
/obj/item/clothing/under/det = 1,
|
||||
/obj/item/clothing/under/wedding/bride_white = 1,
|
||||
/obj/item/clothing/under/mafia/white = 1,
|
||||
/obj/item/clothing/under/noble_clothes = 1,
|
||||
/obj/item/clothing/under/sl_suit = 1,
|
||||
/obj/item/clothing/under/burial = 1
|
||||
))
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker)
|
||||
switch(mind.devilinfo.bane)
|
||||
if(BANE_WHITECLOTHES)
|
||||
if(istype(attacker, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = attacker
|
||||
if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(GLOB.whiteness[U.type])
|
||||
src.visible_message("<span class='warning'>[src] seems to have been harmed by the purity of [attacker]'s clothes.</span>", "<span class='notice'>Unsullied white clothing is disrupting your form.</span>")
|
||||
return GLOB.whiteness[U.type] + 1
|
||||
if(BANE_TOOLBOX)
|
||||
if(istype(weapon,/obj/item/storage/toolbox))
|
||||
src.visible_message("<span class='warning'>The [weapon] seems unusually robust this time.</span>", "<span class='notice'>The [weapon] is your unmaking!</span>")
|
||||
return 2.5 // Will take four hits with a normal toolbox.
|
||||
if(BANE_HARVEST)
|
||||
if(istype(weapon,/obj/item/reagent_containers/food/snacks/grown/) || istype(weapon,/obj/item/grown))
|
||||
src.visible_message("<span class='warning'>The spirits of the harvest aid in the exorcism.</span>", "<span class='notice'>The harvest spirits are harming you.</span>")
|
||||
src.Weaken(2)
|
||||
qdel(weapon)
|
||||
return 2
|
||||
return 1
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user