mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-31 00:59:16 +01:00
Merge branch 'master' into pol-moved
This commit is contained in:
@@ -160,18 +160,32 @@
|
||||
#define WEED_NODE_BASE "nodebase"
|
||||
|
||||
/obj/effect/alien/weeds
|
||||
name = "weeds"
|
||||
desc = "Weird purple weeds."
|
||||
name = "growth"
|
||||
desc = "Weird organic growth."
|
||||
icon_state = "weeds"
|
||||
|
||||
anchored = 1
|
||||
density = 0
|
||||
plane = TURF_PLANE
|
||||
layer = ABOVE_TURF_LAYER
|
||||
|
||||
var/health = 15
|
||||
var/obj/effect/alien/weeds/node/linked_node = null
|
||||
var/static/list/weedImageCache
|
||||
|
||||
/obj/effect/alien/weeds/Initialize(var/mapload, var/node, var/newcolor)
|
||||
. = ..()
|
||||
if(isspace(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
linked_node = node
|
||||
if(newcolor)
|
||||
color = newcolor
|
||||
|
||||
if(icon_state == "weeds")
|
||||
icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
|
||||
fullUpdateWeedOverlays()
|
||||
|
||||
/obj/effect/alien/weeds/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
// To not mess up the overlay updates.
|
||||
@@ -181,50 +195,43 @@
|
||||
W.updateWeedOverlays()
|
||||
|
||||
linked_node = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/alien/weeds/node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
name = "glowing growth"
|
||||
desc = "Weird glowing organic growth."
|
||||
layer = ABOVE_TURF_LAYER+0.01
|
||||
light_range = NODERANGE
|
||||
|
||||
var/node_range = NODERANGE
|
||||
var/set_color = "#321D37"
|
||||
|
||||
var/set_color = null
|
||||
/obj/effect/alien/weeds/node/Initialize(var/mapload, var/node, var/newcolor)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..(src.loc, src)
|
||||
for(var/obj/effect/alien/weeds/existing in loc)
|
||||
if(existing == src)
|
||||
continue
|
||||
else
|
||||
qdel(existing)
|
||||
|
||||
/obj/effect/alien/weeds/node/Initialize()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(newcolor)
|
||||
set_color = newcolor
|
||||
if(set_color)
|
||||
color = set_color
|
||||
|
||||
spawn(1 SECOND)
|
||||
if(color)
|
||||
set_color = color
|
||||
START_PROCESSING(SSobj, src) // Only the node processes in a subsystem, the rest are process()'d by the node
|
||||
|
||||
/obj/effect/alien/weeds/node/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/effect/alien/weeds/New(pos, node)
|
||||
..()
|
||||
if(istype(loc, /turf/space))
|
||||
qdel(src)
|
||||
return
|
||||
linked_node = node
|
||||
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
|
||||
fullUpdateWeedOverlays()
|
||||
return ..()
|
||||
|
||||
/obj/effect/alien/weeds/proc/updateWeedOverlays()
|
||||
cut_overlays()
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(!weedImageCache || !weedImageCache.len)
|
||||
if(!weedImageCache)
|
||||
weedImageCache = list()
|
||||
// weedImageCache.len = 4
|
||||
weedImageCache[WEED_NORTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
|
||||
weedImageCache[WEED_SOUTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
|
||||
weedImageCache[WEED_EAST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
|
||||
@@ -234,18 +241,14 @@
|
||||
var/turf/S = get_step(src, SOUTH)
|
||||
var/turf/E = get_step(src, EAST)
|
||||
var/turf/W = get_step(src, WEST)
|
||||
if(!locate(/obj/effect/alien) in N.contents)
|
||||
if(istype(N, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_SOUTH_EDGING]
|
||||
if(!locate(/obj/effect/alien) in S.contents)
|
||||
if(istype(S, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_NORTH_EDGING]
|
||||
if(!locate(/obj/effect/alien) in E.contents)
|
||||
if(istype(E, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_WEST_EDGING]
|
||||
if(!locate(/obj/effect/alien) in W.contents)
|
||||
if(istype(W, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_EAST_EDGING]
|
||||
if(istype(N, /turf/simulated/floor) && !locate(/obj/effect/alien) in N.contents)
|
||||
add_overlay(weedImageCache[WEED_SOUTH_EDGING])
|
||||
if(istype(S, /turf/simulated/floor) && !locate(/obj/effect/alien) in S.contents)
|
||||
add_overlay(weedImageCache[WEED_NORTH_EDGING])
|
||||
if(istype(E, /turf/simulated/floor) && !locate(/obj/effect/alien) in E.contents)
|
||||
add_overlay(weedImageCache[WEED_WEST_EDGING])
|
||||
if(istype(W, /turf/simulated/floor) && !locate(/obj/effect/alien) in W.contents)
|
||||
add_overlay(weedImageCache[WEED_EAST_EDGING])
|
||||
|
||||
/obj/effect/alien/weeds/proc/fullUpdateWeedOverlays()
|
||||
for (var/obj/effect/alien/weeds/W in range(1,src))
|
||||
@@ -253,70 +256,51 @@
|
||||
|
||||
return
|
||||
|
||||
// NB: This is not actually called by a processing subsystem, it's called by the node processing
|
||||
/obj/effect/alien/weeds/process()
|
||||
set background = 1
|
||||
var/turf/U = get_turf(src)
|
||||
/*
|
||||
if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
qdel(src)
|
||||
return
|
||||
Alien plants should do something if theres a lot of poison
|
||||
if(U.poison> 200000)
|
||||
health -= round(U.poison/200000)
|
||||
update()
|
||||
return
|
||||
*/
|
||||
if (istype(U, /turf/space))
|
||||
|
||||
if(isspace(U))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
|
||||
if(!linked_node)
|
||||
return
|
||||
|
||||
if(linked_node != src)
|
||||
color = linked_node.set_color
|
||||
if(get_dist(linked_node, src) > linked_node.node_range)
|
||||
return
|
||||
|
||||
direction_loop:
|
||||
for(var/dirn in cardinal)
|
||||
var/turf/T = get_step(src, dirn)
|
||||
for(var/dirn in cardinal)
|
||||
var/turf/T1 = get_turf(src)
|
||||
var/turf/T2 = get_step(src, dirn)
|
||||
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
if(!istype(T2) || locate(/obj/effect/alien/weeds) in T2 || istype(T2.loc, /area/arrival) || isspace(T2))
|
||||
continue
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
if(T1.c_airblock(T2) == BLOCKED)
|
||||
continue
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(!O.CanZASPass(U))
|
||||
continue direction_loop
|
||||
new /obj/effect/alien/weeds(T2, linked_node, color)
|
||||
|
||||
var/obj/effect/E = new /obj/effect/alien/weeds(T, linked_node)
|
||||
/obj/effect/alien/weeds/node/process()
|
||||
set background = 1
|
||||
. = ..()
|
||||
|
||||
E.color = color
|
||||
var/list/nearby_weeds = list()
|
||||
for(var/obj/effect/alien/weeds/W in orange(node_range, src))
|
||||
nearby_weeds |= W
|
||||
|
||||
if(istype(src, /obj/effect/alien/weeds/node))
|
||||
var/obj/effect/alien/weeds/node/N = src
|
||||
var/list/nearby_weeds = list()
|
||||
for(var/obj/effect/alien/weeds/W in range(N.node_range,src))
|
||||
nearby_weeds |= W
|
||||
for(var/nbw in nearby_weeds)
|
||||
var/obj/effect/alien/weeds/W = nbw
|
||||
|
||||
for(var/obj/effect/alien/weeds/W in nearby_weeds)
|
||||
if(!W)
|
||||
continue
|
||||
if(!W.linked_node)
|
||||
W.linked_node = src
|
||||
|
||||
if(!W.linked_node)
|
||||
W.linked_node = src
|
||||
|
||||
W.color = W.linked_node.set_color
|
||||
|
||||
if(W == src)
|
||||
continue
|
||||
|
||||
if(prob(max(10, 40 - (5 * nearby_weeds.len))))
|
||||
W.process()
|
||||
W.color = W.linked_node.set_color
|
||||
|
||||
if(prob(max(10, 40 - (5 * nearby_weeds.len))))
|
||||
W.process()
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -159,8 +159,8 @@ var/global/list/image/splatter_cache=list()
|
||||
icon_state = "writing1"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It reads: <font color='[basecolor]'>\"[message]\"</font>")
|
||||
. = ..()
|
||||
. += "It reads: <font color='[basecolor]'>\"[message]\"</font>"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
if(triggered)
|
||||
return
|
||||
|
||||
if(istype(M, /obj/mecha))
|
||||
explode(M)
|
||||
|
||||
if(istype(M, /mob/living/))
|
||||
if(!M.hovering)
|
||||
explode(M)
|
||||
@@ -79,7 +82,7 @@
|
||||
triggered = 1
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(M)
|
||||
if(istype(M))
|
||||
M.radiation += 50
|
||||
randmutb(M)
|
||||
domutcheck(M,null)
|
||||
@@ -96,7 +99,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(M)
|
||||
if(istype(M))
|
||||
M.Stun(30)
|
||||
visible_message("\The [src.name] flashes violently before disintegrating!")
|
||||
spawn(0)
|
||||
@@ -136,7 +139,10 @@
|
||||
triggered = 1
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(M)
|
||||
if(istype(M, /obj/mecha))
|
||||
var/obj/mecha/E = M
|
||||
M = E.occupant
|
||||
if(istype(M))
|
||||
qdel(M.client)
|
||||
spawn(0)
|
||||
qdel(s)
|
||||
@@ -195,7 +201,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(M)
|
||||
if(istype(M))
|
||||
M.adjust_fire_stacks(5)
|
||||
M.fire_act()
|
||||
visible_message("\The [src.name] bursts into flames!")
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
light_power = 0.5
|
||||
light_color = "#8837A3"
|
||||
|
||||
/obj/effect/projectile/tungsten/impact
|
||||
/obj/effect/projectile/impact/tungsten
|
||||
icon_state = "impact_mhd_laser"
|
||||
light_range = 4
|
||||
light_power = 3
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
light_power = 0.5
|
||||
light_color = "#FF0D00"
|
||||
|
||||
/obj/effect/projectile/tungsten/muzzle
|
||||
/obj/effect/projectile/muzzle/tungsten
|
||||
icon_state = "muzzle_mhd_laser"
|
||||
light_range = 4
|
||||
light_power = 3
|
||||
|
||||
@@ -109,8 +109,14 @@
|
||||
light_power = 0.5
|
||||
light_color = "#0066FF"
|
||||
|
||||
/obj/effect/projectile/tungsten/tracer
|
||||
/obj/effect/projectile/tracer/tungsten
|
||||
icon_state = "mhd_laser"
|
||||
light_range = 4
|
||||
light_power = 3
|
||||
light_color = "#3300ff"
|
||||
|
||||
/obj/effect/projectile/tracer/cannon
|
||||
icon_state = "cannon"
|
||||
light_range = 1
|
||||
light_power = 0.5
|
||||
light_color = "#f6f2b6"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
|
||||
/obj/effect/zone_divider/CanZASPass(turf/T, is_zone)
|
||||
// Special case to prevent us from being part of a zone during the first air master tick.
|
||||
@@ -15,5 +16,5 @@
|
||||
if(air_master && air_master.current_cycle == 0)
|
||||
spawn(1)
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
return ATMOS_PASS_NO
|
||||
return is_zone ? ATMOS_PASS_NO : ATMOS_PASS_YES // Anything except zones can pass
|
||||
return FALSE
|
||||
return is_zone ? FALSE : TRUE // Anything except zones can pass
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
src.loc = T
|
||||
|
||||
// See inventory_sizes.dm for the defines.
|
||||
/obj/item/examine(mob/user, var/distance = -1)
|
||||
/obj/item/examine(mob/user)
|
||||
var/size
|
||||
switch(src.w_class)
|
||||
if(ITEMSIZE_TINY)
|
||||
@@ -210,7 +210,7 @@
|
||||
size = "bulky"
|
||||
if(ITEMSIZE_HUGE)
|
||||
size = "huge"
|
||||
return ..(user, distance, "", "It is a [size] item.")
|
||||
return ..(user, "", "It is a [size] item.")
|
||||
|
||||
/obj/item/attack_hand(mob/living/user as mob)
|
||||
if (!user) return
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
|
||||
|
||||
/obj/item/weapon/deskbell/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(broken)
|
||||
to_chat(user,"<b>It looks damaged, the ringer is stuck firmly inside.</b>")
|
||||
. += "<b>It looks damaged, the ringer is stuck firmly inside.</b>"
|
||||
|
||||
/obj/item/weapon/deskbell/attack(mob/target as mob, mob/living/user as mob)
|
||||
if(!broken)
|
||||
@@ -49,7 +49,7 @@
|
||||
// Once the player has decided their option, choose the behaviour that will happen under said option.
|
||||
switch(choice)
|
||||
if("examine")
|
||||
examine(user)
|
||||
user.examinate(src)
|
||||
|
||||
if("use")
|
||||
if(check_ability(user))
|
||||
|
||||
@@ -219,13 +219,13 @@
|
||||
syringe.reagents.trans_to_mob(H, 30, CHEM_BLOOD)
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(Adjacent(user)) //The bag's rather thick and opaque from a distance.
|
||||
to_chat(user, "<span class='info'>You peer into \the [src].</span>")
|
||||
. += "<span class='info'>You peer into \the [src].</span>"
|
||||
if(syringe)
|
||||
to_chat(user, "<span class='info'>It has a syringe added to it.</span>")
|
||||
. += "<span class='info'>It has a syringe added to it.</span>"
|
||||
for(var/mob/living/L in contents)
|
||||
L.examine(user)
|
||||
. += L.examine(user)
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/attackby(obj/item/W, mob/user)
|
||||
if(opened)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the crayon and swallow it.")
|
||||
user.nutrition += 1
|
||||
@@ -195,7 +195,7 @@
|
||||
shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the marker and swallow it.")
|
||||
user.nutrition += 1
|
||||
|
||||
@@ -68,8 +68,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/spam_proof = FALSE // If true, it can't be spammed by random events.
|
||||
|
||||
/obj/item/device/pda/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "The time [stationtime2text()] is displayed in the corner of the screen.")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The time [stationtime2text()] is displayed in the corner of the screen."
|
||||
|
||||
/obj/item/device/pda/CtrlClick()
|
||||
if(issilicon(usr))
|
||||
|
||||
@@ -256,7 +256,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.source = src
|
||||
status_signal.transmission_method = 1
|
||||
status_signal.transmission_method = TRANSMISSION_RADIO
|
||||
status_signal.data["command"] = command
|
||||
|
||||
switch(command)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
var/datum/signal/signal = new()
|
||||
signal.source = src
|
||||
signal.transmission_method = 1
|
||||
signal.transmission_method = TRANSMISSION_RADIO
|
||||
signal.data[key] = value
|
||||
if(key2)
|
||||
signal.data[key2] = value2
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.source = src
|
||||
status_signal.transmission_method = 1
|
||||
status_signal.transmission_method = TRANSMISSION_RADIO
|
||||
status_signal.data["command"] = command
|
||||
|
||||
switch(command)
|
||||
|
||||
@@ -108,9 +108,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
// Parameters: user - the user doing the examining
|
||||
// Description: Allows the user to click a link when examining to look at video if one is going.
|
||||
/obj/item/device/communicator/examine(mob/user)
|
||||
. = ..(user, 1)
|
||||
if(. && video_source)
|
||||
to_chat(user, "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>")
|
||||
. = ..()
|
||||
if(Adjacent(user) && video_source)
|
||||
. += "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>"
|
||||
|
||||
// Proc: initialize_exonet()
|
||||
// Parameters: 1 (user - the person the communicator belongs to)
|
||||
@@ -131,28 +131,22 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
// Parameters: 1 (user - the person examining the device)
|
||||
// Description: Shows all the voice mobs inside the device, and their status.
|
||||
/obj/item/device/communicator/examine(mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
|
||||
var/msg = ""
|
||||
. = ..()
|
||||
|
||||
for(var/mob/living/voice/voice in contents)
|
||||
msg += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
. += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>"
|
||||
|
||||
if(voice && voice.key)
|
||||
switch(voice.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!voice.client)
|
||||
msg += "[voice] appears to be asleep.\n" //afk
|
||||
. += "<span class='warning'>[voice] appears to be asleep.</span>" //afk
|
||||
if(UNCONSCIOUS)
|
||||
msg += "[voice] doesn't appear to be conscious.\n"
|
||||
. += "<span class='warning'>[voice] doesn't appear to be conscious.</span>"
|
||||
if(DEAD)
|
||||
msg += "<span class='deadsay'>[voice] appears to have died...</span>\n" //Hopefully this never has to be used.
|
||||
. += "<span class='deadsay'>[voice] appears to have died...</span>" //Hopefully this never has to be used.
|
||||
else
|
||||
msg += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>\n"
|
||||
msg += "</span>"
|
||||
to_chat(user, msg)
|
||||
return
|
||||
. += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>"
|
||||
|
||||
// Proc: emp_act()
|
||||
// Parameters: None
|
||||
|
||||
@@ -87,23 +87,20 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(power_use && brightness_level)
|
||||
var/tempdesc
|
||||
tempdesc += "\The [src] is set to [brightness_level]. "
|
||||
. += "\The [src] is set to [brightness_level]."
|
||||
if(cell)
|
||||
tempdesc += "\The [src] has a \the [cell] attached. "
|
||||
. += "\The [src] has a \the [cell] attached."
|
||||
|
||||
if(cell.charge <= cell.maxcharge*0.25)
|
||||
tempdesc += "It appears to have a low amount of power remaining."
|
||||
. += "It appears to have a low amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5)
|
||||
tempdesc += "It appears to have an average amount of power remaining."
|
||||
. += "It appears to have an average amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75)
|
||||
tempdesc += "It appears to have an above average amount of power remaining."
|
||||
. += "It appears to have an above average amount of power remaining."
|
||||
else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge)
|
||||
tempdesc += "It appears to have a high amount of power remaining."
|
||||
|
||||
to_chat(user, "[tempdesc]")
|
||||
. += "It appears to have a high amount of power remaining."
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(power_use)
|
||||
@@ -422,7 +419,7 @@
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes the glowstick.</span>", "<span class='notice'>You crack and shake the glowstick, turning it on!</span>")
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes \the [name].</span>", "<span class='notice'>You crack and shake \the [src], turning it on!</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/glowstick/red
|
||||
|
||||
@@ -110,8 +110,8 @@
|
||||
choose_colour()
|
||||
|
||||
/obj/item/device/floor_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint.")
|
||||
. = ..()
|
||||
. += "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint."
|
||||
|
||||
/obj/item/device/floor_painter/verb/choose_colour()
|
||||
set name = "Choose Colour"
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
update_sound()
|
||||
|
||||
/obj/item/device/geiger/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
get_radiation()
|
||||
to_chat(user, "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
. += "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>"
|
||||
|
||||
/obj/item/device/geiger/rad_act(amount)
|
||||
if(!amount || !scanning)
|
||||
|
||||
@@ -83,7 +83,7 @@ var/list/GPS_list = list()
|
||||
dat["curr_z_name"] = using_map.get_zlevel_name(curr.z)
|
||||
dat["gps_list"] = list()
|
||||
dat["z_level_detection"] = using_map.get_map_levels(curr.z, long_range)
|
||||
|
||||
|
||||
for(var/obj/item/device/gps/G in GPS_list - src)
|
||||
if(!G.tracking || G.emped || G.hide_signal)
|
||||
continue
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
/obj/item/device/holowarrant/examine(mob/user)
|
||||
. = ..()
|
||||
if(active)
|
||||
to_chat(user, "It's a holographic warrant for '[active.fields["namewarrant"]]'.")
|
||||
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
|
||||
if(in_range(user, src) || istype(user, /mob/observer/dead))
|
||||
show_content(user)
|
||||
show_content(user) //Opens a browse window, not chatbox related
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You have to go closer if you want to read it.</span>")
|
||||
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
|
||||
//hit yourself with it
|
||||
/obj/item/device/holowarrant/attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -64,8 +64,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
to_chat(user, "It has [uses] lights remaining.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
. += "It has [uses] lights remaining."
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass")
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
choose_colour_secure()
|
||||
|
||||
/obj/item/device/closet_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme.")
|
||||
. = ..()
|
||||
. += "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme."
|
||||
|
||||
/obj/item/device/closet_painter/verb/choose_colour()
|
||||
set name = "Choose Colour"
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It looks as though it modifies hardsuits to fit [target_species] users.")
|
||||
. = ..()
|
||||
. += "It looks as though it modifies hardsuits to fit [target_species] users."
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "tajaran hardsuit modification kit"
|
||||
|
||||
@@ -27,5 +27,5 @@
|
||||
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
|
||||
|
||||
/obj/item/device/pipe_painter/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It is in [mode] mode.")
|
||||
. = ..()
|
||||
. += "It is in [mode] mode."
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
return list_secure_channels()
|
||||
|
||||
/obj/item/device/radio/headset/examine(mob/user)
|
||||
if(!(..(user, 1) && radio_desc))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
to_chat(user, "The following channels are available:")
|
||||
to_chat(user, radio_desc)
|
||||
if(radio_desc && Adjacent(user))
|
||||
. += "The following channels are available:"
|
||||
. += radio_desc
|
||||
|
||||
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel)
|
||||
if(channel == "special")
|
||||
|
||||
@@ -49,6 +49,13 @@ var/global/list/default_medbay_channels = list(
|
||||
w_class = ITEMSIZE_SMALL
|
||||
show_messages = 1
|
||||
|
||||
// Bluespace radios talk directly to telecomms equipment
|
||||
var/bluespace_radio = FALSE
|
||||
var/weakref/bs_tx_weakref //Maybe misleading, this is the device to TRANSMIT TO
|
||||
// For mappers or subtypes, to start them prelinked to these devices
|
||||
var/bs_tx_preload_id
|
||||
var/bs_rx_preload_id
|
||||
|
||||
matter = list("glass" = 25,DEFAULT_WALL_MATERIAL = 75)
|
||||
var/const/FREQ_LISTENING = 1
|
||||
var/list/internal_channels
|
||||
@@ -87,6 +94,43 @@ var/global/list/default_medbay_channels = list(
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
if(bluespace_radio)
|
||||
if(bs_tx_preload_id)
|
||||
//Try to find a receiver
|
||||
for(var/obj/machinery/telecomms/receiver/RX in telecomms_list)
|
||||
if(RX.id == bs_tx_preload_id) //Again, bs_tx is the thing to TRANSMIT TO, so a receiver.
|
||||
bs_tx_weakref = weakref(RX)
|
||||
RX.link_radio(src)
|
||||
break
|
||||
//Hmm, howabout an AIO machine
|
||||
if(!bs_tx_weakref)
|
||||
for(var/obj/machinery/telecomms/allinone/AIO in telecomms_list)
|
||||
if(AIO.id == bs_tx_preload_id)
|
||||
bs_tx_weakref = weakref(AIO)
|
||||
AIO.link_radio(src)
|
||||
break
|
||||
if(!bs_tx_weakref)
|
||||
testing("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
|
||||
|
||||
if(bs_rx_preload_id)
|
||||
var/found = 0
|
||||
//Try to find a transmitter
|
||||
for(var/obj/machinery/telecomms/broadcaster/TX in telecomms_list)
|
||||
if(TX.id == bs_rx_preload_id) //Again, bs_rx is the thing to RECEIVE FROM, so a transmitter.
|
||||
TX.link_radio(src)
|
||||
found = 1
|
||||
break
|
||||
//Hmm, howabout an AIO machine
|
||||
if(!found)
|
||||
for(var/obj/machinery/telecomms/allinone/AIO in telecomms_list)
|
||||
if(AIO.id == bs_rx_preload_id)
|
||||
AIO.link_radio(src)
|
||||
found = 1
|
||||
break
|
||||
if(!found)
|
||||
testing("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
|
||||
|
||||
|
||||
/obj/item/device/radio/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
@@ -237,11 +281,10 @@ var/global/list/default_medbay_channels = list(
|
||||
if(.)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
if(channel && channels && channels.len > 0)
|
||||
if(channel == "department")
|
||||
//to_world("DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
|
||||
channel = channels[1]
|
||||
connection = secure_radio_connections[channel]
|
||||
else
|
||||
@@ -250,12 +293,15 @@ var/global/list/default_medbay_channels = list(
|
||||
if(!istype(connection))
|
||||
return
|
||||
|
||||
if(!LAZYLEN(zlevels))
|
||||
zlevels = list(0)
|
||||
|
||||
var/static/mob/living/silicon/ai/announcer/A = new /mob/living/silicon/ai/announcer(src, null, null, 1)
|
||||
A.SetName(from)
|
||||
Broadcast_Message(connection, A,
|
||||
0, "*garbled automated announcement*", src,
|
||||
message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice",
|
||||
4, 0, list(0), connection.frequency, "states")
|
||||
DATA_FAKE, 0, zlevels, connection.frequency, "states")
|
||||
|
||||
// Interprets the message mode when talking into a radio, possibly returning a connection datum
|
||||
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, list/message_pieces, message_mode)
|
||||
@@ -313,8 +359,8 @@ var/global/list/default_medbay_channels = list(
|
||||
if(!istype(message_mode, /datum/radio_frequency)) //if not a special case, it should be returning a radio connection
|
||||
return FALSE
|
||||
|
||||
var/pos_z = get_z(src)
|
||||
var/datum/radio_frequency/connection = message_mode
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
|
||||
@@ -363,90 +409,12 @@ var/global/list/default_medbay_channels = list(
|
||||
jobname = "Unknown"
|
||||
voicemask = 1
|
||||
|
||||
|
||||
|
||||
/* ###### Radio headsets can only broadcast through subspace ###### */
|
||||
|
||||
if(subspace_transmission)
|
||||
var/list/jamming = is_jammed(src)
|
||||
if(jamming)
|
||||
var/distance = jamming["distance"]
|
||||
to_chat(M, "<span class='danger'>[bicon(src)] You hear the [distance <= 2 ? "loud hiss" : "soft hiss"] of static.</span>")
|
||||
return FALSE
|
||||
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2 // 2 would be a subspace transmission.
|
||||
// transmission_method could probably be enumerated through #define. Would be neater.
|
||||
|
||||
// --- Finally, tag the actual signal with the appropriate values ---
|
||||
signal.data = list(
|
||||
// Identity-associated tags:
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = displayname, // the mob's display name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmessage" = pick(M.speak_emote), // the message to display if the voice wasn't understood
|
||||
"vname" = M.voice_name, // the name to display if the voice wasn't understood
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
|
||||
|
||||
// We store things that would otherwise be kept in the actual mob
|
||||
// so that they can be logged even AFTER the mob is deleted or something
|
||||
|
||||
// Other tags:
|
||||
"compression" = rand(45,50), // compressed radio signal
|
||||
"message" = message_pieces, // the actual sent message
|
||||
"connection" = connection, // the radio connection to use
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z, // The source's z level
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
return TRUE //Huzzah, sent via subspace
|
||||
|
||||
else if(adhoc_fallback) //Less huzzah, we have to fallback
|
||||
to_chat(loc, "<span class='warning'>\The [src] pings as it falls back to local radio transmission.</span>")
|
||||
subspace_transmission = FALSE
|
||||
return Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message_pieces, displayname, jobname, real_name, M.voice_name,
|
||||
signal.transmission_method, signal.data["compression"], GetConnectedZlevels(position.z), connection.frequency,verb)
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
|
||||
var/filter_type = 2
|
||||
|
||||
/* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */
|
||||
if(istype(src, /obj/item/device/radio/intercom))
|
||||
filter_type = 1
|
||||
|
||||
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2
|
||||
|
||||
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
|
||||
// --- Finally, tag the actual signal with the appropriate values ---
|
||||
signal.data = list(
|
||||
|
||||
// Identity-associated tags:
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"realname" = real_name, // the mob's real name
|
||||
@@ -455,40 +423,107 @@ var/global/list/default_medbay_channels = list(
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmessage" = pick(M.speak_emote), // the message to display if the voice wasn't understood
|
||||
"vname" = M.voice_name, // the name to display if the voice wasn't understood
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mas
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
|
||||
|
||||
"compression" = 0, // uncompressed radio signal
|
||||
// We store things that would otherwise be kept in the actual mob
|
||||
// so that they can be logged even AFTER the mob is deleted or something
|
||||
|
||||
// Other tags:
|
||||
"compression" = rand(45,50), // compressed radio signal
|
||||
"message" = message_pieces, // the actual sent message
|
||||
"connection" = connection, // the radio connection to use
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0,
|
||||
"traffic" = 0,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z,
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = SIGNAL_NORMAL, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = pos_z, // The source's z level
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
var/filter_type = DATA_LOCAL //If we end up having to send it the old fashioned way, it's with this data var.
|
||||
|
||||
/* ###### Bluespace radios talk directly to receivers (and only directly to receivers) ###### */
|
||||
if(bluespace_radio)
|
||||
//Nothing to transmit to
|
||||
if(!bs_tx_weakref)
|
||||
to_chat(loc, "<span class='warning'>\The [src] buzzes to inform you of the lack of a functioning connection.</span>")
|
||||
return FALSE
|
||||
|
||||
var/obj/machinery/telecomms/tx_to = bs_tx_weakref.resolve()
|
||||
//Was linked, now destroyed or something
|
||||
if(!tx_to)
|
||||
bs_tx_weakref = null
|
||||
to_chat(loc, "<span class='warning'>\The [src] buzzes to inform you of the lack of a functioning connection.</span>")
|
||||
return FALSE
|
||||
|
||||
//Transmitted in the blind. If we get a message back, cool. If not, oh well.
|
||||
signal.transmission_method = TRANSMISSION_BLUESPACE
|
||||
return tx_to.receive_signal(signal)
|
||||
|
||||
/* ###### Radios with subspace_transmission can only broadcast through subspace (unless they have adhoc_fallback) ###### */
|
||||
else if(subspace_transmission)
|
||||
var/list/jamming = is_jammed(src)
|
||||
if(jamming)
|
||||
var/distance = jamming["distance"]
|
||||
to_chat(M, "<span class='danger'>[bicon(src)] You hear the [distance <= 2 ? "loud hiss" : "soft hiss"] of static.</span>")
|
||||
return FALSE
|
||||
|
||||
// First, we want to generate a new radio signal
|
||||
signal.transmission_method = TRANSMISSION_SUBSPACE
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
if(signal.data["done"] && (pos_z in signal.data["level"]))
|
||||
return TRUE //Huzzah, sent via subspace
|
||||
|
||||
else if(adhoc_fallback) //Less huzzah, we have to fallback
|
||||
to_chat(loc, "<span class='warning'>\The [src] pings as it falls back to local radio transmission.</span>")
|
||||
subspace_transmission = FALSE
|
||||
|
||||
else //Oh well
|
||||
return FALSE
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
else
|
||||
/* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */
|
||||
if(istype(src, /obj/item/device/radio/intercom))
|
||||
filter_type = DATA_INTERCOM
|
||||
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
signal.transmission_method = TRANSMISSION_SUBSPACE
|
||||
signal.data["compression"] = 0
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
if(adhoc_fallback)
|
||||
to_chat(loc, "<span class='notice'>\The [src] pings as it reestablishes subspace communications.</span>")
|
||||
subspace_transmission = TRUE
|
||||
// we're done here.
|
||||
return TRUE
|
||||
if(signal.data["done"] && pos_z in signal.data["level"])
|
||||
if(adhoc_fallback)
|
||||
to_chat(loc, "<span class='notice'>\The [src] pings as it reestablishes subspace communications.</span>")
|
||||
subspace_transmission = TRUE
|
||||
// we're done here.
|
||||
return TRUE
|
||||
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
|
||||
//THIS IS TEMPORARY. YEAH RIGHT
|
||||
if(!connection) return FALSE //~Carn
|
||||
//Nothing handled any sort of remote radio-ing and returned before now, just squawk on this zlevel.
|
||||
return Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message_pieces, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], GetConnectedZlevels(position.z), connection.frequency, verb)
|
||||
src, message_pieces, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], using_map.get_map_levels(pos_z), connection.frequency, verb)
|
||||
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M, list/message_pieces, verb)
|
||||
@@ -496,25 +531,10 @@ var/global/list/default_medbay_channels = list(
|
||||
if(get_dist(src, M) <= canhear_range)
|
||||
talk_into(M, message_pieces, null, verb)
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
|
||||
if((R.frequency == frequency && message))
|
||||
return TRUE
|
||||
else if
|
||||
|
||||
else
|
||||
return null
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/device/radio/proc/receive_range(freq, level)
|
||||
// check if this radio can receive on the given frequency, and if so,
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
|
||||
if(wires.IsIndexCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!listening)
|
||||
@@ -522,8 +542,8 @@ var/global/list/default_medbay_channels = list(
|
||||
if(is_jammed(src))
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(!position || !(position.z in level))
|
||||
var/pos_z = get_z(src)
|
||||
if(!(pos_z in level))
|
||||
return -1
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
@@ -557,12 +577,12 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
if((in_range(src, user) || loc == user))
|
||||
if(b_stat)
|
||||
user.show_message("<span class='notice'>\The [src] can be attached and modified!</span>")
|
||||
. += "<span class='notice'>\The [src] can be attached and modified!</span>"
|
||||
else
|
||||
user.show_message("<span class='notice'>\The [src] can not be modified or attached!</span>")
|
||||
return
|
||||
. += "<span class='notice'>\The [src] can not be modified or attached!</span>"
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/obj/item/device/bluespaceradio
|
||||
name = "bluespace radio"
|
||||
desc = "A powerful radio that uses a tiny bluespace wormhole to send signals directly to subspace receivers and transmitters, bypassing the limitations of subspace."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radiopack"
|
||||
item_state = "radiopack"
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
preserve_item = 1
|
||||
w_class = ITEMSIZE_LARGE
|
||||
action_button_name = "Remove/Replace Handset"
|
||||
|
||||
var/obj/item/device/radio/bluespacehandset/linked/handset = /obj/item/device/radio/bluespacehandset/linked
|
||||
|
||||
/obj/item/device/bluespaceradio/Initialize()
|
||||
. = ..()
|
||||
if(ispath(handset))
|
||||
handset = new handset(src, src)
|
||||
|
||||
/obj/item/device/bluespaceradio/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(handset)
|
||||
|
||||
/obj/item/device/bluespaceradio/ui_action_click()
|
||||
toggle_handset()
|
||||
|
||||
/obj/item/device/bluespaceradio/attack_hand(var/mob/user)
|
||||
if(loc == user)
|
||||
toggle_handset()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/device/bluespaceradio/MouseDrop()
|
||||
if(ismob(loc))
|
||||
if(!CanMouseDrop(src))
|
||||
return
|
||||
var/mob/M = loc
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
M.put_in_any_hand_if_possible(src)
|
||||
|
||||
/obj/item/device/bluespaceradio/attackby(var/obj/item/weapon/W, var/mob/user, var/params)
|
||||
if(W == handset)
|
||||
reattach_handset(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/bluespaceradio/verb/toggle_handset()
|
||||
set name = "Toggle Handset"
|
||||
set category = "Object"
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(!handset)
|
||||
to_chat(user, "<span class='warning'>The handset is missing!</span>")
|
||||
return
|
||||
|
||||
if(handset.loc != src)
|
||||
reattach_handset(user) //Remove from their hands and back onto the defib unit
|
||||
return
|
||||
|
||||
if(!slot_check())
|
||||
to_chat(user, "<span class='warning'>You need to equip [src] before taking out [handset].</span>")
|
||||
else
|
||||
if(!usr.put_in_hands(handset)) //Detach the handset into the user's hands
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the handset!</span>")
|
||||
update_icon() //success
|
||||
|
||||
//checks that the base unit is in the correct slot to be used
|
||||
/obj/item/device/bluespaceradio/proc/slot_check()
|
||||
var/mob/M = loc
|
||||
if(!istype(M))
|
||||
return 0 //not equipped
|
||||
|
||||
if((slot_flags & SLOT_BACK) && M.get_equipped_item(slot_back) == src)
|
||||
return 1
|
||||
if((slot_flags & SLOT_BACK) && M.get_equipped_item(slot_s_store) == src)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/device/bluespaceradio/dropped(var/mob/user)
|
||||
..()
|
||||
reattach_handset(user) //handset attached to a base unit should never exist outside of their base unit or the mob equipping the base unit
|
||||
|
||||
/obj/item/device/bluespaceradio/proc/reattach_handset(var/mob/user)
|
||||
if(!handset) return
|
||||
|
||||
if(ismob(handset.loc))
|
||||
var/mob/M = handset.loc
|
||||
if(M.drop_from_inventory(handset, src))
|
||||
to_chat(user, "<span class='notice'>\The [handset] snaps back into the main unit.</span>")
|
||||
else
|
||||
handset.forceMove(src)
|
||||
|
||||
//Subspace Radio Handset
|
||||
/obj/item/device/radio/bluespacehandset
|
||||
name = "bluespace radio handset"
|
||||
desc = "A large walkie talkie attached to the bluespace radio by a retractable cord. It sits comfortably on a slot in the radio when not in use."
|
||||
bluespace_radio = TRUE
|
||||
icon_state = "signaller"
|
||||
slot_flags = null
|
||||
w_class = ITEMSIZE_LARGE
|
||||
canhear_range = 1
|
||||
|
||||
/obj/item/device/radio/bluespacehandset/linked
|
||||
var/obj/item/device/bluespaceradio/base_unit
|
||||
|
||||
/obj/item/device/radio/bluespacehandset/linked/Initialize(mapload, var/obj/item/device/bluespaceradio/radio)
|
||||
base_unit = radio
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/bluespacehandset/linked/Destroy()
|
||||
if(base_unit)
|
||||
//ensure the base unit's icon updates
|
||||
if(base_unit.handset == src)
|
||||
base_unit.handset = null
|
||||
base_unit = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/bluespacehandset/linked/dropped(var/mob/user)
|
||||
..() //update twohanding
|
||||
if(base_unit)
|
||||
base_unit.reattach_handset(user) //handset attached to a base unit should never exist outside of their base unit or the mob equipping the base unit
|
||||
|
||||
/obj/item/device/radio/bluespacehandset/linked/receive_range(var/freq, var/list/level)
|
||||
//Only care about megabroadcasts or things that are targeted at us
|
||||
if(!(0 in level))
|
||||
return -1
|
||||
if(wires.IsIndexCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!listening)
|
||||
return -1
|
||||
if(!on)
|
||||
return -1
|
||||
if(!freq)
|
||||
return -1
|
||||
|
||||
//Only listen on main freq
|
||||
if(freq == frequency)
|
||||
return canhear_range
|
||||
else
|
||||
return -1
|
||||
@@ -486,7 +486,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
for(var/potential_color in S.slime_mutation)
|
||||
var/mob/living/simple_mob/slime/xenobio/slime = potential_color
|
||||
mutations.Add(initial(slime.slime_color))
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.get_max_nutrition()]")
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.max_nutrition]")
|
||||
|
||||
if (S.nutrition < S.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: Subject is starving!</span>")
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
camtype = /obj/machinery/camera/bug/spy
|
||||
|
||||
/obj/item/device/camerabug/examine(mob/user)
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
to_chat(user, "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional."
|
||||
|
||||
/obj/item/device/camerabug/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
if(istype(W, /obj/item/device/bug_monitor))
|
||||
@@ -215,9 +215,9 @@
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
|
||||
|
||||
/obj/item/device/bug_monitor/spy/examine(mob/user)
|
||||
. = ..(user, 1)
|
||||
if(.)
|
||||
to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
|
||||
|
||||
/obj/machinery/camera/bug/check_eye(var/mob/user as mob)
|
||||
return 0
|
||||
|
||||
@@ -173,24 +173,25 @@
|
||||
icon_state = "suitcooler0"
|
||||
|
||||
/obj/item/device/suit_cooling_unit/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
if (on)
|
||||
if (attached_to_suit(src.loc))
|
||||
to_chat(user, "It's switched on and running.")
|
||||
if(Adjacent(user))
|
||||
|
||||
if (on)
|
||||
if (attached_to_suit(src.loc))
|
||||
. += "It's switched on and running."
|
||||
else
|
||||
. += "It's switched on, but not attached to anything."
|
||||
else
|
||||
to_chat(user, "It's switched on, but not attached to anything.")
|
||||
else
|
||||
to_chat(user, "It is switched off.")
|
||||
. += "It is switched off."
|
||||
|
||||
if (cover_open)
|
||||
if(cell)
|
||||
to_chat(user, "The panel is open, exposing the [cell].")
|
||||
if (cover_open)
|
||||
if(cell)
|
||||
. += "The panel is open, exposing the [cell]."
|
||||
else
|
||||
. += "The panel is open."
|
||||
|
||||
if (cell)
|
||||
. += "The charge meter reads [round(cell.percent())]%."
|
||||
else
|
||||
to_chat(user, "The panel is open.")
|
||||
|
||||
if (cell)
|
||||
to_chat(user, "The charge meter reads [round(cell.percent())]%.")
|
||||
else
|
||||
to_chat(user, "It doesn't have a power cell installed.")
|
||||
. += "It doesn't have a power cell installed."
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/tvcamera/examine()
|
||||
..()
|
||||
to_chat(usr, "Video feed is [camera.status ? "on" : "off"]")
|
||||
to_chat(usr, "Audio feed is [radio.broadcasting ? "on" : "off"]")
|
||||
. = ..()
|
||||
. += "Video feed is [camera.status ? "on" : "off"]"
|
||||
. += "Audio feed is [radio.broadcasting ? "on" : "off"]"
|
||||
|
||||
/obj/item/device/tvcamera/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
var/list/allowed_types = list()
|
||||
|
||||
/obj/item/device/kit/examine()
|
||||
..()
|
||||
to_chat(usr, "It has [uses] use\s left.")
|
||||
. = ..()
|
||||
. += "It has [uses] use\s left."
|
||||
|
||||
/obj/item/device/kit/proc/use(var/amt, var/mob/user)
|
||||
uses -= amt
|
||||
@@ -216,11 +216,11 @@
|
||||
|
||||
|
||||
/obj/item/device/kit/paint/examine()
|
||||
..()
|
||||
to_chat(usr, "This kit will convert an exosuit into: [new_name].")
|
||||
to_chat(usr, "This kit can be used on the following exosuit models:")
|
||||
. = ..()
|
||||
. += "This kit will convert an exosuit into: [new_name]."
|
||||
. += "This kit can be used on the following exosuit models:"
|
||||
for(var/exotype in allowed_types)
|
||||
to_chat(usr, "- [capitalize(exotype)]")
|
||||
. += "- [capitalize(exotype)]"
|
||||
|
||||
/obj/item/device/kit/paint/customize(var/obj/mecha/M, var/mob/user)
|
||||
if(!can_customize(M))
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
var/obj/item/clothing/accessory/badge/corptag // The tag on the bag.
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user)
|
||||
..()
|
||||
if(Adjacent(user) && corptag)
|
||||
to_chat(user, "<span class='notice'>\The [src] has a [corptag] attached to it.</span>")
|
||||
. = ..()
|
||||
if(corptag && Adjacent(user))
|
||||
. += "<span class='notice'>[src] has a [corptag] attached to it.</span>"
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/robobag/update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
@@ -9,9 +9,13 @@
|
||||
/obj/fiftyspawner/Initialize()
|
||||
..() //We're not returning . because we're going to ask to be deleted.
|
||||
|
||||
var/obj/item/stack/M = new type_to_spawn(get_turf(src))
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/stack/M = new type_to_spawn(T)
|
||||
M.amount = M.max_amount //some stuff spawns with 60, we're still calling it fifty
|
||||
M.update_icon() // Some stacks have different sprites depending on how full they are.
|
||||
var/obj/structure/closet/C = locate() in T
|
||||
if(C)
|
||||
C.contents += M
|
||||
return INITIALIZE_HINT_QDEL //Bye!
|
||||
|
||||
/obj/fiftyspawner/rods
|
||||
|
||||
@@ -42,9 +42,9 @@ var/list/marker_beacon_colors = list(
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/marker_beacon/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Use in-hand to place a [singular_name].</span>")
|
||||
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use in-hand to place a [singular_name].</span>"
|
||||
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
|
||||
|
||||
/obj/item/stack/marker_beacon/update_icon()
|
||||
icon_state = "[initial(icon_state)][lowertext(picked_color)]"
|
||||
@@ -93,8 +93,8 @@ var/list/marker_beacon_colors = list(
|
||||
update_icon()
|
||||
|
||||
/obj/structure/marker_beacon/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
|
||||
|
||||
/obj/structure/marker_beacon/update_icon()
|
||||
while(!picked_color || !marker_beacon_colors[picked_color])
|
||||
|
||||
@@ -58,11 +58,13 @@
|
||||
item_state = initial(icon_state)
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
. = ..()
|
||||
|
||||
if(Adjacent(user))
|
||||
if(!uses_charge)
|
||||
to_chat(user, "There are [src.amount] [src.singular_name]\s in the stack.")
|
||||
. += "There are [src.amount] [src.singular_name]\s in the stack."
|
||||
else
|
||||
to_chat(user, "There is enough charge for [get_amount()].")
|
||||
. += "There is enough charge for [get_amount()]."
|
||||
|
||||
/obj/item/stack/attack_self(mob/user as mob)
|
||||
list_recipes(user)
|
||||
|
||||
@@ -154,8 +154,9 @@
|
||||
drop_sound = 'sound/items/drop/gun.ogg'
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 2) && bullets)
|
||||
to_chat(user, "<span class='notice'>It is loaded with [bullets] foam darts!</span>")
|
||||
. = ..()
|
||||
if(bullets && get_dist(user, src) <= 2)
|
||||
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/toy/ammo/crossbow))
|
||||
@@ -315,8 +316,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/sword/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/device/multitool) && !active)
|
||||
@@ -824,11 +825,11 @@
|
||||
var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself.
|
||||
|
||||
/obj/structure/plushie/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(opened)
|
||||
to_chat(user, "<i>You notice an incision has been made on [src].</i>")
|
||||
. += "<i>You notice an incision has been made on [src].</i>"
|
||||
if(in_range(user, src) && stored_item)
|
||||
to_chat(user, "<i>You can see something in there...</i>")
|
||||
. += "<i>You can see something in there...</i>"
|
||||
|
||||
/obj/structure/plushie/attack_hand(mob/user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
@@ -923,11 +924,11 @@
|
||||
|
||||
|
||||
/obj/item/toy/plushie/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(opened)
|
||||
to_chat(user, "<i>You notice an incision has been made on [src].</i>")
|
||||
. += "<i>You notice an incision has been made on [src].</i>"
|
||||
if(in_range(user, src) && stored_item)
|
||||
to_chat(user, "<i>You can see something in there...</i>")
|
||||
. += "<i>You can see something in there...</i>"
|
||||
|
||||
/obj/item/toy/plushie/attack_self(mob/user as mob)
|
||||
if(stored_item && opened && !searching)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcd/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, display_resources())
|
||||
. = ..()
|
||||
. += display_resources()
|
||||
|
||||
// Used to show how much stuff (matter units, cell charge, etc) is left inside.
|
||||
/obj/item/weapon/rcd/proc/display_resources()
|
||||
|
||||
@@ -33,8 +33,9 @@ RSF
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/weapon/rsf/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
to_chat(user,"<span class='notice'>It currently holds [stored_matter]/30 fabrication-units.</span>")
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "<span class='notice'>It currently holds [stored_matter]/30 fabrication-units.</span>"
|
||||
|
||||
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -149,22 +149,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/smokable/examine(mob/user)
|
||||
..()
|
||||
if(is_pipe)
|
||||
return
|
||||
var/smoke_percent = round((smoketime / max_smoketime) * 100)
|
||||
switch(smoke_percent)
|
||||
if(90 to INFINITY)
|
||||
to_chat(user, "[src] is still fresh.")
|
||||
if(60 to 90)
|
||||
to_chat(user, "[src] has a good amount of burn time remaining.")
|
||||
if(30 to 60)
|
||||
to_chat(user, "[src] is about half finished.")
|
||||
if(10 to 30)
|
||||
to_chat(user, "[src] is starting to burn low.")
|
||||
else
|
||||
to_chat(user, "[src] is nearly burnt out!")
|
||||
|
||||
. = ..()
|
||||
|
||||
if(!is_pipe)
|
||||
var/smoke_percent = round((smoketime / max_smoketime) * 100)
|
||||
switch(smoke_percent)
|
||||
if(90 to INFINITY)
|
||||
. += "[src] is still fresh."
|
||||
if(60 to 90)
|
||||
. += "[src] has a good amount of burn time remaining."
|
||||
if(30 to 60)
|
||||
. += "[src] is about half finished."
|
||||
if(10 to 30)
|
||||
. += "[src] is starting to burn low."
|
||||
else
|
||||
. += "[src] is nearly burnt out!"
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
|
||||
@@ -18,14 +18,7 @@
|
||||
build_path = /obj/machinery/power/smes/batteryrack
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 2)
|
||||
req_components = list(/obj/item/weapon/cell = 3)
|
||||
|
||||
/obj/item/weapon/circuitboard/ghettosmes
|
||||
name = T_BOARD("makeshift PSU")
|
||||
desc = "An APC circuit repurposed into some power storage device controller"
|
||||
build_path = /obj/machinery/power/smes/batteryrack/makeshift
|
||||
board_type = new /datum/frame/frame_types/machine
|
||||
req_components = list(/obj/item/weapon/cell = 3)
|
||||
req_components = list(/obj/item/weapon/stock_parts/capacitor/ = 3, /obj/item/weapon/stock_parts/matter_bin/ = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/grid_checker
|
||||
name = T_BOARD("power grid checker")
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
create_reagents(volume)
|
||||
|
||||
/obj/item/weapon/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left
|
||||
..()
|
||||
to_chat(user, "The cartridge has [reagents.total_volume] units of liquid remaining.")
|
||||
. = ..()
|
||||
. += "The cartridge has [reagents.total_volume] units of liquid remaining."
|
||||
|
||||
//flavours
|
||||
/obj/item/weapon/reagent_containers/ecig_cartridge/blank
|
||||
|
||||
@@ -40,8 +40,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
to_chat(user, "[bicon(src)] [src.name] contains [src.reagents.total_volume] units of water left!")
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "[src] has [src.reagents.total_volume] units of water left!"
|
||||
|
||||
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
|
||||
safety = !safety
|
||||
|
||||
@@ -164,8 +164,9 @@
|
||||
|
||||
|
||||
/obj/item/weapon/wrapping_paper/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "There is about [src.amount] square units of paper left!")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "There is about [src.amount] square units of paper left!"
|
||||
|
||||
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
|
||||
if (!istype(target, /mob/living/carbon/human)) return
|
||||
|
||||
@@ -118,9 +118,9 @@
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
. += "It has [detonator.name] attached to it."
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
|
||||
if(active) return
|
||||
|
||||
@@ -45,13 +45,12 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] seconds.")
|
||||
return
|
||||
if(det_time == null)
|
||||
return
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
. += "The timer is set to [det_time/10] seconds."
|
||||
else if(det_time == null)
|
||||
. += "\The [src] is set for instant detonation."
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user as mob)
|
||||
|
||||
@@ -32,12 +32,11 @@
|
||||
var/survey_points = 0 // For redeeming at explorer equipment vendors.
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
set src in oview(1)
|
||||
if(in_range(usr, src))
|
||||
show(usr)
|
||||
to_chat(usr,desc)
|
||||
. = ..()
|
||||
if(in_range(user, src))
|
||||
show(user) //Not chat related
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>It is too far away.</span>")
|
||||
. += "<span class='warning'>It is too far away to read.</span>"
|
||||
|
||||
/obj/item/weapon/card/id/proc/prevent_tracking()
|
||||
return 0
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
IC.emp_act(severity)
|
||||
|
||||
/obj/item/weapon/implant/integrated_circuit/examine(mob/user)
|
||||
IC.examine(user)
|
||||
return IC.examine(user)
|
||||
|
||||
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
|
||||
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
|
||||
|
||||
@@ -113,9 +113,9 @@ obj/item/weapon/chainsaw/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
|
||||
obj/item/weapon/chainsaw/examine(mob/user)
|
||||
if(..(user,0))
|
||||
if(max_fuel)
|
||||
to_chat(usr, "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>")
|
||||
. = ..()
|
||||
if(max_fuel && get_dist(user, src) == 0)
|
||||
. += "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>"
|
||||
|
||||
obj/item/weapon/chainsaw/suicide_act(mob/user)
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
|
||||
@@ -36,13 +36,11 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/gravemarker/examine(mob/user)
|
||||
..()
|
||||
if(get_dist(src, user) < 4)
|
||||
if(grave_name)
|
||||
to_chat(user, "Here Lies [grave_name]")
|
||||
if(get_dist(src, user) < 2)
|
||||
if(epitaph)
|
||||
to_chat(user, epitaph)
|
||||
. = ..()
|
||||
if(grave_name && get_dist(src, user) < 4)
|
||||
. += "Here Lies [grave_name]"
|
||||
if(epitaph && get_dist(src, user) < 2)
|
||||
. += epitaph
|
||||
|
||||
/obj/item/weapon/material/gravemarker/update_icon()
|
||||
if(icon_changes)
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
|
||||
/obj/item/weapon/material/sharpeningkit/examine(mob/user, distance)
|
||||
. = ..()
|
||||
to_chat(user, "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use.")
|
||||
. += "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use."
|
||||
|
||||
/obj/item/weapon/material/sharpeningkit/Initialize()
|
||||
. = ..()
|
||||
setrepair()
|
||||
|
||||
@@ -86,14 +86,12 @@
|
||||
return null
|
||||
|
||||
/obj/item/weapon/melee/energy/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(use_cell)
|
||||
. = ..()
|
||||
if(use_cell && Adjacent(user))
|
||||
if(bcell)
|
||||
to_chat(user, "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>")
|
||||
if(!bcell)
|
||||
to_chat(user, "<span class='warning'>The blade does not have a power source installed.</span>")
|
||||
. += "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>"
|
||||
else
|
||||
. += "<span class='warning'>The blade does not have a power source installed.</span>"
|
||||
|
||||
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
|
||||
if(use_cell)
|
||||
@@ -200,8 +198,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/melee/energy/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/*
|
||||
* Energy Axe
|
||||
|
||||
@@ -215,8 +215,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/shield/energy/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/weapon/shield/riot/tele
|
||||
name = "telescopic shield"
|
||||
|
||||
@@ -363,13 +363,12 @@
|
||||
max_storage_space = ITEMSIZE_COST_NORMAL * 5
|
||||
|
||||
/obj/item/weapon/storage/backpack/parachute/examine(mob/user)
|
||||
var/msg = desc
|
||||
if(get_dist(src, user) <= 1)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(parachute)
|
||||
msg += " It seems to be packed."
|
||||
. += "It seems to be packed."
|
||||
else
|
||||
msg += " It seems to be unpacked."
|
||||
to_chat(user, msg)
|
||||
. += "It seems to be unpacked."
|
||||
|
||||
/obj/item/weapon/storage/backpack/parachute/handleParachute()
|
||||
parachute = FALSE //If you parachute in, the parachute has probably been used.
|
||||
|
||||
@@ -142,34 +142,36 @@
|
||||
if(O)
|
||||
gather_all(get_turf(src), user)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/proc/rangedload(atom/A, mob/user)
|
||||
var/obj/item/weapon/ore/O = locate() in get_turf(A)
|
||||
if(O)
|
||||
gather_all(get_turf(A), user)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them.
|
||||
return
|
||||
return .
|
||||
|
||||
if(istype(user, /mob/living))
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!contents.len)
|
||||
to_chat(user, "It is empty.")
|
||||
return
|
||||
. += "It is empty."
|
||||
|
||||
if(world.time > last_update + 10)
|
||||
else if(world.time > last_update + 10)
|
||||
update_ore_count()
|
||||
last_update = world.time
|
||||
|
||||
to_chat(user, "<span class='notice'>It holds:</span>")
|
||||
for(var/ore in stored_ore)
|
||||
to_chat(user, "<span class='notice'>- [stored_ore[ore]] [ore]</span>")
|
||||
return
|
||||
. += "<span class='notice'>It holds:</span>"
|
||||
for(var/ore in stored_ore)
|
||||
. += "<span class='notice'>- [stored_ore[ore]] [ore]</span>"
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it.
|
||||
if(world.time > last_update + 10)
|
||||
update_ore_count()
|
||||
last_update = world.time
|
||||
examine(user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/proc/update_ore_count() //Stolen from ore boxes.
|
||||
|
||||
|
||||
@@ -203,6 +203,11 @@
|
||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
starts_with = list(/obj/item/ammo_casing/a145 = 7)
|
||||
|
||||
/obj/item/weapon/storage/box/sniperammo/highvel
|
||||
name = "box of 14.5mm sabot shells"
|
||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
starts_with = list(/obj/item/ammo_casing/a145/highvel = 7)
|
||||
|
||||
/obj/item/weapon/storage/box/flashbangs
|
||||
name = "box of flashbangs (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||
|
||||
@@ -26,17 +26,15 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
if(contents.len <= 0)
|
||||
to_chat(user, "There are no [icon_type]s left in the box.")
|
||||
else if(contents.len == 1)
|
||||
to_chat(user, "There is one [icon_type] left in the box.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len] [icon_type]s in the box.")
|
||||
|
||||
return
|
||||
if(Adjacent(user))
|
||||
if(!contents.len)
|
||||
. += "There are no [icon_type]s left in the box."
|
||||
else if(contents.len == 1)
|
||||
. += "There is one [icon_type] left in the box."
|
||||
else
|
||||
. += "There are [contents.len] [icon_type]s in the box."
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/obj/item/weapon/storage/internal/attack_hand()
|
||||
return //make sure this is never picked up
|
||||
|
||||
/obj/item/weapon/storage/internal/mob_can_equip()
|
||||
/obj/item/weapon/storage/internal/mob_can_equip(M as mob, slot, disable_warning = 0)
|
||||
return 0 //make sure this is never picked up
|
||||
|
||||
//Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items.
|
||||
|
||||
@@ -24,7 +24,7 @@ MRE Stuff
|
||||
|
||||
/obj/item/weapon/storage/mre/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, meal_desc)
|
||||
. += meal_desc
|
||||
|
||||
/obj/item/weapon/storage/mre/update_icon()
|
||||
if(opened)
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
use_sound = 'sound/items/storage/briefcase.ogg'
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "The service panel is [src.open ? "open" : "closed"].")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The service panel is [src.open ? "open" : "closed"]."
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
|
||||
@@ -722,10 +722,10 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/trinketbox/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(open && contents.len)
|
||||
var/display_item = contents[1]
|
||||
to_chat(user, "<span class='notice'>\The [src] contains \the [display_item]!</span>")
|
||||
. += "<span class='notice'>\The [src] contains \the [display_item]!</span>"
|
||||
|
||||
/obj/item/weapon/storage/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
@@ -101,13 +101,13 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/item/weapon/melee/baton/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
if(bcell)
|
||||
to_chat(user, "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>")
|
||||
if(!bcell)
|
||||
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
|
||||
if(Adjacent(user, src))
|
||||
if(bcell)
|
||||
. += "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
|
||||
if(!bcell)
|
||||
. += "<span class='warning'>The baton does not have a power source installed.</span>"
|
||||
|
||||
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
|
||||
if(use_external_power)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
desc = "Murder device."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "baton"
|
||||
item_state = "classic_baton"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 10
|
||||
drop_sound = 'sound/items/drop/metalweapon.ogg'
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/weapon/tank/jetpack/examine(mob/user)
|
||||
. = ..()
|
||||
if(air_contents.total_moles < 5)
|
||||
to_chat(user, "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>")
|
||||
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>"
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
|
||||
@@ -116,8 +116,8 @@
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig/examine()
|
||||
to_chat(usr, "It's a jetpack. If you can see this, report it on the bug tracker.")
|
||||
return 0
|
||||
. = ..()
|
||||
. += "It's a jetpack. If you can see this, report it on the bug tracker."
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig/allow_thrust(num, mob/living/user as mob)
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/oxygen/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas["oxygen"] < 10)
|
||||
to_chat(user, text("<span class='warning'>The meter on \the [src] indicates you are almost out of oxygen!</span>"))
|
||||
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
. = ..()
|
||||
if(loc == user && (air_contents.gas["oxygen"] < 10))
|
||||
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of oxygen!</span>"
|
||||
|
||||
/obj/item/weapon/tank/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
@@ -60,8 +60,9 @@
|
||||
icon_state = "oxygen"
|
||||
|
||||
/obj/item/weapon/tank/air/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas["oxygen"] < 1 && loc==user)
|
||||
to_chat(user, "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>")
|
||||
. = ..()
|
||||
if(loc == user && (air_contents.gas["oxygen"] < 1))
|
||||
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of air!</span>"
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/air/Initialize()
|
||||
@@ -153,8 +154,9 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/emergency/oxygen/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas["oxygen"] < 0.2 && loc==user)
|
||||
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
|
||||
. = ..()
|
||||
if(loc == user && (air_contents.gas["oxygen"] < 0.2))
|
||||
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/emergency/oxygen/engi
|
||||
@@ -228,8 +230,9 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/nitrogen/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas["nitrogen"] < 10)
|
||||
to_chat(user, text("<span class='danger'>The meter on \the [src] indicates you are almost out of nitrogen!</span>"))
|
||||
. = ..()
|
||||
if(loc == user && (air_contents.gas["nitrogen"] < 10))
|
||||
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of nitrogen!</span>"
|
||||
//playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/tank/stasis/nitro_cryo // Synthmorph bags need to have initial pressure within safe bounds for human atmospheric pressure, but low temperature to stop unwanted degredation.
|
||||
|
||||
@@ -82,8 +82,8 @@ var/list/global/tank_gauge_cache = list()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/tank/examine(mob/user)
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
. = ..()
|
||||
if(loc == user)
|
||||
var/celsius_temperature = air_contents.temperature - T0C
|
||||
var/descriptive
|
||||
switch(celsius_temperature)
|
||||
@@ -101,12 +101,12 @@ var/list/global/tank_gauge_cache = list()
|
||||
descriptive = "cold"
|
||||
else
|
||||
descriptive = "bitterly cold"
|
||||
to_chat(user, "<span class='notice'>\The [src] feels [descriptive].</span>")
|
||||
. += "<span class='notice'>\The [src] feels [descriptive].</span>"
|
||||
|
||||
if(src.proxyassembly.assembly || wired)
|
||||
to_chat(user, "<span class='warning'>It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.</span>")
|
||||
. += "<span class='warning'>It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.</span>"
|
||||
if(src.valve_welded)
|
||||
to_chat(user, "<span class='warning'>\The [src] emergency relief valve has been welded shut!</span>")
|
||||
. += "<span class='warning'>\The [src] emergency relief valve has been welded shut!</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -147,11 +147,11 @@ Frequency:
|
||||
if(com)
|
||||
break
|
||||
break
|
||||
if (istype(com, /obj/machinery/computer/teleporter) && com.locked && !com.one_time_use)
|
||||
if (istype(com, /obj/machinery/computer/teleporter) && com.teleport_control.locked && !com.one_time_use)
|
||||
if(R.icon_state == "tele1")
|
||||
L["[com.id] (Active)"] = com.locked
|
||||
L["[com.id] (Active)"] = com.teleport_control.locked
|
||||
else
|
||||
L["[com.id] (Inactive)"] = com.locked
|
||||
L["[com.id] (Inactive)"] = com.teleport_control.locked
|
||||
var/list/turfs = list( )
|
||||
for(var/turf/T in orange(10))
|
||||
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
var/list/tools = list()
|
||||
var/current_tool = 1
|
||||
|
||||
/obj/item/weapon/combitool/examine()
|
||||
..()
|
||||
if(loc == usr && tools.len)
|
||||
to_chat(usr, "It has the following fittings:")
|
||||
/obj/item/weapon/combitool/examine(mob/user)
|
||||
. = ..()
|
||||
if(loc == user && tools.len)
|
||||
. += "It has the following fittings:"
|
||||
for(var/obj/item/tool in tools)
|
||||
to_chat(usr, "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
|
||||
. += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
|
||||
|
||||
/obj/item/weapon/combitool/New()
|
||||
..()
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/weldingtool/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(max_fuel)
|
||||
to_chat(user, "[bicon(src)] The [src.name] contains [get_fuel()]/[src.max_fuel] units of fuel!")
|
||||
. = ..()
|
||||
if(max_fuel && loc == user)
|
||||
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
|
||||
if(ishuman(A) && user.a_intent == I_HELP)
|
||||
@@ -556,13 +556,12 @@
|
||||
return power_supply
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/examine(mob/user)
|
||||
if(get_dist(src, user) > 1)
|
||||
to_chat(user, desc)
|
||||
else
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(power_supply)
|
||||
to_chat(user, "[bicon(src)] The [src.name] has [get_fuel()] charge left.")
|
||||
. += "It [src.name] has [get_fuel()] charge left."
|
||||
else
|
||||
to_chat(user, "[bicon(src)] The [src.name] has no power cell!")
|
||||
. += "It [src.name] has no power cell!"
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/get_fuel()
|
||||
if(use_external_power)
|
||||
|
||||
@@ -144,9 +144,8 @@
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
/obj/item/weapon/weldpack/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "[bicon(src)] [src.reagents.total_volume] units of fuel left!")
|
||||
return
|
||||
. = ..()
|
||||
. += "It has [src.reagents.total_volume] units of fuel left!"
|
||||
|
||||
/obj/item/weapon/weldpack/survival
|
||||
name = "emergency welding kit"
|
||||
|
||||
@@ -400,4 +400,136 @@
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
|
||||
/obj/item/weapon/storage/box/shotgunammo
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
// Not strictly a gun, but is used in PoIs to spawn the dropped guns of mercs, or a busted version.
|
||||
/obj/random/projectile/scrapped_gun
|
||||
name = "broken gun spawner"
|
||||
desc = "Spawns a random broken gun, or rarely a fully functional one."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_gun/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/random/projectile/scrapped_pistol = 10,
|
||||
/obj/random/projectile/scrapped_smg = 5,
|
||||
/obj/random/projectile/scrapped_laser = 5,
|
||||
/obj/random/projectile/scrapped_shotgun = 3,
|
||||
/obj/random/projectile/scrapped_ionrifle = 3,
|
||||
/obj/random/projectile/scrapped_bulldog = 1,
|
||||
/obj/random/projectile/scrapped_flechette = 1,
|
||||
/obj/random/projectile/scrapped_grenadelauncher = 1,
|
||||
/obj/random/projectile/scrapped_dartgun = 1
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_shotgun
|
||||
name = "broken shotgun spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "shotgun"
|
||||
|
||||
/obj/random/projectile/scrapped_shotgun/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/pumpshotgun = 10,
|
||||
/obj/item/weapon/broken_gun/pumpshotgun_combat = 5,
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump = 3,
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat = 1
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_smg
|
||||
name = "broken smg spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_smg/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/c20r = 10,
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_pistol
|
||||
name = "broken pistol spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_pistol/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/silenced45 = 10,
|
||||
/obj/item/weapon/gun/projectile/silenced = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_laser
|
||||
name = "broken laser spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_laser/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/laserrifle = 10,
|
||||
/obj/item/weapon/broken_gun/laser_retro = 5,
|
||||
/obj/item/weapon/gun/energy/laser = 3,
|
||||
/obj/item/weapon/gun/energy/retro = 1
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_ionrifle
|
||||
name = "broken ionrifle spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_ionrifle/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/ionrifle = 10,
|
||||
/obj/item/weapon/gun/energy/ionrifle = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_bulldog
|
||||
name = "broken z8 spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_bulldog/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/z8 = 10,
|
||||
/obj/item/weapon/gun/projectile/automatic/z8 = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_flechette
|
||||
name = "broken flechette spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_flechette/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/flechette = 10,
|
||||
/obj/item/weapon/gun/magnetic/railgun/flechette = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_grenadelauncher
|
||||
name = "broken grenadelauncher spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_grenadelauncher/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/grenadelauncher = 10,
|
||||
/obj/item/weapon/gun/launcher/grenade = 3
|
||||
))
|
||||
|
||||
/obj/random/projectile/scrapped_dartgun
|
||||
name = "broken dartgun spawner"
|
||||
desc = "Loot for PoIs, or their mobs."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
|
||||
/obj/random/projectile/scrapped_dartgun/item_to_spawn()
|
||||
return pickweight(list(
|
||||
/obj/item/weapon/broken_gun/dartgun = 10,
|
||||
/obj/item/weapon/gun/projectile/dartgun = 3
|
||||
))
|
||||
|
||||
@@ -700,3 +700,16 @@
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/packet/crayon/purple,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/packet/crayon/grey,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/small/packet/crayon/brown)
|
||||
|
||||
/obj/random/thermalponcho
|
||||
name = "random thermal poncho"
|
||||
desc = "This is a thermal poncho spawn."
|
||||
icon = 'icons/obj/clothing/ties.dmi'
|
||||
icon_state = "classicponcho"
|
||||
|
||||
/obj/random/thermalponcho/item_to_spawn()
|
||||
return pick(prob(5);/obj/item/clothing/accessory/poncho/thermal,
|
||||
prob(3);/obj/item/clothing/accessory/poncho/thermal/red,
|
||||
prob(3);/obj/item/clothing/accessory/poncho/thermal/green,
|
||||
prob(3);/obj/item/clothing/accessory/poncho/thermal/purple,
|
||||
prob(3);/obj/item/clothing/accessory/poncho/thermal/blue)
|
||||
|
||||
@@ -104,6 +104,15 @@
|
||||
prob(33);/mob/living/simple_mob/animal/giant_spider/frost,
|
||||
prob(45);/mob/living/simple_mob/animal/sif/shantak)
|
||||
|
||||
/obj/random/mob/sif/kururak
|
||||
name = "Random Kururak"
|
||||
desc = "This is a random kururak, either waking or hibernating. Will be hostile if more than one are waking."
|
||||
icon_state = "frost"
|
||||
|
||||
/obj/random/mob/sif/kururak/item_to_spawn()
|
||||
return pick(prob(1);/mob/living/simple_mob/animal/sif/kururak/hibernate,
|
||||
prob(20);/mob/living/simple_mob/animal/sif/kururak)
|
||||
|
||||
/obj/random/mob/spider
|
||||
name = "Random Spider" //Spiders should patrol where they spawn.
|
||||
desc = "This is a random boring spider."
|
||||
@@ -163,6 +172,7 @@
|
||||
/obj/random/mob/robotic/item_to_spawn() //Hivebots have a total number of 'lots' equal to the lesser drone, at 60.
|
||||
return pick(prob(60);/mob/living/simple_mob/mechanical/combat_drone/lesser,
|
||||
prob(50);/mob/living/simple_mob/mechanical/combat_drone,
|
||||
prob(50);/mob/living/simple_mob/mechanical/mining_drone,
|
||||
prob(15);/mob/living/simple_mob/mechanical/mecha/ripley,
|
||||
prob(15);/mob/living/simple_mob/mechanical/mecha/odysseus,
|
||||
prob(10);/mob/living/simple_mob/mechanical/hivebot,
|
||||
@@ -174,6 +184,25 @@
|
||||
prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong,
|
||||
prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong/guard)
|
||||
|
||||
/obj/random/mob/robotic/drone
|
||||
name = "Random Drone"
|
||||
desc = "This is a random drone."
|
||||
icon_state = "drone_dead"
|
||||
|
||||
overwrite_hostility = 1
|
||||
|
||||
mob_faction = "malf_drone"
|
||||
mob_returns_home = 1
|
||||
mob_wander = 1
|
||||
mob_wander_distance = 5
|
||||
mob_hostile = 1
|
||||
mob_retaliate = 1
|
||||
|
||||
/obj/random/mob/robotic/drone/item_to_spawn()
|
||||
return pick(prob(6);/mob/living/simple_mob/mechanical/combat_drone/lesser,
|
||||
prob(1);/mob/living/simple_mob/mechanical/combat_drone,
|
||||
prob(3);/mob/living/simple_mob/mechanical/mining_drone)
|
||||
|
||||
/obj/random/mob/robotic/hivebot
|
||||
name = "Random Hivebot"
|
||||
desc = "This is a random hivebot."
|
||||
@@ -203,3 +232,129 @@
|
||||
prob(30);/mob/living/simple_mob/animal/passive/mouse/brown,
|
||||
prob(30);/mob/living/simple_mob/animal/passive/mouse/gray,
|
||||
prob(25);/obj/random/mouseremains) //because figuring out how to come up with it picking nothing is beyond my coding ability.
|
||||
|
||||
// Mercs
|
||||
/obj/random/mob/merc
|
||||
name = "Random Mercenary"
|
||||
desc = "This is a random PoI mercenary."
|
||||
icon_state = "syndicate"
|
||||
|
||||
mob_faction = "syndicate"
|
||||
mob_returns_home = 1
|
||||
mob_wander_distance = 7 // People like to wander, and these people probably have a lot of stuff to guard.
|
||||
|
||||
/obj/random/mob/merc/item_to_spawn()
|
||||
return pick(prob(60);/mob/living/simple_mob/humanoid/merc/melee/poi,
|
||||
prob(40);/mob/living/simple_mob/humanoid/merc/melee/sword/poi,
|
||||
prob(40);/mob/living/simple_mob/humanoid/merc/ranged/poi,
|
||||
prob(30);/mob/living/simple_mob/humanoid/merc/ranged/smg/poi,
|
||||
prob(20);/mob/living/simple_mob/humanoid/merc/ranged/laser/poi,
|
||||
prob(5);/mob/living/simple_mob/humanoid/merc/ranged/ionrifle/poi,
|
||||
prob(10);/mob/living/simple_mob/humanoid/merc/ranged/grenadier/poi,
|
||||
prob(10);/mob/living/simple_mob/humanoid/merc/ranged/rifle/poi,
|
||||
prob(15);/mob/living/simple_mob/humanoid/merc/ranged/rifle/mag/poi,
|
||||
prob(10);/mob/living/simple_mob/humanoid/merc/ranged/technician/poi
|
||||
)
|
||||
|
||||
/obj/random/mob/merc/armored
|
||||
name = "Random Armored Infantry Merc"
|
||||
desc = "This is a random PoI exo or robot for mercs."
|
||||
icon_state = "drone3"
|
||||
|
||||
/obj/random/mob/merc/armored/item_to_spawn()
|
||||
return pick(prob(30);/mob/living/simple_mob/mechanical/mecha/combat/gygax/dark,
|
||||
prob(40);/mob/living/simple_mob/mechanical/mecha/combat/gygax/medgax,
|
||||
prob(40);/mob/living/simple_mob/mechanical/mecha/combat/gygax,
|
||||
prob(10);/mob/living/simple_mob/mechanical/mecha/combat/durand/defensive/mercenary,
|
||||
prob(60);/mob/living/simple_mob/mechanical/mecha/hoverpod/manned,
|
||||
prob(5);/mob/living/simple_mob/mechanical/mecha/combat/marauder,
|
||||
prob(1);/mob/living/simple_mob/mechanical/mecha/combat/marauder/seraph,
|
||||
prob(15);/mob/living/simple_mob/mechanical/mecha/odysseus/manned,
|
||||
prob(15);/mob/living/simple_mob/mechanical/mecha/odysseus/murdysseus/manned,
|
||||
prob(60);/mob/living/simple_mob/mechanical/mecha/ripley/manned
|
||||
)
|
||||
|
||||
/obj/random/mob/merc/all
|
||||
name = "Random Mercenary All"
|
||||
desc = "A random PoI mercenary, including armored."
|
||||
|
||||
/obj/random/mob/merc/all/item_to_spawn()
|
||||
return pick(prob(20);/obj/random/mob/merc,
|
||||
prob(1);/obj/random/mob/merc/armored
|
||||
)
|
||||
|
||||
// Multiple mobs, one spawner.
|
||||
/obj/random/mob/multiple
|
||||
name = "Random Multiple Mob Spawner"
|
||||
desc = "A base multiple-mob spawner. Takes lists of lists."
|
||||
|
||||
/obj/random/mob/multiple/spawn_item()
|
||||
var/list/things_to_make = item_to_spawn()
|
||||
|
||||
for(var/new_type in things_to_make)
|
||||
|
||||
var/mob/living/simple_mob/M = new new_type(src.loc)
|
||||
|
||||
if(!istype(M))
|
||||
continue
|
||||
|
||||
if(M.has_AI())
|
||||
var/datum/ai_holder/AI = M.ai_holder
|
||||
AI.go_sleep() //Don't fight eachother while we're still setting up!
|
||||
AI.returns_home = mob_returns_home
|
||||
AI.wander = mob_wander
|
||||
AI.max_home_distance = mob_wander_distance
|
||||
if(overwrite_hostility)
|
||||
AI.hostile = mob_hostile
|
||||
AI.retaliate = mob_retaliate
|
||||
AI.go_wake() //Now you can kill eachother if your faction didn't override.
|
||||
|
||||
if(pixel_x || pixel_y)
|
||||
M.pixel_x = pixel_x
|
||||
M.pixel_y = pixel_y
|
||||
|
||||
/obj/random/mob/multiple/sifmobs
|
||||
name = "Random Sifmob Pack"
|
||||
desc = "A pack of random neutral sif mobs."
|
||||
|
||||
/obj/random/mob/multiple/sifmobs/item_to_spawn()
|
||||
return pick(
|
||||
prob(60);list(
|
||||
/mob/living/simple_mob/animal/sif/diyaab,
|
||||
/mob/living/simple_mob/animal/sif/diyaab,
|
||||
/mob/living/simple_mob/animal/sif/diyaab
|
||||
),
|
||||
prob(15);list(
|
||||
/mob/living/simple_mob/animal/sif/duck,
|
||||
/mob/living/simple_mob/animal/sif/duck,
|
||||
/mob/living/simple_mob/animal/sif/duck
|
||||
),
|
||||
prob(10);list(
|
||||
/mob/living/simple_mob/animal/sif/shantak/retaliate,
|
||||
/mob/living/simple_mob/animal/sif/shantak/retaliate,
|
||||
/mob/living/simple_mob/animal/sif/shantak/retaliate,
|
||||
/mob/living/simple_mob/animal/sif/shantak/leader/autofollow/retaliate
|
||||
),
|
||||
prob(5);list(
|
||||
/mob/living/simple_mob/animal/sif/kururak/leader,
|
||||
/mob/living/simple_mob/animal/sif/kururak,
|
||||
/mob/living/simple_mob/animal/sif/kururak
|
||||
),
|
||||
prob(5);list(
|
||||
/mob/living/simple_mob/animal/sif/glitterfly,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly,
|
||||
/mob/living/simple_mob/animal/sif/glitterfly
|
||||
),
|
||||
prob(1);list(
|
||||
/mob/living/simple_mob/animal/goat,
|
||||
/mob/living/simple_mob/animal/goat
|
||||
),
|
||||
prob(1);list(
|
||||
/mob/living/simple_mob/animal/sif/sakimm/intelligent,
|
||||
/mob/living/simple_mob/animal/sif/sakimm,
|
||||
/mob/living/simple_mob/animal/sif/sakimm,
|
||||
/mob/living/simple_mob/animal/sif/sakimm
|
||||
)
|
||||
)
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
. -= "Off"
|
||||
|
||||
/obj/structure/sign/double/barsign/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
switch(icon_state)
|
||||
if("Off")
|
||||
to_chat(user, "It appears to be switched off.")
|
||||
. += "It appears to be switched off."
|
||||
if("narsiebistro")
|
||||
to_chat(user, "It shows a picture of a large black and red being. Spooky!")
|
||||
. += "It shows a picture of a large black and red being. Spooky!"
|
||||
if("on", "empty")
|
||||
to_chat(user, "The lights are on, but there's no picture.")
|
||||
. += "The lights are on, but there's no picture."
|
||||
else
|
||||
to_chat(user, "It says '[icon_state]'")
|
||||
. += "It says '[icon_state]'"
|
||||
|
||||
/obj/structure/sign/double/barsign/New()
|
||||
..()
|
||||
|
||||
@@ -170,16 +170,14 @@ LINEN BINS
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
|
||||
if(amount < 1)
|
||||
to_chat(user, "There are no bed sheets in the bin.")
|
||||
return
|
||||
if(amount == 1)
|
||||
to_chat(user, "There is one bed sheet in the bin.")
|
||||
return
|
||||
to_chat(user, "There are [amount] bed sheets in the bin.")
|
||||
|
||||
. += "There are no bed sheets in the bin."
|
||||
else if(amount == 1)
|
||||
. += "There is one bed sheet in the bin."
|
||||
else
|
||||
. += "There are [amount] bed sheets in the bin."
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
switch(amount)
|
||||
|
||||
@@ -57,24 +57,25 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
if(!src.opened && (..(user, 1) || isobserver(user)))
|
||||
. = ..()
|
||||
if(Adjacent(user) || isobserver(user))
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += CEILING(I.w_class/2, 1)
|
||||
if(!content_size)
|
||||
to_chat(user, "It is empty.")
|
||||
. += "It is empty."
|
||||
else if(storage_capacity > content_size*4)
|
||||
to_chat(user, "It is barely filled.")
|
||||
. += "It is barely filled."
|
||||
else if(storage_capacity > content_size*2)
|
||||
to_chat(user, "It is less than half full.")
|
||||
. += "It is less than half full."
|
||||
else if(storage_capacity > content_size)
|
||||
to_chat(user, "There is still some free space.")
|
||||
. += "There is still some free space."
|
||||
else
|
||||
to_chat(user, "It is full.")
|
||||
. += "It is full."
|
||||
|
||||
if(!src.opened && isobserver(user))
|
||||
to_chat(user, "It contains: [counting_english_list(contents)]")
|
||||
. += "It contains: [counting_english_list(contents)]"
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
if(wall_mounted)
|
||||
|
||||
@@ -161,4 +161,7 @@
|
||||
var/datum/gas_mixture/above_air = return_air()
|
||||
grave_breath.adjust_gas(gasid, BREATH_MOLES)
|
||||
grave_breath.temperature = (above_air.temperature) - 30 //Underground
|
||||
return grave_breath
|
||||
return grave_breath
|
||||
|
||||
/obj/structure/closet/grave/dirthole
|
||||
name = "hole"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
var/paint_color = "#666666"
|
||||
|
||||
/obj/structure/vehiclecage/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(my_vehicle)
|
||||
to_chat(user, "<span class='notice'>It seems to contain \the [my_vehicle].</span>")
|
||||
. += "<span class='notice'>It seems to contain \the [my_vehicle].</span>"
|
||||
|
||||
/obj/structure/vehiclecage/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
switch(hole_size)
|
||||
if(MEDIUM_HOLE)
|
||||
user.show_message("There is a large hole in \the [src].")
|
||||
. += "There is a large hole in it."
|
||||
if(LARGE_HOLE)
|
||||
user.show_message("\The [src] has been completely cut through.")
|
||||
. += "It has been completely cut through."
|
||||
|
||||
/obj/structure/fence/get_description_interaction()
|
||||
var/list/results = list()
|
||||
|
||||
+493
-478
@@ -1,478 +1,493 @@
|
||||
|
||||
/obj/structure/flora
|
||||
name = "flora"
|
||||
desc = "A perfectly generic plant."
|
||||
|
||||
anchored = TRUE // Usually, plants don't move. Usually.
|
||||
plane = DECAL_PLANE
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
var/randomize_size = FALSE
|
||||
var/max_x_scale = 1.25
|
||||
var/max_y_scale = 1.25
|
||||
var/min_x_scale = 0.9
|
||||
var/min_y_scale = 0.9
|
||||
|
||||
var/harvest_tool = null // The type of item used to harvest the plant.
|
||||
var/harvest_count = 0
|
||||
|
||||
var/randomize_harvest_count = TRUE
|
||||
var/max_harvests = 0
|
||||
var/min_harvests = -1
|
||||
var/list/harvest_loot = null // Should be an associative list for things to spawn, and their weights. An example would be a branch from a tree.
|
||||
|
||||
/obj/structure/flora/Initialize()
|
||||
..()
|
||||
|
||||
if(randomize_size)
|
||||
icon_scale_x = rand(min_x_scale * 100, max_x_scale * 100) / 100
|
||||
icon_scale_y = rand(min_y_scale * 100, max_y_scale * 100) / 100
|
||||
|
||||
if(prob(50))
|
||||
icon_scale_x *= -1
|
||||
update_transform()
|
||||
|
||||
if(randomize_harvest_count)
|
||||
max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value.
|
||||
|
||||
/obj/structure/flora/examine(mob/user)
|
||||
. = ..(user)
|
||||
if(harvest_count < max_harvests)
|
||||
to_chat(user, "<span class='notice'>\The [src] seems to have something hanging from it.</span>")
|
||||
|
||||
/obj/structure/flora/attackby(var/obj/item/weapon/W, var/mob/living/user)
|
||||
if(can_harvest(W))
|
||||
var/harvest_spawn = pickweight(harvest_loot)
|
||||
var/atom/movable/AM = spawn_harvest(harvest_spawn, user)
|
||||
|
||||
if(!AM)
|
||||
to_chat(user, "<span class='notice'>You fail to harvest anything from \the [src].</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You harvest \the [AM] from \the [src].</span>")
|
||||
return
|
||||
|
||||
..(W, user)
|
||||
|
||||
/obj/structure/flora/proc/can_harvest(var/obj/item/I)
|
||||
. = FALSE
|
||||
if(harvest_tool && istype(I, harvest_tool) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
. = TRUE
|
||||
return .
|
||||
|
||||
/obj/structure/flora/proc/spawn_harvest(var/path = null, var/mob/user = null)
|
||||
if(!ispath(path))
|
||||
return 0
|
||||
var/turf/Target = get_turf(src)
|
||||
if(user)
|
||||
Target = get_turf(user)
|
||||
|
||||
var/atom/movable/AM = new path(Target)
|
||||
|
||||
harvest_count++
|
||||
return AM
|
||||
|
||||
//bushes
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
|
||||
/obj/structure/flora/bush/New()
|
||||
..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
/obj/structure/flora/pottedplant
|
||||
name = "potted plant"
|
||||
desc = "Really ties the room together."
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
|
||||
anchored = FALSE
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/ausflora.dmi'
|
||||
icon_state = "firstbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
icon_state = "firstbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush
|
||||
icon_state = "reedbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush/New()
|
||||
..()
|
||||
icon_state = "reedbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush
|
||||
icon_state = "leafybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush/New()
|
||||
..()
|
||||
icon_state = "leafybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush
|
||||
icon_state = "palebush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush/New()
|
||||
..()
|
||||
icon_state = "palebush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush
|
||||
icon_state = "stalkybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush/New()
|
||||
..()
|
||||
icon_state = "stalkybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush
|
||||
icon_state = "grassybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush/New()
|
||||
..()
|
||||
icon_state = "grassybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush
|
||||
icon_state = "fernybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush/New()
|
||||
..()
|
||||
icon_state = "fernybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush
|
||||
icon_state = "sunnybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush/New()
|
||||
..()
|
||||
icon_state = "sunnybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush
|
||||
icon_state = "genericbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush/New()
|
||||
..()
|
||||
icon_state = "genericbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush
|
||||
icon_state = "pointybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush/New()
|
||||
..()
|
||||
icon_state = "pointybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass
|
||||
icon_state = "lavendergrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass/New()
|
||||
..()
|
||||
icon_state = "lavendergrass_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers
|
||||
icon_state = "ywflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers/New()
|
||||
..()
|
||||
icon_state = "ywflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers
|
||||
icon_state = "brflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers/New()
|
||||
..()
|
||||
icon_state = "brflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers
|
||||
icon_state = "ppflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers/New()
|
||||
..()
|
||||
icon_state = "ppflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass
|
||||
icon_state = "sparsegrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass/New()
|
||||
..()
|
||||
icon_state = "sparsegrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass
|
||||
icon_state = "fullgrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass/New()
|
||||
..()
|
||||
icon_state = "fullgrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/skeleton
|
||||
name = "hanging skeleton model"
|
||||
icon = 'icons/obj/plants.dmi' //what an interesting plant
|
||||
icon_state = "hangskele"
|
||||
desc = "It's an anatomical model of a human skeletal system made of plaster."
|
||||
|
||||
plane = OBJ_PLANE
|
||||
|
||||
//potted plants credit: Flashkirby
|
||||
/obj/structure/flora/pottedplant
|
||||
name = "potted plant"
|
||||
desc = "Really brings the room together."
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-01"
|
||||
|
||||
plane = OBJ_PLANE
|
||||
var/obj/item/stored_item
|
||||
|
||||
/obj/structure/flora/pottedplant/examine(mob/user)
|
||||
..()
|
||||
if(in_range(user, src) && stored_item)
|
||||
to_chat(user, "<i>You can see something in there...</i>")
|
||||
|
||||
/obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user)
|
||||
if(stored_item)
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in. There already appears to be something in here...</span>")
|
||||
return
|
||||
|
||||
if(I.w_class > ITEMSIZE_TINY)
|
||||
to_chat(user, "<span class='notice'>[I] is too big to fit inside [src].</span>")
|
||||
return
|
||||
|
||||
if(do_after(user, 10))
|
||||
user.drop_from_inventory(I, src)
|
||||
I.forceMove(src)
|
||||
stored_item = I
|
||||
src.visible_message("\icon[src] \icon[I] [user] places [I] into [src].")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You refrain from putting things into the plant pot.</span>")
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/flora/pottedplant/attack_hand(mob/user)
|
||||
if(!stored_item)
|
||||
to_chat(user, "<b>You see nothing of interest in [src]...</b>")
|
||||
else
|
||||
if(do_after(user, 10))
|
||||
to_chat(user, "You find \icon[stored_item] [stored_item] in [src]!")
|
||||
stored_item.forceMove(get_turf(src))
|
||||
stored_item = null
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/flora/pottedplant/large
|
||||
name = "large potted plant"
|
||||
desc = "This is a large plant. Three branches support pairs of waxy leaves."
|
||||
icon_state = "plant-26"
|
||||
|
||||
/obj/structure/flora/pottedplant/fern
|
||||
name = "potted fern"
|
||||
desc = "This is an ordinary looking fern. It looks like it could do with some water."
|
||||
icon_state = "plant-02"
|
||||
|
||||
/obj/structure/flora/pottedplant/overgrown
|
||||
name = "overgrown potted plants"
|
||||
desc = "This is an assortment of colourful plants. Some parts are overgrown."
|
||||
icon_state = "plant-03"
|
||||
|
||||
/obj/structure/flora/pottedplant/bamboo
|
||||
name = "potted bamboo"
|
||||
desc = "These are bamboo shoots. The tops looks like they've been cut short."
|
||||
icon_state = "plant-04"
|
||||
|
||||
/obj/structure/flora/pottedplant/largebush
|
||||
name = "large potted bush"
|
||||
desc = "This is a large bush. The leaves stick upwards in an odd fashion."
|
||||
icon_state = "plant-05"
|
||||
|
||||
/obj/structure/flora/pottedplant/thinbush
|
||||
name = "thin potted bush"
|
||||
desc = "This is a thin bush. It appears to be flowering."
|
||||
icon_state = "plant-06"
|
||||
|
||||
/obj/structure/flora/pottedplant/mysterious
|
||||
name = "mysterious potted bulbs"
|
||||
desc = "This is a mysterious looking plant. Touching the bulbs cause them to shrink."
|
||||
icon_state = "plant-07"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/eyebulbs)
|
||||
|
||||
/obj/structure/flora/pottedplant/smalltree
|
||||
name = "small potted tree"
|
||||
desc = "This is a small tree. It is rather pleasant."
|
||||
icon_state = "plant-08"
|
||||
|
||||
/obj/structure/flora/pottedplant/unusual
|
||||
name = "unusual potted plant"
|
||||
desc = "This is an unusual plant. It's bulbous ends emit a soft blue light."
|
||||
icon_state = "plant-09"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#33CCFF"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/sif_tree)
|
||||
|
||||
/obj/structure/flora/pottedplant/orientaltree
|
||||
name = "potted oriental tree"
|
||||
desc = "This is a rather oriental style tree. Its flowers are bright pink."
|
||||
icon_state = "plant-10"
|
||||
|
||||
/obj/structure/flora/pottedplant/smallcactus
|
||||
name = "small potted cactus"
|
||||
desc = "This is a small cactus. Its needles are sharp."
|
||||
icon_state = "plant-11"
|
||||
|
||||
/obj/structure/flora/pottedplant/tall
|
||||
name = "tall potted plant"
|
||||
desc = "This is a tall plant. Tiny pores line its surface."
|
||||
icon_state = "plant-12"
|
||||
|
||||
/obj/structure/flora/pottedplant/sticky
|
||||
name = "sticky potted plant"
|
||||
desc = "This is an odd plant. Its sticky leaves trap insects."
|
||||
icon_state = "plant-13"
|
||||
|
||||
/obj/structure/flora/pottedplant/smelly
|
||||
name = "smelly potted plant"
|
||||
desc = "This is some kind of tropical plant. It reeks of rotten eggs."
|
||||
icon_state = "plant-14"
|
||||
|
||||
/obj/structure/flora/pottedplant/small
|
||||
name = "small potted plant"
|
||||
desc = "This is a pot of assorted small flora. Some look familiar."
|
||||
icon_state = "plant-15"
|
||||
|
||||
/obj/structure/flora/pottedplant/aquatic
|
||||
name = "aquatic potted plant"
|
||||
desc = "This is apparently an aquatic plant. It's probably fake."
|
||||
icon_state = "plant-16"
|
||||
|
||||
/obj/structure/flora/pottedplant/shoot
|
||||
name = "small potted shoot"
|
||||
desc = "This is a small shoot. It still needs time to grow."
|
||||
icon_state = "plant-17"
|
||||
|
||||
/obj/structure/flora/pottedplant/flower
|
||||
name = "potted flower"
|
||||
desc = "This is a slim plant. Sweet smelling flowers are supported by spindly stems."
|
||||
icon_state = "plant-18"
|
||||
|
||||
/obj/structure/flora/pottedplant/crystal
|
||||
name = "crystalline potted plant"
|
||||
desc = "These are rather cubic plants. Odd crystal formations grow on the end."
|
||||
icon_state = "plant-19"
|
||||
|
||||
/obj/structure/flora/pottedplant/subterranean
|
||||
name = "subterranean potted plant"
|
||||
desc = "This is a subterranean plant. It's bulbous ends glow faintly."
|
||||
icon_state = "plant-20"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#FF6633"
|
||||
|
||||
/obj/structure/flora/pottedplant/minitree
|
||||
name = "potted tree"
|
||||
desc = "This is a miniature tree. Apparently it was grown to 1/5 scale."
|
||||
icon_state = "plant-21"
|
||||
|
||||
/obj/structure/flora/pottedplant/stoutbush
|
||||
name = "stout potted bush"
|
||||
desc = "This is a stout bush. Its leaves point up and outwards."
|
||||
icon_state = "plant-22"
|
||||
|
||||
/obj/structure/flora/pottedplant/drooping
|
||||
name = "drooping potted plant"
|
||||
desc = "This is a small plant. The drooping leaves make it look like its wilted."
|
||||
icon_state = "plant-23"
|
||||
|
||||
/obj/structure/flora/pottedplant/tropical
|
||||
name = "tropical potted plant"
|
||||
desc = "This is some kind of tropical plant. It hasn't begun to flower yet."
|
||||
icon_state = "plant-24"
|
||||
|
||||
/obj/structure/flora/pottedplant/dead
|
||||
name = "dead potted plant"
|
||||
desc = "This is the dried up remains of a dead plant. Someone should replace it."
|
||||
icon_state = "plant-25"
|
||||
|
||||
/obj/structure/flora/pottedplant/decorative
|
||||
name = "decorative potted plant"
|
||||
desc = "This is a decorative shrub. It's been trimmed into the shape of an apple."
|
||||
icon_state = "applebush"
|
||||
|
||||
/obj/structure/flora/pottedplant/xmas
|
||||
name = "small christmas tree"
|
||||
desc = "This is a tiny well lit decorative christmas tree."
|
||||
icon_state = "plant-xmas"
|
||||
|
||||
/obj/structure/flora/sif
|
||||
icon = 'icons/obj/flora/sifflora.dmi'
|
||||
|
||||
/obj/structure/flora/sif/attack_hand(mob/user)
|
||||
if (user.a_intent == I_HURT)
|
||||
if(do_after(user, 5 SECONDS))
|
||||
user.visible_message("\The [user] digs up \the [src.name].", "You dig up \the [src.name].")
|
||||
qdel(src)
|
||||
else
|
||||
user.visible_message("\The [user] pokes \the [src.name].", "You poke \the [src.name].")
|
||||
|
||||
/datum/category_item/catalogue/flora/subterranean_bulbs
|
||||
name = "Sivian Flora - Subterranean Bulbs"
|
||||
desc = "A plant which is native to Sif, it continues the trend of being a bioluminescent specimen. These plants \
|
||||
are generally suited for conditions experienced in caverns, which are generally dark and cold. It is not \
|
||||
known why this plant evolved to be bioluminescent, however this property has, unintentionally, allowed for \
|
||||
it to spread much farther than before, with the assistance of humans.\
|
||||
<br><br>\
|
||||
In Sif's early history, Sivian settlers found this plant while they were establishing mines. Their ability \
|
||||
to emit low, but consistant amounts of light made them desirable to the settlers. They would often cultivate \
|
||||
this plant inside man-made tunnels and mines to act as a backup source of light that would not need \
|
||||
electricity. This technique has saved many lost miners, and this practice continues to this day."
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/subterranean
|
||||
name = "subterranean plant"
|
||||
desc = "This is a subterranean plant. It's bulbous ends glow faintly."
|
||||
icon_state = "glowplant"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#FF6633"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/subterranean_bulbs)
|
||||
|
||||
/obj/structure/flora/sif/subterranean/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,2)]"
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/category_item/catalogue/flora/eyebulbs
|
||||
name = "Sivian Flora - Eyebulbs"
|
||||
desc = "A plant native to Sif. On the end of its stems are bulbs which visually resemble \
|
||||
eyes, which shrink when touched. One theory is that the bulbs are a result of mimicry, appearing as eyeballs to protect from predators.<br><br>\
|
||||
These plants have no known use."
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/eyes
|
||||
name = "mysterious bulbs"
|
||||
desc = "This is a mysterious looking plant. They kind of look like eyeballs. Creepy."
|
||||
icon_state = "eyeplant"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/eyebulbs)
|
||||
|
||||
/obj/structure/flora/sif/eyes/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
. = ..()
|
||||
|
||||
/datum/category_item/catalogue/flora/mosstendrils
|
||||
name = "Sivian Flora - Moss Stalks"
|
||||
desc = "A plant native to Sif. The plant is most closely related to the common, dense moss found covering Sif's terrain. \
|
||||
It has evolved a method of camouflage utilizing white hairs on its dorsal sides to make it appear as a small mound of snow from \
|
||||
above. It has no known use, though it is a common furnishing in contemporary homes."
|
||||
value = CATALOGUER_REWARD_TRIVIAL
|
||||
|
||||
/obj/structure/flora/sif/tendrils
|
||||
name = "stocky tendrils"
|
||||
desc = "A 'plant' made up of hardened moss. It has tiny hairs that bunch together to look like snow."
|
||||
icon_state = "grass"
|
||||
randomize_size = TRUE
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/mosstendrils)
|
||||
|
||||
/obj/structure/flora/sif/tendrils/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/flora
|
||||
name = "flora"
|
||||
desc = "A perfectly generic plant."
|
||||
|
||||
anchored = TRUE // Usually, plants don't move. Usually.
|
||||
plane = DECAL_PLANE
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
var/randomize_size = FALSE
|
||||
var/max_x_scale = 1.25
|
||||
var/max_y_scale = 1.25
|
||||
var/min_x_scale = 0.9
|
||||
var/min_y_scale = 0.9
|
||||
|
||||
var/harvest_tool = null // The type of item used to harvest the plant.
|
||||
var/harvest_count = 0
|
||||
|
||||
var/randomize_harvest_count = TRUE
|
||||
var/max_harvests = 0
|
||||
var/min_harvests = -1
|
||||
var/list/harvest_loot = null // Should be an associative list for things to spawn, and their weights. An example would be a branch from a tree.
|
||||
|
||||
/obj/structure/flora/Initialize()
|
||||
..()
|
||||
|
||||
if(randomize_size)
|
||||
icon_scale_x = rand(min_x_scale * 100, max_x_scale * 100) / 100
|
||||
icon_scale_y = rand(min_y_scale * 100, max_y_scale * 100) / 100
|
||||
|
||||
if(prob(50))
|
||||
icon_scale_x *= -1
|
||||
update_transform()
|
||||
|
||||
if(randomize_harvest_count)
|
||||
max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value.
|
||||
|
||||
/obj/structure/flora/examine(mob/user)
|
||||
. = ..()
|
||||
if(harvest_count < max_harvests)
|
||||
. += get_harvestable_desc()
|
||||
|
||||
/obj/structure/flora/proc/get_harvestable_desc()
|
||||
return "<span class='notice'>\The [src] seems to have something hanging from it.</span>"
|
||||
|
||||
/obj/structure/flora/attackby(var/obj/item/weapon/W, var/mob/living/user)
|
||||
if(can_harvest(W))
|
||||
var/harvest_spawn = pickweight(harvest_loot)
|
||||
var/atom/movable/AM = spawn_harvest(harvest_spawn, user)
|
||||
|
||||
if(!AM)
|
||||
to_chat(user, "<span class='notice'>You fail to harvest anything from \the [src].</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You harvest \the [AM] from \the [src].</span>")
|
||||
return
|
||||
|
||||
..(W, user)
|
||||
|
||||
/obj/structure/flora/proc/can_harvest(var/obj/item/I)
|
||||
. = FALSE
|
||||
if(harvest_tool && istype(I, harvest_tool) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
. = TRUE
|
||||
return .
|
||||
|
||||
/obj/structure/flora/proc/spawn_harvest(var/path = null, var/mob/user = null)
|
||||
if(!ispath(path))
|
||||
return 0
|
||||
var/turf/Target = get_turf(src)
|
||||
if(user)
|
||||
Target = get_turf(user)
|
||||
|
||||
var/atom/movable/AM = new path(Target)
|
||||
|
||||
harvest_count++
|
||||
return AM
|
||||
|
||||
//bushes
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
|
||||
/obj/structure/flora/bush/New()
|
||||
..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
/obj/structure/flora/pottedplant
|
||||
name = "potted plant"
|
||||
desc = "Really ties the room together."
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
|
||||
anchored = FALSE
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/ausflora.dmi'
|
||||
icon_state = "firstbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
icon_state = "firstbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush
|
||||
icon_state = "reedbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush/New()
|
||||
..()
|
||||
icon_state = "reedbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush
|
||||
icon_state = "leafybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush/New()
|
||||
..()
|
||||
icon_state = "leafybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush
|
||||
icon_state = "palebush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush/New()
|
||||
..()
|
||||
icon_state = "palebush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush
|
||||
icon_state = "stalkybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush/New()
|
||||
..()
|
||||
icon_state = "stalkybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush
|
||||
icon_state = "grassybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush/New()
|
||||
..()
|
||||
icon_state = "grassybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush
|
||||
icon_state = "fernybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush/New()
|
||||
..()
|
||||
icon_state = "fernybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush
|
||||
icon_state = "sunnybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush/New()
|
||||
..()
|
||||
icon_state = "sunnybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush
|
||||
icon_state = "genericbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush/New()
|
||||
..()
|
||||
icon_state = "genericbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush
|
||||
icon_state = "pointybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush/New()
|
||||
..()
|
||||
icon_state = "pointybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass
|
||||
icon_state = "lavendergrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass/New()
|
||||
..()
|
||||
icon_state = "lavendergrass_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers
|
||||
icon_state = "ywflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers/New()
|
||||
..()
|
||||
icon_state = "ywflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers
|
||||
icon_state = "brflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers/New()
|
||||
..()
|
||||
icon_state = "brflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers
|
||||
icon_state = "ppflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers/New()
|
||||
..()
|
||||
icon_state = "ppflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass
|
||||
icon_state = "sparsegrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass/New()
|
||||
..()
|
||||
icon_state = "sparsegrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass
|
||||
icon_state = "fullgrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass/New()
|
||||
..()
|
||||
icon_state = "fullgrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/skeleton
|
||||
name = "hanging skeleton model"
|
||||
icon = 'icons/obj/plants.dmi' //what an interesting plant
|
||||
icon_state = "hangskele"
|
||||
desc = "It's an anatomical model of a human skeletal system made of plaster."
|
||||
|
||||
plane = OBJ_PLANE
|
||||
|
||||
//potted plants credit: Flashkirby
|
||||
/obj/structure/flora/pottedplant
|
||||
name = "potted plant"
|
||||
desc = "Really brings the room together."
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-01"
|
||||
|
||||
plane = OBJ_PLANE
|
||||
var/obj/item/stored_item
|
||||
|
||||
/obj/structure/flora/pottedplant/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src) && stored_item)
|
||||
. += "<span class='filter_notice'><i>You can see something in there...</i></span>"
|
||||
|
||||
/obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user)
|
||||
if(stored_item)
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in. There already appears to be something in here...</span>")
|
||||
return
|
||||
|
||||
if(I.w_class > ITEMSIZE_TINY)
|
||||
to_chat(user, "<span class='notice'>[I] is too big to fit inside [src].</span>")
|
||||
return
|
||||
|
||||
if(do_after(user, 10))
|
||||
user.drop_from_inventory(I, src)
|
||||
I.forceMove(src)
|
||||
stored_item = I
|
||||
src.visible_message("[bicon(src)] [bicon(I)] [user] places [I] into [src].")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You refrain from putting things into the plant pot.</span>")
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/flora/pottedplant/attack_hand(mob/user)
|
||||
if(!stored_item)
|
||||
to_chat(user, "<span class='filter_notice'><b>You see nothing of interest in [src]...</b></span>")
|
||||
else
|
||||
if(do_after(user, 10))
|
||||
to_chat(user, "<span class='filter_notice'>You find [bicon(stored_item)] [stored_item] in [src]!</span>")
|
||||
stored_item.forceMove(get_turf(src))
|
||||
stored_item = null
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/flora/pottedplant/large
|
||||
name = "large potted plant"
|
||||
desc = "This is a large plant. Three branches support pairs of waxy leaves."
|
||||
icon_state = "plant-26"
|
||||
|
||||
/obj/structure/flora/pottedplant/fern
|
||||
name = "potted fern"
|
||||
desc = "This is an ordinary looking fern. It looks like it could do with some water."
|
||||
icon_state = "plant-02"
|
||||
|
||||
/obj/structure/flora/pottedplant/overgrown
|
||||
name = "overgrown potted plants"
|
||||
desc = "This is an assortment of colourful plants. Some parts are overgrown."
|
||||
icon_state = "plant-03"
|
||||
|
||||
/obj/structure/flora/pottedplant/bamboo
|
||||
name = "potted bamboo"
|
||||
desc = "These are bamboo shoots. The tops looks like they've been cut short."
|
||||
icon_state = "plant-04"
|
||||
|
||||
/obj/structure/flora/pottedplant/largebush
|
||||
name = "large potted bush"
|
||||
desc = "This is a large bush. The leaves stick upwards in an odd fashion."
|
||||
icon_state = "plant-05"
|
||||
|
||||
/obj/structure/flora/pottedplant/thinbush
|
||||
name = "thin potted bush"
|
||||
desc = "This is a thin bush. It appears to be flowering."
|
||||
icon_state = "plant-06"
|
||||
|
||||
/obj/structure/flora/pottedplant/mysterious
|
||||
name = "mysterious potted bulbs"
|
||||
desc = "This is a mysterious looking plant. Touching the bulbs cause them to shrink."
|
||||
icon_state = "plant-07"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/eyebulbs)
|
||||
|
||||
/obj/structure/flora/pottedplant/smalltree
|
||||
name = "small potted tree"
|
||||
desc = "This is a small tree. It is rather pleasant."
|
||||
icon_state = "plant-08"
|
||||
|
||||
/obj/structure/flora/pottedplant/unusual
|
||||
name = "unusual potted plant"
|
||||
desc = "This is an unusual plant. It's bulbous ends emit a soft blue light."
|
||||
icon_state = "plant-09"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#33CCFF"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/sif_tree)
|
||||
|
||||
/obj/structure/flora/pottedplant/orientaltree
|
||||
name = "potted oriental tree"
|
||||
desc = "This is a rather oriental style tree. Its flowers are bright pink."
|
||||
icon_state = "plant-10"
|
||||
|
||||
/obj/structure/flora/pottedplant/smallcactus
|
||||
name = "small potted cactus"
|
||||
desc = "This is a small cactus. Its needles are sharp."
|
||||
icon_state = "plant-11"
|
||||
|
||||
/obj/structure/flora/pottedplant/tall
|
||||
name = "tall potted plant"
|
||||
desc = "This is a tall plant. Tiny pores line its surface."
|
||||
icon_state = "plant-12"
|
||||
|
||||
/obj/structure/flora/pottedplant/sticky
|
||||
name = "sticky potted plant"
|
||||
desc = "This is an odd plant. Its sticky leaves trap insects."
|
||||
icon_state = "plant-13"
|
||||
|
||||
/obj/structure/flora/pottedplant/smelly
|
||||
name = "smelly potted plant"
|
||||
desc = "This is some kind of tropical plant. It reeks of rotten eggs."
|
||||
icon_state = "plant-14"
|
||||
|
||||
/obj/structure/flora/pottedplant/small
|
||||
name = "small potted plant"
|
||||
desc = "This is a pot of assorted small flora. Some look familiar."
|
||||
icon_state = "plant-15"
|
||||
|
||||
/obj/structure/flora/pottedplant/aquatic
|
||||
name = "aquatic potted plant"
|
||||
desc = "This is apparently an aquatic plant. It's probably fake."
|
||||
icon_state = "plant-16"
|
||||
|
||||
/obj/structure/flora/pottedplant/shoot
|
||||
name = "small potted shoot"
|
||||
desc = "This is a small shoot. It still needs time to grow."
|
||||
icon_state = "plant-17"
|
||||
|
||||
/obj/structure/flora/pottedplant/flower
|
||||
name = "potted flower"
|
||||
desc = "This is a slim plant. Sweet smelling flowers are supported by spindly stems."
|
||||
icon_state = "plant-18"
|
||||
|
||||
/obj/structure/flora/pottedplant/crystal
|
||||
name = "crystalline potted plant"
|
||||
desc = "These are rather cubic plants. Odd crystal formations grow on the end."
|
||||
icon_state = "plant-19"
|
||||
|
||||
/obj/structure/flora/pottedplant/subterranean
|
||||
name = "subterranean potted plant"
|
||||
desc = "This is a subterranean plant. It's bulbous ends glow faintly."
|
||||
icon_state = "plant-20"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#FF6633"
|
||||
|
||||
/obj/structure/flora/pottedplant/minitree
|
||||
name = "potted tree"
|
||||
desc = "This is a miniature tree. Apparently it was grown to 1/5 scale."
|
||||
icon_state = "plant-21"
|
||||
|
||||
/obj/structure/flora/pottedplant/stoutbush
|
||||
name = "stout potted bush"
|
||||
desc = "This is a stout bush. Its leaves point up and outwards."
|
||||
icon_state = "plant-22"
|
||||
|
||||
/obj/structure/flora/pottedplant/drooping
|
||||
name = "drooping potted plant"
|
||||
desc = "This is a small plant. The drooping leaves make it look like its wilted."
|
||||
icon_state = "plant-23"
|
||||
|
||||
/obj/structure/flora/pottedplant/tropical
|
||||
name = "tropical potted plant"
|
||||
desc = "This is some kind of tropical plant. It hasn't begun to flower yet."
|
||||
icon_state = "plant-24"
|
||||
|
||||
/obj/structure/flora/pottedplant/dead
|
||||
name = "dead potted plant"
|
||||
desc = "This is the dried up remains of a dead plant. Someone should replace it."
|
||||
icon_state = "plant-25"
|
||||
|
||||
/obj/structure/flora/pottedplant/decorative
|
||||
name = "decorative potted plant"
|
||||
desc = "This is a decorative shrub. It's been trimmed into the shape of an apple."
|
||||
icon_state = "applebush"
|
||||
|
||||
/obj/structure/flora/pottedplant/xmas
|
||||
name = "small christmas tree"
|
||||
desc = "This is a tiny well lit decorative christmas tree."
|
||||
icon_state = "plant-xmas"
|
||||
|
||||
/obj/structure/flora/sif
|
||||
icon = 'icons/obj/flora/sifflora.dmi'
|
||||
|
||||
/obj/structure/flora/sif/attack_hand(mob/user)
|
||||
if (user.a_intent == I_HURT)
|
||||
if(do_after(user, 5 SECONDS))
|
||||
user.visible_message("<span class='filter_notice'>\The [user] digs up \the [src.name].", "You dig up \the [src.name].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user.visible_message("<span class='filter_notice'>\The [user] pokes \the [src.name].", "You poke \the [src.name].</span>")
|
||||
|
||||
/datum/category_item/catalogue/flora/subterranean_bulbs
|
||||
name = "Sivian Flora - Subterranean Bulbs"
|
||||
desc = "A plant which is native to Sif, it continues the trend of being a bioluminescent specimen. These plants \
|
||||
are generally suited for conditions experienced in caverns, which are generally dark and cold. It is not \
|
||||
known why this plant evolved to be bioluminescent, however this property has, unintentionally, allowed for \
|
||||
it to spread much farther than before, with the assistance of humans.\
|
||||
<br><br>\
|
||||
In Sif's early history, Sivian settlers found this plant while they were establishing mines. Their ability \
|
||||
to emit low, but consistant amounts of light made them desirable to the settlers. They would often cultivate \
|
||||
this plant inside man-made tunnels and mines to act as a backup source of light that would not need \
|
||||
electricity. This technique has saved many lost miners, and this practice continues to this day."
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/subterranean
|
||||
name = "subterranean plant"
|
||||
desc = "This is a subterranean plant. It's bulbous ends glow faintly."
|
||||
icon_state = "glowplant"
|
||||
light_range = 2
|
||||
light_power = 0.6
|
||||
light_color = "#FF6633"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/subterranean_bulbs)
|
||||
|
||||
/obj/structure/flora/sif/subterranean/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,2)]"
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/category_item/catalogue/flora/eyebulbs
|
||||
name = "Sivian Flora - Eyebulbs"
|
||||
desc = "A plant native to Sif. On the end of its stems are bulbs which visually resemble \
|
||||
eyes, which shrink when touched. One theory is that the bulbs are a result of mimicry, appearing as eyeballs to protect from predators.<br><br>\
|
||||
These plants have no known use."
|
||||
value = CATALOGUER_REWARD_EASY
|
||||
|
||||
/obj/structure/flora/sif/eyes
|
||||
name = "mysterious bulbs"
|
||||
desc = "This is a mysterious looking plant. They kind of look like eyeballs. Creepy."
|
||||
icon_state = "eyeplant"
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/eyebulbs)
|
||||
|
||||
/obj/structure/flora/sif/eyes/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
. = ..()
|
||||
|
||||
/datum/category_item/catalogue/flora/mosstendrils
|
||||
name = "Sivian Flora - Moss Stalks"
|
||||
desc = "A plant native to Sif. The plant is most closely related to the common, dense moss found covering Sif's terrain. \
|
||||
It has evolved a method of camouflage utilizing white hairs on its dorsal sides to make it appear as a small mound of snow from \
|
||||
above. It has no known use, though it is a common furnishing in contemporary homes."
|
||||
value = CATALOGUER_REWARD_TRIVIAL
|
||||
|
||||
/obj/structure/flora/sif/tendrils
|
||||
name = "stocky tendrils"
|
||||
desc = "A 'plant' made up of hardened moss. It has tiny hairs that bunch together to look like snow."
|
||||
icon_state = "grass"
|
||||
randomize_size = TRUE
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/mosstendrils)
|
||||
|
||||
harvest_tool = /obj/item/weapon/material/knife
|
||||
max_harvests = 1
|
||||
min_harvests = -4
|
||||
harvest_loot = list(
|
||||
/obj/item/seeds/wabback = 15,
|
||||
/obj/item/seeds/blackwabback = 1,
|
||||
/obj/item/seeds/wildwabback = 30
|
||||
)
|
||||
|
||||
/obj/structure/flora/sif/tendrils/Initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/flora/sif/tendrils/get_harvestable_desc()
|
||||
return "<span class='notice'>\The [src] seems to be growing over something.</span>"
|
||||
@@ -11,7 +11,6 @@
|
||||
..()
|
||||
icon_state = "snowgrass[rand(1, 3)]bb"
|
||||
|
||||
|
||||
/obj/structure/flora/grass/green
|
||||
icon_state = "snowgrass1gb"
|
||||
|
||||
|
||||
@@ -273,7 +273,9 @@
|
||||
max_harvests = 2
|
||||
min_harvests = -4
|
||||
harvest_loot = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/siffruit = 5
|
||||
/obj/item/weapon/reagent_containers/food/snacks/siffruit = 20,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sifpod = 5,
|
||||
/obj/item/seeds/sifbulb = 1
|
||||
)
|
||||
|
||||
var/light_shift = 0
|
||||
|
||||
@@ -30,13 +30,11 @@
|
||||
color = material.icon_colour
|
||||
|
||||
/obj/structure/gravemarker/examine(mob/user)
|
||||
..()
|
||||
if(get_dist(src, user) < 4)
|
||||
if(grave_name)
|
||||
to_chat(user, "Here Lies [grave_name]")
|
||||
if(get_dist(src, user) < 2)
|
||||
if(epitaph)
|
||||
to_chat(user, epitaph)
|
||||
. = ..()
|
||||
if(grave_name && get_dist(src, user) < 4)
|
||||
. += "Here Lies [grave_name]"
|
||||
if(epitaph && get_dist(src, user) < 2)
|
||||
. += epitaph
|
||||
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
|
||||
@@ -24,10 +24,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of liquid!")
|
||||
//everything else is visible, so doesn't need to be mentioned
|
||||
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "It contains [reagents.total_volume] unit\s of liquid!"
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag)
|
||||
@@ -186,12 +185,11 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
to_chat(user, "[bicon(src)] This [callme] contains [reagents.total_volume] unit\s of water!")
|
||||
if(mybag)
|
||||
to_chat(user, "\A [mybag] is hanging on the [callme].")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "This [callme] contains [reagents.total_volume] unit\s of water!"
|
||||
if(mybag)
|
||||
. += "\A [mybag] is hanging on the [callme]."
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
|
||||
@@ -40,6 +40,10 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
|
||||
var/list/uncommon_loot = list() // Uncommon is actually maybe some useful items, usually the reason someone bothers looking inside.
|
||||
var/list/rare_loot = list() // Rare is really powerful, or at least unique items.
|
||||
|
||||
/obj/structure/loot_pile/attack_ai(var/mob/user)
|
||||
if(isrobot(user) && Adjacent(user))
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/loot_pile/attack_hand(mob/user)
|
||||
//Human mob
|
||||
if(isliving(user))
|
||||
@@ -351,8 +355,8 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
|
||||
/obj/item/weapon/circuitboard/atmos_alert,
|
||||
/obj/item/weapon/circuitboard/airalarm,
|
||||
/obj/item/weapon/circuitboard/fax,
|
||||
/obj/item/weapon/circuitboard/ghettosmes,
|
||||
/obj/item/weapon/circuitboard/jukebox,
|
||||
/obj/item/weapon/circuitboard/batteryrack,
|
||||
/obj/item/weapon/circuitboard/message_monitor,
|
||||
/obj/item/weapon/circuitboard/rcon_console,
|
||||
/obj/item/weapon/smes_coil,
|
||||
|
||||
@@ -17,8 +17,9 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
|
||||
..()
|
||||
|
||||
/obj/structure/mopbucket/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of water!")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "It contains [reagents.total_volume] unit\s of water!"
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
|
||||
@@ -51,21 +51,18 @@
|
||||
return
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(var/mob/user)
|
||||
examine(user)
|
||||
user.examinate(src)
|
||||
|
||||
// Since Topic() never seems to interact with usr on more than a superficial
|
||||
// level, it should be fine to let anyone mess with the board other than ghosts.
|
||||
/obj/structure/noticeboard/examine(var/mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
if(user.Adjacent(src))
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
to_chat(user, "<span class='warning'>It looks severely damaged!</span>")
|
||||
. += "<span class='warning'>It looks severely damaged!</span>"
|
||||
if(0.25 to 0.5)
|
||||
to_chat(user, "<span class='warning'>It looks damaged!</span>")
|
||||
. += "<span class='warning'>It looks damaged!</span>"
|
||||
if(0.5 to 1.0)
|
||||
to_chat(user, "<span class='notice'>It has a few scrapes and dents.</span>")
|
||||
. += "<span class='notice'>It has a few scrapes and dents.</span>"
|
||||
|
||||
/obj/structure/railing/take_damage(amount)
|
||||
health -= amount
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A window."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
density = 1
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
layer = WINDOW_LAYER
|
||||
@@ -25,27 +25,27 @@
|
||||
var/fulltile = FALSE // Set to true on full-tile variants.
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..(user)
|
||||
. = ..()
|
||||
|
||||
if(health == maxhealth)
|
||||
to_chat(user, "<span class='notice'>It looks fully intact.</span>")
|
||||
. += "<span class='notice'>It looks fully intact.</span>"
|
||||
else
|
||||
var/perc = health / maxhealth
|
||||
if(perc > 0.75)
|
||||
to_chat(user, "<span class='notice'>It has a few cracks.</span>")
|
||||
. += "<span class='notice'>It has a few cracks.</span>"
|
||||
else if(perc > 0.5)
|
||||
to_chat(user, "<span class='warning'>It looks slightly damaged.</span>")
|
||||
. += "<span class='warning'>It looks slightly damaged.</span>"
|
||||
else if(perc > 0.25)
|
||||
to_chat(user, "<span class='warning'>It looks moderately damaged.</span>")
|
||||
. += "<span class='warning'>It looks moderately damaged.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It looks heavily damaged.</span>")
|
||||
. += "<span class='danger'>It looks heavily damaged.</span>"
|
||||
if(silicate)
|
||||
if (silicate < 30)
|
||||
to_chat(user, "<span class='notice'>It has a thin layer of silicate.</span>")
|
||||
. += "<span class='notice'>It has a thin layer of silicate.</span>"
|
||||
else if (silicate < 70)
|
||||
to_chat(user, "<span class='notice'>It is covered in silicate.</span>")
|
||||
. += "<span class='notice'>It is covered in silicate.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is a thick layer of silicate covering it.</span>")
|
||||
. += "<span class='notice'>There is a thick layer of silicate covering it.</span>"
|
||||
|
||||
/obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1)
|
||||
var/initialhealth = health
|
||||
@@ -143,8 +143,8 @@
|
||||
|
||||
/obj/structure/window/CanZASPass(turf/T, is_zone)
|
||||
if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
|
||||
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES // If it's anchored, it'll block air.
|
||||
return ATMOS_PASS_YES // Don't stop airflow from the other sides.
|
||||
return !anchored // If it's anchored, it'll block air.
|
||||
return TRUE // Don't stop airflow from the other sides.
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
|
||||
Reference in New Issue
Block a user