Hard upstream sync (#6951)
* maps - none of our changes included yet i'll get them in after i finish up the rest of the sync * sync part 1 - underscore folders in code * controllers folder * datums folder * game folder * cmon, work * modules - admin to awaymissions * cargo to events * fields to lighting * mapping > ruins * rest of the code folder * rest of the folders in the root directory * DME * fixes compiling errors. it compiles so it works * readds map changes * fixes dogborg module select * fixes typo in moduleselect_alternate_icon filepath
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
if (random_icon_states && length(random_icon_states) > 0)
|
||||
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
create_reagents(300)
|
||||
if(loc && isturf(loc))
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
/datum/proximity_monitor
|
||||
var/atom/host //the atom we are tracking
|
||||
var/atom/hasprox_reciever //the atom that will recieve HasProximity calls.
|
||||
var/atom/last_host_loc
|
||||
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
|
||||
var/current_range
|
||||
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
|
||||
var/datum/component/movement_tracker
|
||||
|
||||
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
|
||||
host = _host
|
||||
checkers = list()
|
||||
last_host_loc = _host.loc
|
||||
ignore_if_not_on_turf = _ignore_if_not_on_turf
|
||||
checkers = list()
|
||||
SetRange(range)
|
||||
current_range = range
|
||||
SetHost(_host)
|
||||
|
||||
/datum/proximity_monitor/proc/SetHost(atom/H,atom/R)
|
||||
if(R)
|
||||
hasprox_reciever = R
|
||||
else if(hasprox_reciever == host) //Default case
|
||||
hasprox_reciever = H
|
||||
host = H
|
||||
last_host_loc = host.loc
|
||||
if(movement_tracker)
|
||||
QDEL_NULL(movement_tracker)
|
||||
movement_tracker = host.AddComponent(/datum/component/redirect, COMSIG_MOVABLE_MOVED, CALLBACK(src, .proc/HandleMove))
|
||||
SetRange(current_range,TRUE)
|
||||
|
||||
/datum/proximity_monitor/Destroy()
|
||||
host = null
|
||||
last_host_loc = null
|
||||
hasprox_reciever = null
|
||||
QDEL_LIST(checkers)
|
||||
QDEL_NULL(movement_tracker)
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/proc/HandleMove()
|
||||
@@ -27,7 +43,7 @@
|
||||
SetRange(curr_range, TRUE)
|
||||
if(curr_range)
|
||||
testing("HasProx: [host] -> [host]")
|
||||
_host.HasProximity(host) //if we are processing, we're guaranteed to be a movable
|
||||
hasprox_reciever.HasProximity(host) //if we are processing, we're guaranteed to be a movable
|
||||
|
||||
/datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE)
|
||||
if(!force_rebuild && range == current_range)
|
||||
@@ -93,4 +109,4 @@
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
monitor.host.HasProximity(AM)
|
||||
monitor.hasprox_reciever.HasProximity(AM)
|
||||
|
||||
+153
-136
@@ -3,11 +3,14 @@ CONTAINS:
|
||||
RPD
|
||||
*/
|
||||
|
||||
#define PAINT_MODE -2
|
||||
#define EATING_MODE -1
|
||||
#define ATMOS_MODE 0
|
||||
#define DISPOSALS_MODE 1
|
||||
#define TRANSIT_MODE 2
|
||||
#define ATMOS_CATEGORY 0
|
||||
#define DISPOSALS_CATEGORY 1
|
||||
#define TRANSIT_CATEGORY 2
|
||||
|
||||
#define BUILD_MODE 1
|
||||
#define WRENCH_MODE 2
|
||||
#define DESTROY_MODE 4
|
||||
#define PAINT_MODE 8
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
|
||||
@@ -69,7 +72,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
/datum/pipe_info
|
||||
var/name
|
||||
var/icon_state
|
||||
@@ -186,17 +188,21 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/working = 0
|
||||
var/mode = ATMOS_MODE
|
||||
var/p_dir = NORTH
|
||||
var/p_flipped = FALSE
|
||||
var/paint_color="Grey"
|
||||
var/screen = ATMOS_MODE //Starts on the atmos tab.
|
||||
var/paint_color = "grey"
|
||||
var/atmos_build_speed = 5 //deciseconds (500ms)
|
||||
var/disposal_build_speed = 5
|
||||
var/transit_build_speed = 5
|
||||
var/destroy_speed = 5
|
||||
var/paint_speed = 5
|
||||
var/category = ATMOS_CATEGORY
|
||||
var/piping_layer = PIPING_LAYER_DEFAULT
|
||||
var/datum/pipe_info/recipe
|
||||
var/static/datum/pipe_info/first_atmos
|
||||
var/static/datum/pipe_info/first_disposal
|
||||
var/static/datum/pipe_info/first_transit
|
||||
var/autowrench = FALSE
|
||||
var/mode = BUILD_MODE | PAINT_MODE | DESTROY_MODE | WRENCH_MODE
|
||||
|
||||
/obj/item/pipe_dispenser/New()
|
||||
. = ..()
|
||||
@@ -238,21 +244,22 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
|
||||
/obj/item/pipe_dispenser/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"mode" = mode,
|
||||
"screen" = screen,
|
||||
"category" = category,
|
||||
"piping_layer" = piping_layer,
|
||||
"preview_rows" = recipe.get_preview(p_dir),
|
||||
"categories" = list(),
|
||||
"paint_colors" = list()
|
||||
"selected_color" = paint_color,
|
||||
"paint_colors" = GLOB.pipe_paint_colors,
|
||||
"mode" = mode
|
||||
)
|
||||
|
||||
var/list/recipes
|
||||
switch(screen)
|
||||
if(ATMOS_MODE)
|
||||
switch(category)
|
||||
if(ATMOS_CATEGORY)
|
||||
recipes = GLOB.atmos_pipe_recipes
|
||||
if(DISPOSALS_MODE)
|
||||
if(DISPOSALS_CATEGORY)
|
||||
recipes = GLOB.disposal_pipe_recipes
|
||||
if(TRANSIT_MODE)
|
||||
if(TRANSIT_CATEGORY)
|
||||
recipes = GLOB.transit_tube_recipes
|
||||
for(var/c in recipes)
|
||||
var/list/cat = recipes[c]
|
||||
@@ -262,10 +269,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe)))
|
||||
data["categories"] += list(list("cat_name" = c, "recipes" = r))
|
||||
|
||||
data["paint_colors"] = list()
|
||||
for(var/c in GLOB.pipe_paint_colors)
|
||||
data["paint_colors"] += list(list("color_name" = c, "color_hex" = GLOB.pipe_paint_colors[c], "selected" = (c == paint_color)))
|
||||
|
||||
return data
|
||||
|
||||
/obj/item/pipe_dispenser/ui_act(action, params)
|
||||
@@ -277,18 +280,14 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
switch(action)
|
||||
if("color")
|
||||
paint_color = params["paint_color"]
|
||||
if("mode")
|
||||
mode = text2num(params["mode"])
|
||||
if("screen")
|
||||
if(mode == screen)
|
||||
mode = text2num(params["screen"])
|
||||
screen = text2num(params["screen"])
|
||||
switch(screen)
|
||||
if(DISPOSALS_MODE)
|
||||
if("category")
|
||||
category = text2num(params["category"])
|
||||
switch(category)
|
||||
if(DISPOSALS_CATEGORY)
|
||||
recipe = first_disposal
|
||||
if(ATMOS_MODE)
|
||||
if(ATMOS_CATEGORY)
|
||||
recipe = first_atmos
|
||||
if(TRANSIT_MODE)
|
||||
if(TRANSIT_CATEGORY)
|
||||
recipe = first_transit
|
||||
p_dir = NORTH
|
||||
playeffect = FALSE
|
||||
@@ -305,6 +304,15 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
p_dir = text2dir(params["dir"])
|
||||
p_flipped = text2num(params["flipped"])
|
||||
playeffect = FALSE
|
||||
if("mode")
|
||||
var/n = text2num(params["mode"])
|
||||
if(n == 2 && !(mode&1) && !(mode&2))
|
||||
mode |= 3
|
||||
else if(mode&n)
|
||||
mode &= ~n
|
||||
else
|
||||
mode |= n
|
||||
|
||||
if(playeffect)
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -314,135 +322,144 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
return ..()
|
||||
|
||||
//So that changing the menu settings doesn't affect the pipes already being built.
|
||||
var/temp_piping_layer = piping_layer
|
||||
var/queued_p_type = recipe.id
|
||||
var/queued_p_dir = p_dir
|
||||
var/queued_p_flipped = p_flipped
|
||||
|
||||
// clicking on an existing component puts the new one on the same layer
|
||||
if (mode == ATMOS_MODE && istype(A, /obj/machinery/atmospherics))
|
||||
var/obj/machinery/atmospherics/AM = A
|
||||
temp_piping_layer = AM.piping_layer
|
||||
A = get_turf(user)
|
||||
|
||||
//make sure what we're clicking is valid for the current mode
|
||||
//make sure what we're clicking is valid for the current category
|
||||
var/static/list/make_pipe_whitelist
|
||||
if(!make_pipe_whitelist)
|
||||
make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe))
|
||||
var/can_make_pipe = (isturf(A) || is_type_in_typecache(A, make_pipe_whitelist))
|
||||
|
||||
. = FALSE
|
||||
switch(mode) //if we've gotten this var, the target is valid
|
||||
if(PAINT_MODE) //Paint pipes
|
||||
if(!istype(A, /obj/machinery/atmospherics/pipe))
|
||||
return ..()
|
||||
|
||||
if((mode&DESTROY_MODE) && istype(A, /obj/item/pipe) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod) || istype(A, /obj/item/pipe_meter))
|
||||
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, destroy_speed, target = A))
|
||||
activate()
|
||||
qdel(A)
|
||||
return
|
||||
|
||||
if((mode&PAINT_MODE))
|
||||
if(istype(A, /obj/machinery/atmospherics/pipe) && !istype(A, /obj/machinery/atmospherics/pipe/layer_manifold))
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
to_chat(user, "<span class='notice'>You start painting \the [P] [paint_color]...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
P.paint(GLOB.pipe_paint_colors[paint_color])
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
|
||||
if(do_after(user, paint_speed, target = A))
|
||||
P.paint(GLOB.pipe_paint_colors[paint_color]) //paint the pipe
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
|
||||
return
|
||||
var/obj/item/pipe/P = A
|
||||
if(istype(P) && findtext("[P.pipe_type]", "/obj/machinery/atmospherics/pipe") && !findtext("[P.pipe_type]", "layer_manifold"))
|
||||
to_chat(user, "<span class='notice'>You start painting \the [A] [paint_color]...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, paint_speed, target = A))
|
||||
A.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY) //paint the pipe
|
||||
user.visible_message("<span class='notice'>[user] paints \the [A] [paint_color].</span>","<span class='notice'>You paint \the [A] [paint_color].</span>")
|
||||
return
|
||||
|
||||
if(EATING_MODE) //Eating pipes
|
||||
if(!(istype(A, /obj/item/pipe) || istype(A, /obj/item/pipe_meter) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod)))
|
||||
return ..()
|
||||
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
qdel(A)
|
||||
if(mode&BUILD_MODE)
|
||||
switch(category) //if we've gotten this var, the target is valid
|
||||
if(ATMOS_CATEGORY) //Making pipes
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if (recipe.type == /datum/pipe_info/meter)
|
||||
to_chat(user, "<span class='notice'>You start building a meter...</span>")
|
||||
if(do_after(user, atmos_build_speed, target = A))
|
||||
activate()
|
||||
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
|
||||
PM.setAttachLayer(piping_layer)
|
||||
if(mode&WRENCH_MODE)
|
||||
PM.wrench_act(user, src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start building a pipe...</span>")
|
||||
if(do_after(user, atmos_build_speed, target = A))
|
||||
activate()
|
||||
var/obj/machinery/atmospherics/path = queued_p_type
|
||||
var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
|
||||
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
|
||||
|
||||
if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
|
||||
var/obj/item/pipe/trinary/flippable/F = P
|
||||
F.flipped = queued_p_flipped
|
||||
|
||||
P.update()
|
||||
P.add_fingerprint(usr)
|
||||
P.setPipingLayer(piping_layer)
|
||||
if(findtext("[queued_p_type]", "/obj/machinery/atmospherics/pipe") && !findtext("[queued_p_type]", "layer_manifold"))
|
||||
P.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
|
||||
if(mode&WRENCH_MODE)
|
||||
P.wrench_act(user, src)
|
||||
|
||||
if(DISPOSALS_CATEGORY) //Making disposals pipes
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
A = get_turf(A)
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, disposal_build_speed, target = A))
|
||||
var/obj/structure/disposalconstruct/C = new (A, queued_p_type, queued_p_dir, queued_p_flipped)
|
||||
|
||||
if(!C.can_place())
|
||||
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
|
||||
qdel(C)
|
||||
return
|
||||
|
||||
if(ATMOS_MODE) //Making pipes
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if (recipe.type == /datum/pipe_info/meter)
|
||||
to_chat(user, "<span class='notice'>You start building a meter...</span>")
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
|
||||
PM.setAttachLayer(temp_piping_layer)
|
||||
if(autowrench)
|
||||
PM.wrench_act(user, src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start building a pipe...</span>")
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
var/obj/machinery/atmospherics/path = queued_p_type
|
||||
var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
|
||||
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
|
||||
|
||||
if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
|
||||
var/obj/item/pipe/trinary/flippable/F = P
|
||||
F.flipped = queued_p_flipped
|
||||
|
||||
P.update()
|
||||
P.add_fingerprint(usr)
|
||||
P.setPipingLayer(temp_piping_layer)
|
||||
P.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
|
||||
if(autowrench)
|
||||
P.wrench_act(user, src)
|
||||
|
||||
if(DISPOSALS_MODE) //Making disposals pipes
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
A = get_turf(A)
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 4, target = A))
|
||||
var/obj/structure/disposalconstruct/C = new (A, queued_p_type, queued_p_dir, queued_p_flipped)
|
||||
|
||||
if(!C.can_place())
|
||||
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
|
||||
qdel(C)
|
||||
C.add_fingerprint(usr)
|
||||
C.update_icon()
|
||||
if(mode&WRENCH_MODE)
|
||||
C.wrench_act(user, src)
|
||||
return
|
||||
|
||||
activate()
|
||||
if(TRANSIT_CATEGORY) //Making transit tubes
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
A = get_turf(A)
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a transit tube...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, transit_build_speed, target = A))
|
||||
activate()
|
||||
if(queued_p_type == /obj/structure/c_transit_tube_pod)
|
||||
var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(A)
|
||||
pod.add_fingerprint(usr)
|
||||
if(mode&WRENCH_MODE)
|
||||
pod.wrench_act(user, src)
|
||||
|
||||
C.add_fingerprint(usr)
|
||||
C.update_icon()
|
||||
return
|
||||
else
|
||||
var/obj/structure/c_transit_tube/tube = new queued_p_type(A)
|
||||
tube.dir = queued_p_dir
|
||||
|
||||
if(TRANSIT_MODE) //Making transit tubes
|
||||
if(!can_make_pipe)
|
||||
if(queued_p_flipped)
|
||||
tube.dir = turn(queued_p_dir, 45)
|
||||
tube.simple_rotate_flip()
|
||||
|
||||
tube.add_fingerprint(usr)
|
||||
if(mode&WRENCH_MODE)
|
||||
tube.wrench_act(user, src)
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
A = get_turf(A)
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a transit tube...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 4, target = A))
|
||||
activate()
|
||||
if(queued_p_type == /obj/structure/c_transit_tube_pod)
|
||||
var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(A)
|
||||
pod.add_fingerprint(usr)
|
||||
else
|
||||
var/obj/structure/c_transit_tube/tube = new queued_p_type(A)
|
||||
tube.dir = queued_p_dir
|
||||
|
||||
if(queued_p_flipped)
|
||||
tube.dir = turn(queued_p_dir, 45)
|
||||
tube.simple_rotate_flip()
|
||||
|
||||
tube.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/pipe_dispenser/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
autowrench = !autowrench
|
||||
to_chat(user, "<span class='notice'>You [autowrench ? "enable" : "disable"] auto wrenching.</span>")
|
||||
|
||||
/obj/item/pipe_dispenser/proc/activate()
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
#undef ATMOS_CATEGORY
|
||||
#undef DISPOSALS_CATEGORY
|
||||
#undef TRANSIT_CATEGORY
|
||||
|
||||
#undef BUILD_MODE
|
||||
#undef DESTROY_MODE
|
||||
#undef PAINT_MODE
|
||||
#undef EATING_MODE
|
||||
#undef ATMOS_MODE
|
||||
#undef DISPOSALS_MODE
|
||||
#undef WRENCH_MODE
|
||||
|
||||
@@ -159,7 +159,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
|
||||
if(lit)
|
||||
return
|
||||
if(!initialized)
|
||||
if(!(flags_1 & INITIALIZED_1))
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
return
|
||||
@@ -315,7 +315,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
src.pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie/nicotine
|
||||
list_reagents = list("nicotine" = 15)
|
||||
list_reagents = list("nicotine" = 15)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie/trippy
|
||||
list_reagents = list("nicotine" = 15, "mushroomhallucinogen" = 35)
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
name = "Power Monitor (Computer Board)" //name fixed 250810
|
||||
build_path = /obj/machinery/computer/monitor
|
||||
|
||||
/obj/item/circuitboard/computer/powermonitor/secret
|
||||
name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's.
|
||||
build_path = /obj/machinery/computer/monitor/secret
|
||||
|
||||
/obj/item/circuitboard/computer/olddoor
|
||||
name = "DoorMex (Computer Board)"
|
||||
build_path = /obj/machinery/computer/pod/old
|
||||
@@ -228,6 +232,10 @@
|
||||
name = "Supply Request Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/cargo/request
|
||||
|
||||
/obj/item/circuitboard/computer/bounty
|
||||
name = "Nanotrasen Bounty Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/cargo/request
|
||||
|
||||
/obj/item/circuitboard/computer/operating
|
||||
name = "Operating Computer (Computer Board)"
|
||||
build_path = /obj/machinery/computer/operating
|
||||
|
||||
@@ -7,6 +7,15 @@
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/vr_sleeper
|
||||
name = "VR Sleeper (Machine Board)"
|
||||
build_path = /obj/machinery/vr_sleeper
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stack/sheet/glass = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/announcement_system
|
||||
name = "Announcement System (Machine Board)"
|
||||
build_path = /obj/machinery/announcement_system
|
||||
@@ -216,6 +225,23 @@
|
||||
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
|
||||
/obj/machinery/vending/games = "\improper Good Clean Fun",
|
||||
/obj/machinery/vending/autodrobe = "AutoDrobe",
|
||||
/obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe",
|
||||
/obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe",
|
||||
/obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe",
|
||||
/obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe",
|
||||
/obj/machinery/vending/wardrobe/cargo_wardrobe = "CargoDrobe",
|
||||
/obj/machinery/vending/wardrobe/robo_wardrobe = "RoboDrobe",
|
||||
/obj/machinery/vending/wardrobe/science_wardrobe = "SciDrobe",
|
||||
/obj/machinery/vending/wardrobe/hydro_wardrobe = "HyDrobe",
|
||||
/obj/machinery/vending/wardrobe/curator_wardrobe = "CuraDrobe",
|
||||
/obj/machinery/vending/wardrobe/bar_wardrobe = "BarDrobe",
|
||||
/obj/machinery/vending/wardrobe/chef_wardrobe = "ChefDrobe",
|
||||
/obj/machinery/vending/wardrobe/jani_wardrobe = "JaniDrobe",
|
||||
/obj/machinery/vending/wardrobe/law_wardrobe = "LawDrobe",
|
||||
/obj/machinery/vending/wardrobe/chap_wardrobe = "ChapDrobe",
|
||||
/obj/machinery/vending/wardrobe/chem_wardrobe = "ChemDrobe",
|
||||
/obj/machinery/vending/wardrobe/gene_wardrobe = "GeneDrobe",
|
||||
/obj/machinery/vending/wardrobe/viro_wardrobe = "ViroDrobe",
|
||||
/obj/machinery/vending/clothing = "ClothesMate",
|
||||
/obj/machinery/vending/medical = "NanoMed Plus",
|
||||
/obj/machinery/vending/wallmed = "NanoMed")
|
||||
|
||||
@@ -144,8 +144,11 @@
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
|
||||
/obj/item/defibrillator/emp_act(severity)
|
||||
if(cell)
|
||||
. = ..()
|
||||
if(cell && !(. & EMP_PROTECT_CONTENTS))
|
||||
deductcharge(1000 / severity)
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(safety)
|
||||
safety = FALSE
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
|
||||
@@ -155,7 +158,6 @@
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
|
||||
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/defibrillator/proc/toggle_paddles()
|
||||
set name = "Toggle Paddles"
|
||||
|
||||
@@ -661,7 +661,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(user, "<span class='info'>Message sent to [target_text]: \"[message]\"</span>")
|
||||
// Reset the photo
|
||||
photo = null
|
||||
last_text = world.time
|
||||
last_text = world.time
|
||||
if (everyone)
|
||||
last_everyone = world.time
|
||||
|
||||
@@ -979,11 +979,14 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
|
||||
/obj/item/pda/emp_act(severity)
|
||||
for(var/atom/A in src)
|
||||
A.emp_act(severity)
|
||||
emped += 1
|
||||
spawn(200 * severity)
|
||||
emped -= 1
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_CONTENTS))
|
||||
for(var/atom/A in src)
|
||||
A.emp_act(severity)
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
emped += 1
|
||||
spawn(200 * severity)
|
||||
emped -= 1
|
||||
|
||||
/proc/get_viewable_pdas()
|
||||
. = list()
|
||||
|
||||
@@ -260,10 +260,16 @@ Code:
|
||||
|
||||
|
||||
|
||||
var/turf/pda_turf = get_turf(src)
|
||||
for(var/obj/machinery/computer/monitor/pMon in GLOB.machines)
|
||||
if(!(pMon.stat & (NOPOWER | BROKEN)) )
|
||||
powercount++
|
||||
powermonitors += pMon
|
||||
if(pMon.stat & (NOPOWER | BROKEN)) //check to make sure the computer is functional
|
||||
continue
|
||||
if(pda_turf.z != pMon.z) //and that we're on the same zlevel as the computer (lore: limited signal strength)
|
||||
continue
|
||||
if(pMon.is_secret_monitor) //make sure it isn't a secret one (ie located on a ruin), allowing people to metagame that the location exists
|
||||
continue
|
||||
powercount++
|
||||
powermonitors += pMon
|
||||
|
||||
|
||||
if(!powercount)
|
||||
@@ -274,22 +280,23 @@ Code:
|
||||
var/count = 0
|
||||
for(var/obj/machinery/computer/monitor/pMon in powermonitors)
|
||||
count++
|
||||
menu += "<a href='byond://?src=[REF(src)];choice=Power Select;target=[count]'>[pMon] </a><BR>"
|
||||
menu += "<a href='byond://?src=[REF(src)];choice=Power Select;target=[count]'>[pMon] - [get_area_name(pMon, TRUE)] </a><BR>"
|
||||
|
||||
menu += "</FONT>"
|
||||
|
||||
if (433)
|
||||
menu = "<h4>[PDAIMG(power)] Power Monitor </h4><BR>"
|
||||
if(!powmonitor)
|
||||
if(!powmonitor || !powmonitor.get_powernet())
|
||||
menu += "<span class='danger'>No connection<BR></span>"
|
||||
else
|
||||
var/list/L = list()
|
||||
for(var/obj/machinery/power/terminal/term in powmonitor.attached.powernet.nodes)
|
||||
var/datum/powernet/connected_powernet = powmonitor.get_powernet()
|
||||
for(var/obj/machinery/power/terminal/term in connected_powernet.nodes)
|
||||
if(istype(term.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = term.master
|
||||
L += A
|
||||
|
||||
menu += "<PRE>Total power: [DisplayPower(powmonitor.attached.powernet.viewavail)]<BR>Total load: [DisplayPower(powmonitor.attached.powernet.viewload)]<BR>"
|
||||
menu += "<PRE>Location: [get_area_name(powmonitor, TRUE)]<BR>Total power: [DisplayPower(connected_powernet.viewavail)]<BR>Total load: [DisplayPower(connected_powernet.viewload)]<BR>"
|
||||
|
||||
menu += "<FONT SIZE=-1>"
|
||||
|
||||
|
||||
@@ -202,6 +202,8 @@
|
||||
var/list/cameras = flatten_list(bugged_cameras)
|
||||
var/obj/machinery/camera/C = locate(href_list["monitor"]) in cameras
|
||||
if(C && istype(C))
|
||||
if(!same_z_level(C))
|
||||
return
|
||||
track_mode = BUGMODE_MONITOR
|
||||
current = C
|
||||
usr.reset_perspective(null)
|
||||
@@ -221,6 +223,8 @@
|
||||
var/list/cameras = flatten_list(bugged_cameras)
|
||||
var/obj/machinery/camera/C = locate(href_list["emp"]) in cameras
|
||||
if(C && istype(C) && C.bug == src)
|
||||
if(!same_z_level(C))
|
||||
return
|
||||
C.emp_act(EMP_HEAVY)
|
||||
C.bug = null
|
||||
bugged_cameras -= C.c_tag
|
||||
@@ -235,13 +239,11 @@
|
||||
var/list/cameras = flatten_list(bugged_cameras)
|
||||
var/obj/machinery/camera/C = locate(href_list["view"]) in cameras
|
||||
if(C && istype(C))
|
||||
if(!same_z_level(C))
|
||||
return
|
||||
if(!C.can_use())
|
||||
to_chat(usr, "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>")
|
||||
return
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!T || C.z != T.z)
|
||||
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
|
||||
return
|
||||
current = C
|
||||
spawn(6)
|
||||
if(src.check_eye(usr))
|
||||
@@ -293,6 +295,12 @@
|
||||
break
|
||||
src.updateSelfDialog()
|
||||
|
||||
/obj/item/camera_bug/proc/same_z_level(var/obj/machinery/camera/C)
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!T || C.z != T.z)
|
||||
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
#undef BUGMODE_LIST
|
||||
#undef BUGMODE_MONITOR
|
||||
|
||||
@@ -29,6 +29,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
return ..()
|
||||
|
||||
/obj/item/gps/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
emped = TRUE
|
||||
cut_overlay("working")
|
||||
add_overlay("emp")
|
||||
|
||||
@@ -156,7 +156,8 @@
|
||||
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
|
||||
/obj/item/paicard/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(pai)
|
||||
pai.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
desc = "A basic handheld radio that communicates with local telecommunication networks."
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
flags_1 = CONDUCT_1 | HEAR_1 | NO_EMP_WIRES_1
|
||||
flags_1 = CONDUCT_1 | HEAR_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
@@ -95,6 +95,10 @@
|
||||
for(var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
/obj/item/radio/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/item/radio/interact(mob/user)
|
||||
if (..())
|
||||
return
|
||||
@@ -339,6 +343,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
emped++ //There's been an EMP; better count it
|
||||
var/curremp = emped //Remember which EMP this was
|
||||
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
|
||||
@@ -353,7 +360,6 @@
|
||||
emped = 0
|
||||
if (!istype(src, /obj/item/radio/intercom)) // intercoms will turn back on on their own
|
||||
on = TRUE
|
||||
..()
|
||||
|
||||
///////////////////////////////
|
||||
//////////Borg Radios//////////
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/item/transfer_valve
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
name = "tank transfer valve"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "valve_1"
|
||||
item_state = "ttv"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
spellname = "knock"
|
||||
icon_state ="bookknock"
|
||||
desc = "This book is hard to hold closed properly."
|
||||
remarks = list("Open Sesame!", "So THAT'S the magic password!", "Slow down, book. I still haven't finished this page...", "The book won't stop moving!", "I think this is hurting the spine of the book...", "I can't get to the next page, it's stuck t I'm good, it just turned to the next page on it's own.", "Yeah, staff of doors does the same thing. Go figure...")
|
||||
remarks = list("Open Sesame!", "So THAT'S the magic password!", "Slow down, book. I still haven't finished this page...", "The book won't stop moving!", "I think this is hurting the spine of the book...", "I can't get to the next page, it's stuck t- I'm good, it just turned to the next page on it's own.", "Yeah, staff of doors does the same thing. Go figure...")
|
||||
|
||||
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
|
||||
..()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "plastic-explosive"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
|
||||
flags_1 = NOBLUDGEON_1 | NO_EMP_WIRES_1
|
||||
flags_1 = NOBLUDGEON_1
|
||||
det_time = 10
|
||||
display_timer = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
@@ -19,9 +19,13 @@
|
||||
var/can_attach_mob = FALSE
|
||||
var/full_damage_on_mobs = FALSE
|
||||
|
||||
/obj/item/grenade/plastic/New()
|
||||
/obj/item/grenade/plastic/Initialize()
|
||||
. = ..()
|
||||
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/plastic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/item/grenade/plastic/Destroy()
|
||||
qdel(nadeassembly)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
C.flash_act()
|
||||
|
||||
// Spawn some hostile syndicate critters and spread them out
|
||||
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=admin_spawned)
|
||||
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=((flags_1 & ADMIN_SPAWNED_1) ? TRUE : FALSE))
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,3 +1,172 @@
|
||||
// CHAPLAIN CUSTOM ARMORS //
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain
|
||||
name = "crusader helmet"
|
||||
desc = "Deus Vult."
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
armor = list("melee" = 41, "bullet" = 15, "laser" = 5,"energy" = 5, "bomb" = 5, "bio" = 2, "rad" = 0, "fire" = 0, "acid" = 50)
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
strip_delay = 80
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain
|
||||
name = "crusader armour"
|
||||
desc = "God wills it!"
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
|
||||
/obj/item/holybeacon
|
||||
name = "armaments beacon"
|
||||
desc = "Contains a set of armaments for the chaplain."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-red"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/holybeacon/attack_self(mob/user)
|
||||
if(user.mind && (user.mind.isholy) && !SSreligion.holy_armor_type)
|
||||
beacon_armor(user)
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
|
||||
/obj/item/holybeacon/proc/beacon_armor(mob/M)
|
||||
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_armor_list)
|
||||
var/atom/A = V
|
||||
display_names += list(initial(A.name) = A)
|
||||
|
||||
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || SSreligion.holy_armor_type)
|
||||
return
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_armor_list[index]
|
||||
|
||||
SSreligion.holy_armor_type = A
|
||||
var/holy_armor_box = new A
|
||||
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
|
||||
if(holy_armor_box)
|
||||
qdel(src)
|
||||
M.put_in_active_hand(holy_armor_box)///YOU COMPILED
|
||||
|
||||
/obj/item/storage/box/holy
|
||||
name = "Templar Kit"
|
||||
|
||||
/obj/item/storage/box/holy/PopulateContents()
|
||||
new /obj/item/clothing/head/helmet/chaplain(src)
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain(src)
|
||||
|
||||
/obj/item/storage/box/holy/student
|
||||
name = "Profane Scholar Kit"
|
||||
|
||||
/obj/item/storage/box/holy/student/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/studentuni(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/cage(src)
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/studentuni
|
||||
name = "student robe"
|
||||
desc = "The uniform of a bygone institute of learning."
|
||||
icon_state = "studentuni"
|
||||
item_state = "studentuni"
|
||||
body_parts_covered = ARMS|CHEST
|
||||
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/cage
|
||||
name = "cage"
|
||||
desc = "A cage that restrains the will of the self, allowing one to see the profane world for what it is."
|
||||
alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
|
||||
icon_state = "cage"
|
||||
item_state = "cage"
|
||||
worn_x_dimension = 64
|
||||
worn_y_dimension = 64
|
||||
dynamic_hair_suffix = ""
|
||||
|
||||
/obj/item/storage/box/holy/sentinel
|
||||
name = "Stone Sentinel Kit"
|
||||
|
||||
/obj/item/storage/box/holy/sentinel/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/ancient(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/ancient(src)
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/ancient
|
||||
name = "ancient helmet"
|
||||
desc = "None may pass!"
|
||||
icon_state = "knight_ancient"
|
||||
item_state = "knight_ancient"
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/ancient
|
||||
name = "ancient armour"
|
||||
desc = "Defend the treasure..."
|
||||
icon_state = "knight_ancient"
|
||||
item_state = "knight_ancient"
|
||||
|
||||
/obj/item/storage/box/holy/witchhunter
|
||||
name = "Witchhunter Kit"
|
||||
|
||||
/obj/item/storage/box/holy/witchhunter/PopulateContents()
|
||||
new /obj/item/clothing/suit/armor/riot/chaplain/witchhunter(src)
|
||||
new /obj/item/clothing/head/helmet/chaplain/witchunter_hat(src)
|
||||
|
||||
/obj/item/clothing/suit/armor/riot/chaplain/witchhunter
|
||||
name = "witchunter garb"
|
||||
desc = "This worn outfit saw much use back in the day."
|
||||
icon_state = "witchhunter"
|
||||
item_state = "witchhunter"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
|
||||
|
||||
/obj/item/clothing/head/helmet/chaplain/witchunter_hat
|
||||
name = "witchunter hat"
|
||||
desc = "This hat saw much use back in the day."
|
||||
icon_state = "witchhunterhat"
|
||||
item_state = "witchhunterhat"
|
||||
flags_cover = HEADCOVERSEYES
|
||||
|
||||
/obj/item/storage/box/holy/follower
|
||||
name = "Followers of the Chaplain Kit"
|
||||
|
||||
/obj/item/storage/box/holy/follower/PopulateContents()
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie/leader(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie
|
||||
name = "follower hoodie"
|
||||
desc = "Hoodie made for acolytes of the chaplain."
|
||||
icon_state = "chaplain_hoodie"
|
||||
item_state = "chaplain_hoodie"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
|
||||
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood
|
||||
|
||||
/obj/item/clothing/head/hooded/chaplain_hood
|
||||
name = "follower hood"
|
||||
desc = "Hood made for acolytes of the chaplain."
|
||||
icon_state = "chaplain_hood"
|
||||
body_parts_covered = HEAD
|
||||
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie/leader
|
||||
name = "leader hoodie"
|
||||
desc = "Now you're ready for some 50 dollar bling water."
|
||||
icon_state = "chaplain_hoodie_leader"
|
||||
item_state = "chaplain_hoodie_leader"
|
||||
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood/leader
|
||||
|
||||
/obj/item/clothing/head/hooded/chaplain_hood/leader
|
||||
name = "leader hood"
|
||||
desc = "I mean, you don't /have/ to seek bling water. I just think you should."
|
||||
icon_state = "chaplain_hood_leader"
|
||||
|
||||
|
||||
// CHAPLAIN NULLROD AND CUSTOM WEAPONS //
|
||||
|
||||
/obj/item/nullrod
|
||||
name = "null rod"
|
||||
desc = "A rod of pure obsidian; its very presence disrupts and dampens the powers of Nar-Sie and Ratvar's followers."
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
return cell
|
||||
|
||||
/obj/item/inducer/emp_act(severity)
|
||||
..()
|
||||
if(cell)
|
||||
. = ..()
|
||||
if(cell && !(. & EMP_PROTECT_CONTENTS))
|
||||
cell.emp_act(severity)
|
||||
|
||||
/obj/item/inducer/attack_obj(obj/O, mob/living/carbon/user)
|
||||
@@ -181,5 +181,3 @@
|
||||
/obj/item/inducer/sci/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
/obj/item/harmalarm
|
||||
name = "\improper Sonic Harm Prevention Tool"
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
|
||||
@@ -339,10 +340,11 @@
|
||||
#define DISPENSE_LOLLIPOP_MODE 1
|
||||
#define THROW_LOLLIPOP_MODE 2
|
||||
#define THROW_GUMBALL_MODE 3
|
||||
#define DISPENSE_ICECREAM_MODE 4
|
||||
|
||||
/obj/item/borg/lollipop
|
||||
name = "lollipop fabricator"
|
||||
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
|
||||
name = "treat fabricator"
|
||||
desc = "Reward humans with various treats. Toggle in-module to switch between dispensing and high velocity ejection modes."
|
||||
icon_state = "lollipop"
|
||||
var/candy = 30
|
||||
var/candymax = 30
|
||||
@@ -378,7 +380,7 @@
|
||||
|
||||
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>No lollipops left in storage!</span>")
|
||||
to_chat(user, "<span class='warning'>No treats left in storage!</span>")
|
||||
return FALSE
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T || !istype(T) || !isopenturf(T))
|
||||
@@ -388,7 +390,15 @@
|
||||
if(O.density)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/lollipop/L = new(T)
|
||||
var/obj/item/reagent_containers/food/snacks/L
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE)
|
||||
L = new /obj/item/reagent_containers/food/snacks/lollipop(T)
|
||||
if(DISPENSE_ICECREAM_MODE)
|
||||
L = new /obj/item/reagent_containers/food/snacks/icecream(T)
|
||||
var/obj/item/reagent_containers/food/snacks/icecream/I = L
|
||||
I.add_ice_cream("vanilla")
|
||||
I.desc = "Eat the ice cream."
|
||||
|
||||
var/into_hands = FALSE
|
||||
if(ismob(A))
|
||||
@@ -399,9 +409,9 @@
|
||||
check_amount()
|
||||
|
||||
if(into_hands)
|
||||
user.visible_message("<span class='notice'>[user] dispenses a lollipop into the hands of [A].</span>", "<span class='notice'>You dispense a lollipop into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat into the hands of [A].</span>", "<span class='notice'>You dispense a treat into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] dispenses a lollipop.</span>", "<span class='notice'>You dispense a lollipop.</span>", "<span class='italics'>You hear a click.</span>")
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat.</span>", "<span class='notice'>You dispense a treat.</span>", "<span class='italics'>You hear a click.</span>")
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
@@ -447,7 +457,7 @@
|
||||
if(R.emagged)
|
||||
hitdamage = emaggedhitdamage
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE)
|
||||
if(DISPENSE_LOLLIPOP_MODE, DISPENSE_ICECREAM_MODE)
|
||||
if(!proximity)
|
||||
return FALSE
|
||||
dispense(target, user)
|
||||
@@ -466,6 +476,9 @@
|
||||
mode = THROW_GUMBALL_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
||||
if(THROW_GUMBALL_MODE)
|
||||
mode = DISPENSE_ICECREAM_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing ice cream.</span>")
|
||||
if(DISPENSE_ICECREAM_MODE)
|
||||
mode = DISPENSE_LOLLIPOP_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
||||
..()
|
||||
@@ -473,6 +486,7 @@
|
||||
#undef DISPENSE_LOLLIPOP_MODE
|
||||
#undef THROW_LOLLIPOP_MODE
|
||||
#undef THROW_GUMBALL_MODE
|
||||
#undef DISPENSE_ICECREAM_MODE
|
||||
|
||||
/obj/item/ammo_casing/caseless/gumball
|
||||
name = "Gumball"
|
||||
|
||||
@@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
@@ -607,4 +607,4 @@
|
||||
|
||||
/obj/item/storage/belt/sabre/PopulateContents()
|
||||
new /obj/item/melee/sabre(src)
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
@@ -178,8 +178,9 @@
|
||||
return 1
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
deductcharge(1000 / severity)
|
||||
..()
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
deductcharge(1000 / severity)
|
||||
|
||||
//Makeshift stun baton. Replacement for stun gloves.
|
||||
/obj/item/melee/baton/cattleprod
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS
|
||||
H.adjustStaminaLoss(-5) //CIT CHANGE - AND MAY HE NEVER SUCCUMB TO EXHAUSTION
|
||||
else
|
||||
if(!admin_spawned)
|
||||
if(!(flags_1 & ADMIN_SPAWNED_1))
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -222,12 +222,10 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
cut_overlay(GLOB.fire_overlay, TRUE)
|
||||
SSfire_burning.processing -= src
|
||||
|
||||
|
||||
|
||||
/obj/proc/tesla_act(var/power)
|
||||
/obj/proc/tesla_act(power, tesla_flags, shocked_targets)
|
||||
obj_flags |= BEING_SHOCKED
|
||||
var/power_bounced = power / 2
|
||||
tesla_zap(src, 3, power_bounced)
|
||||
tesla_zap(src, 3, power_bounced, tesla_flags, shocked_targets)
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
|
||||
//The surgeon general warns that being buckled to certain objects recieving powerful shocks is greatly hazardous to your health
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
icon_state = "weeds"
|
||||
max_integrity = 15
|
||||
canSmoothWith = list(/obj/structure/alien/weeds, /turf/closed/wall)
|
||||
|
||||
@@ -106,8 +106,11 @@
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emp_act(severity)
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
broken = 1
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
broken = 1
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -436,9 +436,13 @@
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(secure && !broken)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if (!(. & EMP_PROTECT_CONTENTS))
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(secure && !broken && !(. & EMP_PROTECT_SELF))
|
||||
if(prob(50 / severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
@@ -448,8 +452,6 @@
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
for(var/atom/A in contents)
|
||||
|
||||
@@ -107,35 +107,18 @@
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/PopulateContents()
|
||||
new /obj/item/holybeacon(src)
|
||||
new /obj/item/clothing/accessory/pocketprotector/cosmetology(src)
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/suit/nun(src)
|
||||
new /obj/item/clothing/head/nun_hood(src)
|
||||
new /obj/item/clothing/suit/studentuni(src)
|
||||
new /obj/item/clothing/head/cage(src)
|
||||
new /obj/item/clothing/suit/witchhunter(src)
|
||||
new /obj/item/clothing/head/witchunter_hat(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/holidaypriest(src)
|
||||
new /obj/item/storage/backpack/cultpack (src)
|
||||
new /obj/item/clothing/head/helmet/knight/templar(src)
|
||||
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
|
||||
new /obj/item/storage/backpack/cultpack(src)
|
||||
new /obj/item/storage/fancy/candle_box(src)
|
||||
new /obj/item/storage/fancy/candle_box(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
horizontal = TRUE
|
||||
delivery_icon = "deliverycrate"
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
material_drop_amount = 5
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_door = "red"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
|
||||
|
||||
#define POD_STANDARD 0
|
||||
#define POD_BLUESPACE 1
|
||||
|
||||
//------------------------------------SUPPLY POD-------------------------------------//
|
||||
/obj/structure/closet/supplypod
|
||||
@@ -52,11 +53,11 @@
|
||||
update_icon()
|
||||
playsound(src, open_sound, 15, 1, -3)
|
||||
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
|
||||
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
|
||||
|
||||
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
|
||||
do_sparks(5, TRUE, src)
|
||||
qdel(src)//no need for QDEL_IN if we already have a timer
|
||||
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
|
||||
|
||||
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
|
||||
do_sparks(5, TRUE, src)
|
||||
qdel(src)//no need for QDEL_IN if we already have a timer
|
||||
|
||||
/obj/structure/closet/supplypod/Destroy()//make some sparks b4 deletion
|
||||
QDEL_NULL(SupplyOrder)
|
||||
@@ -74,7 +75,7 @@
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
|
||||
if (podID == 1)
|
||||
if (podID == POD_BLUESPACE)
|
||||
icon_state = "bluespacepod_falling"
|
||||
name = "Bluespace Drop Pod"
|
||||
else
|
||||
@@ -92,15 +93,15 @@
|
||||
|
||||
/obj/effect/DPtarget/Initialize(mapload, datum/supply_order/SO, var/podID)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), 30)//wait 3 seconds
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), podID == POD_BLUESPACE ? 15 : 30)//standard pods take 3 seconds to come in, bluespace pods take 1.5
|
||||
|
||||
/obj/effect/DPtarget/proc/beginLaunch(datum/supply_order/SO, var/podID)
|
||||
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), podID)
|
||||
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
|
||||
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
|
||||
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
|
||||
|
||||
/obj/effect/DPtarget/proc/endLaunch(datum/supply_order/SO, var/podID)
|
||||
if (podID == 1)//podID 1 = bluespace supplypod, podID 0 = standard supplypod
|
||||
if (podID == POD_BLUESPACE)
|
||||
new /obj/structure/closet/supplypod/bluespacepod(drop_location(), SO)//pod is created
|
||||
explosion(src,0,0,2, flame_range = 1) //explosion and camshake (shoutout to @cyberboss)
|
||||
else
|
||||
|
||||
@@ -64,6 +64,15 @@
|
||||
manifest = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
material_drop_amount = 5
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "An internals crate."
|
||||
name = "internals crate"
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
tesla_zap(src, 3, C.powernet.avail * 0.01, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN | TESLA_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -178,3 +178,32 @@
|
||||
break // break if both our connections are filled
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/ladder/unbreakable/binary
|
||||
name = "mysterious ladder"
|
||||
desc = "Where does it go?"
|
||||
height = 0
|
||||
id = "lavaland_binary"
|
||||
var/area_to_place = /area/lavaland/surface/outdoors
|
||||
|
||||
/obj/structure/ladder/unbreakable/binary/Initialize()
|
||||
if(area_to_place)
|
||||
var/turf/T = safepick(get_area_turfs(area_to_place))
|
||||
if(T)
|
||||
var/obj/structure/ladder/unbreakable/U = new (T)
|
||||
U.id = id
|
||||
U.height = height+1
|
||||
for(var/turf/TT in range(2,U))
|
||||
TT.TerraformTurf(/turf/open/indestructible/binary, /turf/open/indestructible/binary)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/ladder/unbreakable/binary/space
|
||||
id = "space_binary"
|
||||
area_to_place = /area/space
|
||||
|
||||
|
||||
/obj/structure/ladder/unbreakable/binary/unlinked //Crew gets to complete one
|
||||
id = "unlinked_binary"
|
||||
area_to_place = null
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/opaque
|
||||
opacity = TRUE
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
@@ -103,4 +106,3 @@
|
||||
. = ..()
|
||||
if (oldloc)
|
||||
oldloc.air_update_turf(1)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
|
||||
|
||||
/obj/structure/reflector/setDir(new_dir)
|
||||
setAngle(dir_map_to_angle(new_dir))
|
||||
return ..(NORTH)
|
||||
|
||||
/obj/structure/reflector/proc/dir_map_to_angle(dir)
|
||||
@@ -196,11 +195,10 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/single/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, P.Angle)
|
||||
var/norm_inc = WRAP(incidence, -90, 90)
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
|
||||
if(abs(incidence) > 90 && abs(incidence) < 270)
|
||||
return FALSE
|
||||
var/new_angle = SIMPLIFY_DEGREES(rotation_angle + incidence)
|
||||
P.setAngle(new_angle)
|
||||
return ..()
|
||||
|
||||
@@ -223,11 +221,8 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/double/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, P.Angle)
|
||||
var/norm_inc = WRAP(incidence, -90, 90)
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
new_angle += 180
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
|
||||
var/new_angle = SIMPLIFY_DEGREES(rotation_angle + incidence)
|
||||
P.setAngle(new_angle)
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user