/tg/ 4/14 (#367)

* outside code stuff

* defines, helpers, etc

* everything not module

* modules

* compiled fixes + missing sounds
This commit is contained in:
Poojawa
2017-04-14 23:28:04 -05:00
committed by GitHub
parent 884fb45516
commit 9e72b1b8fd
170 changed files with 4916 additions and 1221 deletions
+2 -2
View File
@@ -80,8 +80,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Asteroid - Artifact"
icon_state = "cave"
/area/asteroid/artifactroom/New()
..()
/area/asteroid/artifactroom/Initialize()
. = ..()
set_dynamic_lighting()
/area/planet/clown
+1 -1
View File
@@ -25,7 +25,7 @@
var/lightswitch = 1
var/requires_power = 1
var/always_unpowered = 0 // This gets overriden to 1 for space in area/New().
var/always_unpowered = 0 // This gets overriden to 1 for space in area/Initialize().
var/outdoors = 0 //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
+2 -2
View File
@@ -445,10 +445,10 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/ratvar_act()
return
/atom/proc/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/atom/proc/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
return FALSE
/atom/proc/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/atom/proc/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
return FALSE
/atom/proc/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
+1 -3
View File
@@ -162,9 +162,7 @@
used = 1
var/mob/dead/observer/theghost = pick(nuke_candidates)
spawn_antag(theghost.client, get_turf(src), "syndieborg")
var/datum/effect_system/spark_spread/S = new /datum/effect_system/spark_spread
S.set_up(4, 1, src)
S.start()
do_sparks(4, TRUE, src)
qdel(src)
else
to_chat(user, "<span class='warning'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>")
+2 -2
View File
@@ -15,7 +15,7 @@
var/point_rate = 2
/obj/structure/blob/core/New(loc, client/new_overmind = null, new_rate = 2, placed = 0)
/obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, new_rate = 2, placed = 0)
GLOB.blob_cores += src
START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
@@ -25,7 +25,7 @@
if(overmind)
update_icon()
point_rate = new_rate
..()
. = ..()
/obj/structure/blob/core/scannerreport()
return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts."
+2 -2
View File
@@ -10,10 +10,10 @@
point_return = 25
/obj/structure/blob/node/New(loc)
/obj/structure/blob/node/Initialize()
GLOB.blob_nodes += src
START_PROCESSING(SSobj, src)
..()
. = ..()
/obj/structure/blob/node/scannerreport()
return "Gradually expands and sustains nearby blob spores and blobbernauts."
+3 -3
View File
@@ -21,14 +21,14 @@
var/mob/camera/blob/overmind
/obj/structure/blob/New(loc)
/obj/structure/blob/Initialize()
var/area/Ablob = get_area(loc)
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
GLOB.blobs_legit += src
GLOB.blobs += src //Keep track of the blob in the normal list either way
setDir(pick(GLOB.cardinal))
update_icon()
..()
.= ..()
ConsumeTile()
if(atmosblock)
CanAtmosPass = ATMOS_PASS_NO
@@ -99,7 +99,7 @@
var/list/blobs_to_affect = list()
for(var/obj/structure/blob/B in urange(claim_range, src, 1))
blobs_to_affect += B
shuffle(blobs_to_affect)
shuffle_inplace(blobs_to_affect)
for(var/L in blobs_to_affect)
var/obj/structure/blob/B = L
if(!B.overmind && !istype(B, /obj/structure/blob/core) && prob(30))
@@ -11,8 +11,8 @@
// divided by healing_ticks to get heal/tick
var/total_healing = 100
/obj/effect/proc_holder/changeling/fleshmend/New()
..()
/obj/effect/proc_holder/changeling/fleshmend/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
@@ -162,8 +162,8 @@
sharpness = IS_SHARP
var/can_drop = FALSE
/obj/item/weapon/melee/arm_blade/New(location,silent,synthetic)
..()
/obj/item/weapon/melee/arm_blade/Initialize(mapload,silent,synthetic)
. = ..()
if(ismob(loc) && !silent)
loc.visible_message("<span class='warning'>A grotesque blade forms around [loc.name]\'s arm!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a deadly blade.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
if(synthetic)
@@ -240,8 +240,8 @@
throw_range = 0
throw_speed = 0
/obj/item/weapon/gun/magic/tentacle/New(location,silent)
..()
/obj/item/weapon/gun/magic/tentacle/Initialize(mapload, silent)
. = ..()
if(ismob(loc))
if(!silent)
loc.visible_message("<span class='warning'>[loc.name]\'s arm starts stretching inhumanly!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a tentacle.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
@@ -266,9 +266,9 @@
firing_effect_type = null
var/obj/item/weapon/gun/magic/tentacle/gun //the item that shot it
/obj/item/ammo_casing/magic/tentacle/New(obj/item/weapon/gun/magic/tentacle/tentacle_gun)
gun = tentacle_gun
..()
/obj/item/ammo_casing/magic/tentacle/Initialize()
gun = loc
. = ..()
/obj/item/ammo_casing/magic/tentacle/Destroy()
gun = null
@@ -285,9 +285,9 @@
var/chain
var/obj/item/ammo_casing/magic/tentacle/source //the item that shot it
/obj/item/projectile/tentacle/New(obj/item/ammo_casing/magic/tentacle/tentacle_casing)
source = tentacle_casing
..()
/obj/item/projectile/tentacle/Initialize()
source = loc
. = ..()
/obj/item/projectile/tentacle/fire(setAngle)
if(firer)
@@ -407,8 +407,8 @@
var/remaining_uses //Set by the changeling ability.
/obj/item/weapon/shield/changeling/New()
..()
/obj/item/weapon/shield/changeling/Initialize()
. = ..()
if(ismob(loc))
loc.visible_message("<span class='warning'>The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!</span>", "<span class='warning'>We inflate our hand into a strong shield.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
@@ -452,8 +452,8 @@
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank/internals/emergency_oxygen, /obj/item/weapon/tank/internals/oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) //No armor at all.
/obj/item/clothing/suit/space/changeling/New()
..()
/obj/item/clothing/suit/space/changeling/Initialize()
. = ..()
if(ismob(loc))
loc.visible_message("<span class='warning'>[loc.name]\'s flesh rapidly inflates, forming a bloated mass around their body!</span>", "<span class='warning'>We inflate our flesh, creating a spaceproof suit!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
START_PROCESSING(SSobj, src)
@@ -501,8 +501,8 @@
cold_protection = 0
heat_protection = 0
/obj/item/clothing/suit/armor/changeling/New()
..()
/obj/item/clothing/suit/armor/changeling/Initialize()
. = ..()
if(ismob(loc))
loc.visible_message("<span class='warning'>[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!</span>", "<span class='warning'>We harden our flesh, creating a suit of armor!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
@@ -21,10 +21,8 @@
if(!charge && !panel_open)
panel_open = TRUE
icon_state = "[initial(icon_state)]-o"
var/datum/effect_system/spark_spread/spks = new(get_turf(src))
spks.set_up(10, 0, get_turf(src))
spks.start()
visible_message("<span class='warning'>[src]'s panel flies open with a flurry of spark</span>")
do_sparks(10, FALSE, src)
visible_message("<span class='warning'>[src]'s panel flies open with a flurry of sparks!</span>")
update_icon()
/obj/item/weapon/stock_parts/cell/power_drain(clockcult_user)
+1 -1
View File
@@ -124,7 +124,7 @@ structure_check() searches for nearby cultist structures required for the invoca
if(allow_excess_invokers)
chanters += invokers
else
shuffle(invokers)
shuffle_inplace(invokers)
for(var/i in 1 to req_cultists)
var/L = pick_n_take(invokers)
if(L)
+10 -6
View File
@@ -50,12 +50,16 @@
/datum/game_mode/devil/post_setup()
for(var/datum/mind/devil in devils)
spawn(rand(10,100))
finalize_devil(devil, TRUE)
spawn(100)
add_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent.
devil.announceDevilLaws()
devil.announce_objectives()
post_setup_finalize(devil)
modePlayer += devils
..()
return 1
/datum/game_mode/devil/proc/post_setup_finalize(datum/mind/devil)
set waitfor = FALSE
sleep(rand(10,100))
finalize_devil(devil, TRUE)
sleep(100)
add_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent.
devil.announceDevilLaws()
devil.announce_objectives()
+7 -7
View File
@@ -31,7 +31,7 @@
/datum/game_mode/proc/finalize_devil(datum/mind/devil_mind, ascendable = FALSE)
set waitfor = FALSE
var/trueName= randomDevilName()
devil_mind.devilinfo = devilInfo(trueName, 1)
@@ -39,14 +39,14 @@
devil_mind.store_memory("Your devilic true name is [devil_mind.devilinfo.truename]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.bane]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.banish]]<br>")
devil_mind.devilinfo.owner = devil_mind
devil_mind.devilinfo.give_base_spells(1)
spawn(10)
devil_mind.devilinfo.update_hud()
if(devil_mind.assigned_role == "Clown" && ishuman(devil_mind.current))
var/mob/living/carbon/human/S = devil_mind.current
to_chat(S, "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>")
S.dna.remove_mutation(CLOWNMUT)
if(issilicon(devil_mind.current))
add_law_sixsixsix(devil_mind.current)
sleep(10)
devil_mind.devilinfo.update_hud()
if(devil_mind.assigned_role == "Clown" && ishuman(devil_mind.current))
var/mob/living/carbon/human/S = devil_mind.current
to_chat(S, "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>")
S.dna.remove_mutation(CLOWNMUT)
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
@@ -60,8 +60,7 @@
stat = DEAD
..(gibbed)
drop_all_held_items()
spawn (0)
mind.devilinfo.beginResurrectionCheck(src)
INVOKE_ASYNC(mind.devilinfo, /datum/devilinfo/proc/beginResurrectionCheck, src)
/mob/living/carbon/true_devil/examine(mob/user)
+14 -14
View File
@@ -75,11 +75,10 @@
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
/datum/game_mode/proc/post_setup(report=0) //Gamemodes can override the intercept report. Passing a 1 as the argument will force a report.
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
if(!report)
report = config.intercept
spawn (ROUNDSTART_LOGOUT_REPORT_TIME)
display_roundstart_logout_report()
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
feedback_set_details("round_start","[time2text(world.realtime)]")
if(SSticker && SSticker.mode)
@@ -88,8 +87,7 @@
feedback_set_details("revision","[GLOB.revdata.commit]")
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
if(report)
spawn (rand(waittime_l, waittime_h))
send_intercept(0)
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
generate_station_goals()
GLOB.start_state = new /datum/station_state()
GLOB.start_state.count(1)
@@ -105,6 +103,7 @@
///Allows rounds to basically be "rerolled" should the initial premise fall through. Also known as mulligan antags.
/datum/game_mode/proc/convert_roundtype()
set waitfor = FALSE
var/list/living_crew = list()
for(var/mob/Player in GLOB.mob_list)
@@ -158,15 +157,16 @@
message_admins("The roundtype will be converted. If you have other plans for the station or feel the station is too messed up to inhabit <A HREF='?_src_=holder;toggle_midround_antag=\ref[usr]'>stop the creation of antags</A> or <A HREF='?_src_=holder;end_round=\ref[usr]'>end the round now</A>.")
spawn(rand(600,1800)) //somewhere between 1 and 3 minutes from now
if(!config.midround_antag[SSticker.mode.config_tag])
round_converted = 0
return 1
for(var/mob/living/carbon/human/H in antag_candidates)
replacementmode.make_antag_chance(H)
round_converted = 2
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")
return 1
. = 1
sleep(rand(600,1800))
//somewhere between 1 and 3 minutes from now
if(!config.midround_antag[SSticker.mode.config_tag])
round_converted = 0
return 1
for(var/mob/living/carbon/human/H in antag_candidates)
replacementmode.make_antag_chance(H)
round_converted = 2
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")
///Called by the gameSSticker
+3 -4
View File
@@ -24,7 +24,7 @@
set_light(2)
GLOB.poi_list |= src
spark_system = new
spark_system.set_up(5, 1, src)
spark_system.set_up(5, TRUE, src)
countdown = new(src)
/obj/machinery/dominator/examine(mob/user)
@@ -129,9 +129,8 @@
set_broken()
GLOB.poi_list.Remove(src)
gang = null
qdel(spark_system)
qdel(countdown)
countdown = null
QDEL_NULL(spark_system)
QDEL_NULL(countdown)
STOP_PROCESSING(SSmachines, src)
return ..()
+9 -8
View File
@@ -73,15 +73,16 @@ GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","
/datum/game_mode/gang/post_setup()
spawn(rand(10,100))
for(var/datum/gang/G in gangs)
for(var/datum/mind/boss_mind in G.bosses)
G.add_gang_hud(boss_mind)
forge_gang_objectives(boss_mind)
greet_gang(boss_mind)
equip_gang(boss_mind.current,G)
modePlayer += boss_mind
set waitfor = FALSE
..()
sleep(rand(10,100))
for(var/datum/gang/G in gangs)
for(var/datum/mind/boss_mind in G.bosses)
G.add_gang_hud(boss_mind)
forge_gang_objectives(boss_mind)
greet_gang(boss_mind)
equip_gang(boss_mind.current,G)
modePlayer += boss_mind
/datum/game_mode/proc/forge_gang_objectives(datum/mind/boss_mind)
+6 -5
View File
@@ -36,6 +36,7 @@
..()
/obj/item/weapon/pen/gang/proc/cooldown(datum/gang/gang)
set waitfor = FALSE
var/cooldown_time = 600+(600*gang.bosses.len) // 1recruiter=2mins, 2recruiters=3mins, 3recruiters=4mins
cooldown = 1
@@ -52,8 +53,8 @@
if(charges)
cooldown_time = 50
spawn(cooldown_time)
cooldown = 0
icon_state = "pen"
var/mob/M = get(src, /mob)
to_chat(M, "<span class='notice'>\icon[src] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
sleep(cooldown_time)
cooldown = 0
icon_state = "pen"
var/mob/M = get(src, /mob)
to_chat(M, "<span class='notice'>\icon[src] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
@@ -192,19 +192,20 @@
set category = "Malfunction"
set name = "Destroy RCDs"
set desc = "Detonate all RCDs on the station, while sparing onboard cyborg RCDs."
set waitfor = FALSE
if(!canUseTopic() || malf_cooldown)
return
for(var/I in GLOB.rcd_list)
if(!istype(I, /obj/item/weapon/rcd/borg)) //Ensures that cyborg RCDs are spared.
var/obj/item/weapon/rcd/RCD = I
if(!istype(I, /obj/item/weapon/construction/rcd/borg)) //Ensures that cyborg RCDs are spared.
var/obj/item/weapon/construction/rcd/RCD = I
RCD.detonate_pulse()
to_chat(src, "<span class='warning'>RCD detonation pulse emitted.</span>")
malf_cooldown = 1
spawn(100)
malf_cooldown = 0
malf_cooldown = TRUE
sleep(100)
malf_cooldown = FALSE
/datum/AI_Module/large/mecha_domination
module_name = "Viral Mech Domination"
@@ -1072,4 +1072,4 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10)
/datum/action/innate/borer/jumpstart_host/Activate()
var/mob/living/simple_animal/borer/B = owner
B.jumpstart()
B.jumpstart()
+1 -1
View File
@@ -218,7 +218,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
if("hsbrcd")
if(!GLOB.hsboxspawn) return
new/obj/item/weapon/rcd/combat(usr.loc)
new/obj/item/weapon/construction/rcd/combat(usr.loc)
//
// New sandbox airlock maker
+1 -1
View File
@@ -65,7 +65,7 @@
// As soon as we get 3 or 4 extra latejoin traitors, make them traitors and kill each other.
if(late_joining_list.len >= rand(3, 4))
// True randomness
shuffle(late_joining_list)
shuffle_inplace(late_joining_list)
// Reset the target_list, it'll be used again in force_traitor_objectives
target_list = list()
+1 -1
View File
@@ -329,7 +329,7 @@
if("cyborg")
for(var/X in M.bodyparts)
var/obj/item/bodypart/affecting = X
affecting.change_bodypart_status(BODYPART_ROBOTIC)
affecting.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.put_in_hands_or_del(sword)
+1 -1
View File
@@ -117,7 +117,7 @@
mages_made--
return
else
shuffle(candidates)
shuffle_inplace(candidates)
for(var/mob/i in candidates)
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
+9
View File
@@ -126,6 +126,15 @@
if (is_operational() && (!isnull(occupant)) && (occupant.stat != DEAD))
to_chat(user, "Current clone cycle is [round(get_completion())]% complete.")
/obj/machinery/clonepod/return_air()
// We want to simulate the clone not being in contact with
// the atmosphere, so we'll put them in a constant pressure
// nitrogen. They'll breathe through the chemicals we pump into them.
var/static/datum/gas_mixture/immutable/cloner/GM //global so that there's only one instance made for all cloning pods
if(!GM)
GM = new
return GM
/obj/machinery/clonepod/proc/get_completion()
. = (100 * ((occupant.health + 100) / (heal_level + 100)))
@@ -92,6 +92,12 @@ obj/machinery/computer/camera_advanced/attack_ai(mob/user)
var/eye_initialized = 0
var/visible_icon = 0
var/image/user_image = null
/mob/camera/aiEye/remote/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
user.sight = 0
user.see_in_dark = 2
return 1
/mob/camera/aiEye/remote/Destroy()
eye_user = null
+1 -1
View File
@@ -35,7 +35,7 @@
return ..()
/obj/machinery/computer/Initialize()
..()
. = ..()
power_change()
/obj/machinery/computer/process()
+514
View File
@@ -0,0 +1,514 @@
// DISCO DANCE MACHINE - For engineering power optimization incentive nurturing test system (POINTS)
/obj/machinery/disco
name = "radiant dance machine mark IV"
desc = "The first three prototypes were discontinued after mass casualty incidents."
icon = 'icons/obj/lighting.dmi'
icon_state = "disco0"
anchored = FALSE
verb_say = "states"
density = TRUE
req_access = list(GLOB.access_engine)
var/active = FALSE
var/list/rangers = list()
var/list/listeners = list()
var/charge = 35
var/stop = 0
var/list/available = list()
var/list/select_name = list()
var/list/spotlights = list()
var/list/sparkles = list()
var/static/list/songs = list(
new /datum/track("Engineering's Basic Beat", 'sound/misc/disco.ogg', 600, 5),
new /datum/track("Engineering's Domination Dance", 'sound/misc/e1m1.ogg', 950, 6),
new /datum/track("Engineering's Superiority Shimmy", 'sound/misc/Paradox.ogg', 2400, 4),
new /datum/track("Engineering's Ultimate High-Energy Hustle", 'sound/misc/boogie2.ogg', 1770, 5),
)
var/datum/track/selection = null
/datum/track
var/song_name = "generic"
var/song_path = null
var/song_length = 0
var/song_beat = 0
/datum/track/New(name, path, length, beat)
song_name = name
song_path = path
song_length = length
song_beat = beat
/obj/machinery/disco/Initialize()
..()
selection = songs[1]
/obj/machinery/disco/Destroy()
dance_over()
return ..()
/obj/machinery/disco/attackby(obj/item/O, mob/user, params)
if(!active)
if(istype(O, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
to_chat(user,"<span class='notice'>You secure the [src] to the floor.</span>")
anchored = TRUE
else if(anchored)
to_chat(user,"<span class='notice'>You unsecure and disconnect the [src].</span>")
anchored = FALSE
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
return
return ..()
/obj/machinery/disco/update_icon()
if(active)
icon_state = "disco1"
else
icon_state = "disco0"
..()
/obj/machinery/disco/interact(mob/user)
if (!anchored)
to_chat(user,"<span class='warning'>This device must be anchored by a wrench!</span>")
return
if(!allowed(user))
to_chat(user,"<span class='warning'>Error: Access Denied - Message: Only the engineering department can be trusted with this kind of power.</span>")
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
return
if(!Adjacent(user) && !isAI(user))
return
user.set_machine(src)
var/list/dat = list()
dat +="<div class='statusDisplay' style='text-align:center'>"
dat += "<b><A href='?src=\ref[src];action=toggle'>[!active ? "BREAK IT DOWN" : "SHUT IT DOWN"]<b></A><br>"
dat += "</div><br>"
dat += "<A href='?src=\ref[src];action=select'> Select Track</A><br>"
dat += "Track Selected: [selection.song_name]<br>"
dat += "Track Length: [selection.song_length/10] seconds<br><br>"
dat += "<br>DJ's Soundboard:<b><br>"
dat +="<div class='statusDisplay'><div style='text-align:center'>"
dat += "<A href='?src=\ref[src];action=horn'>Air Horn</A> "
dat += "<A href='?src=\ref[src];action=alert'>Station Alert</A> "
dat += "<A href='?src=\ref[src];action=siren'>Warning Siren</A> "
dat += "<A href='?src=\ref[src];action=honk'>Honk</A><br>"
dat += "<A href='?src=\ref[src];action=pump'>Shotgun Pump</A>"
dat += "<A href='?src=\ref[src];action=pop'>Gunshot</A>"
dat += "<A href='?src=\ref[src];action=saber'>Esword</A>"
dat += "<A href='?src=\ref[src];action=harm'>Harm Alarm</A>"
var/datum/browser/popup = new(user, "vending", "Radiance Dance Machine - Mark IV", 400, 350)
popup.set_content(dat.Join())
popup.open()
/obj/machinery/disco/Topic(href, href_list)
if(..())
return
add_fingerprint(usr)
switch(href_list["action"])
if("toggle")
if (QDELETED(src))
return
if(!active)
if(stop > world.time)
to_chat(usr, "<span class='warning'>Error: The device is still resetting from the last activation, it will be ready again in [round((stop-world.time)/10)] seconds.</span>")
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
return
active = TRUE
update_icon()
dance_setup()
START_PROCESSING(SSobj, src)
lights_spin()
updateUsrDialog()
else if(active)
active = FALSE
STOP_PROCESSING(SSobj, src)
update_icon()
dance_over()
stop = world.time + 300
updateUsrDialog()
if("select")
if(active)
to_chat(usr, "<span class='warning'>Error: You cannot change the song until the current one is over.</span>")
return
check_GBP()
select_name = input(usr, "Choose your song", "Track:") as null|anything in available
if (QDELETED(src))
return
for(var/datum/track/S in songs)
if(select_name == S.song_name)
selection = S
break
updateUsrDialog()
if("horn")
deejay('sound/items/AirHorn2.ogg')
if("alert")
deejay('sound/misc/notice1.ogg')
if("siren")
deejay('sound/machines/engine_alert1.ogg')
if("honk")
deejay('sound/items/bikehorn.ogg')
if("pump")
deejay('sound/weapons/shotgunpump.ogg')
if("pop")
deejay('sound/weapons/Gunshot3.ogg')
if("saber")
deejay('sound/weapons/saberon.ogg')
if("harm")
deejay('sound/AI/harmalarm.ogg')
/obj/machinery/disco/proc/deejay(var/S)
if (QDELETED(src) || !active || charge < 5)
to_chat(usr, "<span class='warning'>The device is not able to play more DJ sounds at this time.</span>")
return
charge -= 5
playsound(src, S,300,1)
/obj/machinery/disco/proc/check_GBP()
available |= "Engineering's Basic Beat"
available |= "Engineering's Domination Dance"
available |= "Engineering's Superiority Shimmy"
available |= "Engineering's Ultimate High-Energy Hustle"
/obj/machinery/disco/proc/dance_setup()
stop = world.time + selection.song_length
var/turf/cen = get_turf(src)
FOR_DVIEW(var/turf/t, 3, get_turf(src),INVISIBILITY_LIGHTING)
if(t.x == cen.x && t.y > cen.y)
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "red"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1+get_dist(src, L)
spotlights+=L
continue
if(t.x == cen.x && t.y < cen.y)
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "purple"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1+get_dist(src, L)
spotlights+=L
continue
if(t.x > cen.x && t.y == cen.y)
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "#ffff00"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1+get_dist(src, L)
spotlights+=L
continue
if(t.x < cen.x && t.y == cen.y)
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "green"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1+get_dist(src, L)
spotlights+=L
continue
if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2==cen.x && t.y+2 == cen.y))
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "sw"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1.4+get_dist(src, L)
spotlights+=L
continue
if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2==cen.x && t.y-2 == cen.y))
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "ne"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1.4+get_dist(src, L)
spotlights+=L
continue
if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2==cen.x && t.y+2 == cen.y))
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "se"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1.4+get_dist(src, L)
spotlights+=L
continue
if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2==cen.x && t.y-2 == cen.y))
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
L.light_color = "nw"
L.light_power = 30-(get_dist(src,L)*8)
L.range = 1.4+get_dist(src, L)
spotlights+=L
continue
continue
/obj/machinery/disco/proc/hierofunk()
for(var/i in 1 to 10)
spawn_atom_to_turf(/obj/effect/overlay/temp/hierophant/telegraph/edge, src, 1, FALSE)
sleep(5)
/obj/machinery/disco/proc/lights_spin()
for(var/i in 1 to 25)
if(QDELETED(src) || !active)
return
var/obj/effect/overlay/sparkles/S = new /obj/effect/overlay/sparkles(src)
S.alpha = 0
sparkles += S
switch(i)
if(1 to 8)
S.orbit(src, 30, TRUE, 60, 36, TRUE, FALSE)
if(9 to 16)
S.orbit(src, 62, TRUE, 60, 36, TRUE, FALSE)
if(17 to 24)
S.orbit(src, 95, TRUE, 60, 36, TRUE, FALSE)
if(25)
S.pixel_y = 7
S.forceMove(get_turf(src))
sleep(7)
if(selection.song_name == "Engineering's Ultimate High-Energy Hustle")
sleep(280)
for(var/obj/reveal in sparkles)
reveal.alpha = 255
while(active)
for(var/obj/item/device/flashlight/spotlight/glow in spotlights) // The multiples reflects custom adjustments to each colors after dozens of tests
if(QDELETED(src) || !active || QDELETED(glow))
return
if(glow.light_color == "red")
glow.light_color = "nw"
glow.light_power = glow.light_power * 1.48
glow.light_range = 0
glow.update_light()
continue
if(glow.light_color == "nw")
glow.light_color = "green"
glow.light_range = glow.range * 1.1
glow.light_power = glow.light_power * 2 // Any changes to power must come in pairs to neutralize it for other colors
glow.update_light()
continue
if(glow.light_color == "green")
glow.light_color = "sw"
glow.light_power = glow.light_power * 0.5
glow.light_range = 0
glow.update_light()
continue
if(glow.light_color == "sw")
glow.light_color = "purple"
glow.light_power = glow.light_power * 2.27
glow.light_range = glow.range * 1.15
glow.update_light()
continue
if(glow.light_color == "purple")
glow.light_color = "se"
glow.light_power = glow.light_power * 0.44
glow.light_range = 0
glow.update_light()
continue
if(glow.light_color == "se")
glow.light_color = "#ffff00"
glow.light_range = glow.range * 0.9
glow.update_light()
continue
if(glow.light_color == "#ffff00")
glow.light_color = "ne"
glow.light_range = 0
glow.update_light()
continue
if(glow.light_color == "ne")
glow.light_color = "red"
glow.light_power = glow.light_power * 0.68
glow.light_range = glow.range * 0.85
glow.update_light()
continue
if(prob(2)) // Unique effects for the dance floor that show up randomly to mix things up
INVOKE_ASYNC(src, .proc/hierofunk)
sleep(selection.song_beat)
/obj/machinery/disco/proc/dance(var/mob/living/carbon/M) //Show your moves
switch(rand(0,9))
if(0 to 1)
dance2(M)
if(2 to 3)
dance3(M)
if(4 to 6)
dance4(M)
if(7 to 9)
dance5(M)
/obj/machinery/disco/proc/dance2(var/mob/living/carbon/M)
set waitfor = 0
for(var/i = 1, i < 10, i++)
M.SpinAnimation(15,1)
M.setDir(pick(GLOB.cardinal))
sleep(8)
/obj/machinery/disco/proc/dance3(var/mob/living/carbon/M)
var/matrix/initial_matrix = matrix(M.transform)
for(var/i in 1 to 6)
if (!M)
return
M.SpinAnimation(7,1)
M.setDir(pick(GLOB.cardinal))
for (var/x in 1 to 12)
sleep(1)
if (!M)
return
if (i<5)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,1)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (i>4)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,-2)
animate(M, transform = initial_matrix, time = 1, loop = 0)
M.setDir(turn(M.dir, 90))
switch (M.dir)
if (NORTH)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,3)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (SOUTH)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,-3)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (EAST)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(3,0)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (WEST)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(-3,0)
animate(M, transform = initial_matrix, time = 1, loop = 0)
sleep(10)
animate(M, transform = null, time = 1, loop = 0)
/obj/machinery/disco/proc/dance4(var/mob/living/carbon/M)
var/speed = rand(1,3)
set waitfor = 0
var/time = 30
while(time)
sleep(speed)
for(var/i in 1 to speed)
M.setDir(pick(GLOB.cardinal))
M.lay_down(TRUE)
time--
/obj/machinery/disco/proc/dance5(var/mob/living/carbon/M)
INVOKE_ASYNC(M, .proc/dance5helper)
var/matrix/initial_matrix = matrix(M.transform)
for (var/i in 1 to 60)
if (!M)
return
if (i<31)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,1)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (i>30)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,-1)
animate(M, transform = initial_matrix, time = 1, loop = 0)
M.setDir(turn(M.dir, 90))
switch (M.dir)
if (NORTH)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,3)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (SOUTH)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(0,-3)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (EAST)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(3,0)
animate(M, transform = initial_matrix, time = 1, loop = 0)
if (WEST)
initial_matrix = matrix(M.transform)
initial_matrix.Translate(-3,0)
animate(M, transform = initial_matrix, time = 1, loop = 0)
sleep (1)
animate(M, transform = null, time = 1, loop = 0)
/obj/machinery/disco/proc/dance5helper(var/mob/living/carbon/M)
if (M)
animate(M, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
sleep (70)
if (M)
animate(M, transform = null, time = 1, loop = 0)
/mob/living/carbon/proc/dancey() // Dance5 except independent of the machine if admins want to meme it up
INVOKE_ASYNC(src, .proc/danceyhelper)
var/matrix/initial_matrix = matrix(transform)
for (var/i in 1 to 60)
if (!src)
return
if (i<31)
initial_matrix = matrix(transform)
initial_matrix.Translate(0,1)
transform = initial_matrix
animate(src, transform, time = 1, loop = 0)
if (i>30)
initial_matrix = matrix(transform)
initial_matrix.Translate(0,-1)
transform = initial_matrix
animate(src, transform, time = 1, loop = 0)
setDir(turn(src.dir, 90))
switch (dir)
if (NORTH)
initial_matrix = matrix(transform)
initial_matrix.Translate(0,3)
animate(src, transform, time = 1, loop = 0)
if (SOUTH)
initial_matrix = matrix(transform)
initial_matrix.Translate(0,-3)
animate(src, transform, time = 1, loop = 0)
if (EAST)
initial_matrix = matrix(transform)
initial_matrix.Translate(3,0)
animate(src, transform, time = 1, loop = 0)
if (WEST)
initial_matrix = matrix(transform)
initial_matrix.Translate(-3,0)
animate(src, transform, time = 1, loop = 0)
sleep (1)
animate(src, transform = null, time = 1, loop = 0)
/mob/living/carbon/proc/danceyhelper()
if (src)
animate(src, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
sleep (70)
if (src)
animate(src, transform = null, time = 1, loop = 0)
/obj/machinery/disco/proc/dance_over()
for(var/obj/item/device/flashlight/spotlight/SL in spotlights)
qdel(SL)
spotlights.Cut()
for(var/obj/effect/overlay/sparkles/SP in sparkles)
qdel(SP)
sparkles.Cut()
rangers.Cut()
for(var/mob/living/L in listeners)
if(!L || !L.client)
continue
L.stop_sound_channel(CHANNEL_JUKEBOX)
listeners.Cut()
/obj/machinery/disco/process()
if(charge<35)
charge += 1
if(world.time < stop && active)
rangers = list()
for(var/mob/living/M in range(9,src))
rangers += M
if(!(listeners[M]))
M.playsound_local(get_turf(M), selection.song_path, 100, channel = CHANNEL_JUKEBOX)
listeners[M] = TRUE
if(prob(5+(allowed(M)*4)))
dance(M)
for(var/mob/living/L in listeners)
if(!(L in rangers))
listeners -= L
if(!L || !L.client)
continue
L.stop_sound_channel(CHANNEL_JUKEBOX)
else if(active)
STOP_PROCESSING(SSobj, src)
dance_over()
playsound(src,'sound/machines/terminal_off.ogg',50,1)
active = FALSE
icon_state = "disco0"
+3 -5
View File
@@ -339,9 +339,7 @@
return FALSE //Already shocked someone recently?
if(!prob(prb))
return FALSE //you lucked out, no shock for you
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start() //sparks always.
do_sparks(5, TRUE, src)
var/tmp/check_range = TRUE
if(electrocute_mob(user, get_area(src), src, 1, check_range))
hasShocked = TRUE
@@ -1542,13 +1540,13 @@
ae.loc = src.loc
qdel(src)
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
return FALSE
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the airlock.</span>")
+5
View File
@@ -212,6 +212,11 @@
if(..())
return
. = TRUE
if(!allowed(usr))
to_chat(usr, "<span class='warning'>Access denied.</span>")
return FALSE
switch(action)
if("time")
var/value = text2num(params["adjust"])
+2 -2
View File
@@ -97,7 +97,7 @@ Possible to do for anyone motivated enough:
/obj/machinery/holopad/interact(mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
if(user.stat || stat & (NOPOWER|BROKEN))
if(user.stat || !is_operational())
return
user.set_machine(src)
var/dat
@@ -112,7 +112,7 @@ Possible to do for anyone motivated enough:
popup.open()
/obj/machinery/holopad/Topic(href, href_list)
if(..())
if(..() || !is_operational())
return
if (href_list["AIrequest"])
if(last_request + 200 < world.time)
+1 -1
View File
@@ -127,7 +127,7 @@ Class Procs:
/obj/machinery/Initialize()
if (!armor)
armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
..()
. = ..()
GLOB.machines += src
if(!speed_process)
START_PROCESSING(SSmachines, src)
+2 -2
View File
@@ -528,7 +528,7 @@
if(icon_vend) //Show the vending animation if needed
flick(icon_vend,src)
new R.product_path(get_turf(src))
feedback_add_details("vending_machine_usage","[R.product_path]|[src.type]")
feedback_add_details("vending_machine_usage","[src.type]|[R.product_path]")
vend_ready = 1
return
@@ -1052,7 +1052,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "11" //Engineering Equipment access
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
premium = list(/obj/item/weapon/storage/belt/utility = 3)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
+1 -1
View File
@@ -50,4 +50,4 @@
to_chat(user, "You have a very bad feeling about this.")
return
return
+2 -2
View File
@@ -119,8 +119,8 @@
hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_TRACK_HUD)
/obj/mecha/New()
..()
/obj/mecha/Initialize()
. = ..()
events = new
icon_state += "-open"
add_radio()
@@ -23,7 +23,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
/datum/effect_system
var/number = 3
var/cardinals = 0
var/cardinals = FALSE
var/turf/location
var/atom/holder
var/effect_type
@@ -34,7 +34,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
location = null
return ..()
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
/datum/effect_system/proc/set_up(n = 3, c = FALSE, loca)
if(n > 10)
n = 10
number = n
@@ -5,6 +5,17 @@
// will always spawn at the items location.
/////////////////////////////////////////////
/proc/do_sparks(n, c, source)
// n - number of sparks
// c - cardinals, bool, do the sparks only move in cardinal directions?
// source - source of the sparks.
var/datum/effect_system/spark_spread/sparks = new
sparks.set_up(n, c, source)
sparks.start()
qdel(sparks)
/obj/effect/particle_effect/sparks
name = "sparks"
icon_state = "sparks"
+10
View File
@@ -210,6 +210,11 @@
icon_state = "smoke"
duration = 50
/obj/effect/overlay/temp/fire
icon = 'icons/effects/fire.dmi'
icon_state = "3"
duration = 20
/obj/effect/overlay/temp/cult
randomdir = 0
duration = 10
@@ -608,3 +613,8 @@
name = "Coconuts"
icon = 'icons/misc/beach.dmi'
icon_state = "coconuts"
/obj/effect/overlay/sparkles
name = "sparkles"
icon = 'icons/effects/effects.dmi'
icon_state = "shieldsparkles"
+11 -1
View File
@@ -1,5 +1,9 @@
GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire"))
GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// if true, everyone item when created will have its name changed to be
// more... RPG-like.
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
@@ -99,14 +103,19 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
// non-clothing items
var/datum/dog_fashion/dog_fashion = null
var/datum/rpg_loot/rpg_loot = null
/obj/item/Initialize()
if (!materials)
materials = list()
..()
. = ..()
for(var/path in actions_types)
new path(src)
actions_types = null
if(GLOB.rpg_loot_items)
rpg_loot = new(src)
/obj/item/Destroy()
flags &= ~DROPDEL //prevent reqdels
if(ismob(loc))
@@ -114,6 +123,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
m.temporarilyRemoveItemFromInventory(src, TRUE)
for(var/X in actions)
qdel(X)
QDEL_NULL(rpg_loot)
return ..()
/obj/item/device
+1 -1
View File
@@ -86,7 +86,7 @@
name = "station charter for [station_name()]"
desc = "An official document entrusting the governance of \
[station_name()] and surrounding space to Captain [uname]."
feedback_set_details("station_renames","[station_name()]")
if(!unlimited_uses)
used = TRUE
+20 -1
View File
@@ -307,7 +307,7 @@
// Glowsticks, in the uncomfortable range of similar to flares,
// but not similar enough to make it worth a refactor
/obj/item/device/flashlight/glowstick
name = "green glowstick"
name = "glowstick"
desc = "A military-grade glowstick."
w_class = WEIGHT_CLASS_SMALL
brightness_on = 4
@@ -363,6 +363,11 @@
. = ..()
if(.)
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
activate()
/obj/item/device/flashlight/glowstick/proc/activate()
if(!on)
on = TRUE
START_PROCESSING(SSobj, src)
/obj/item/device/flashlight/glowstick/red
@@ -402,6 +407,20 @@
color = initial(glowtype.color)
. = ..()
/obj/item/device/flashlight/spotlight //invisible lighting source
name = "disco lighting"
icon_state = null
light_color = null
brightness_on = 0
light_range = 0
light_power = 10
alpha = 0
layer = 0
on = TRUE
anchored = TRUE
var/range = null
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/item/device/flashlight/flashdark
name = "flashdark"
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
+304 -99
View File
@@ -1,14 +1,14 @@
#define GLOW_MODE 3
#define LIGHT_MODE 2
#define REMOVE_MODE 1
/*
CONTAINS:
RCD
ARCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
obj/item/weapon/construction
opacity = 0
density = 0
anchored = 0
@@ -25,30 +25,114 @@ RCD
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/matter = 0
var/max_matter = 160
var/working = 0
var/max_matter = 100
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
/obj/item/weapon/construction/Initialize()
..()
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/construction/Destroy()
QDEL_NULL(spark_system)
. = ..()
/obj/item/weapon/construction/attackby(obj/item/weapon/W, mob/user, params)
if(iscyborg(user))
return
var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='warning'>The [src] can't hold any more matter-units!</span>")
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
loaded = 1
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
loaded = loadwithsheets(W, sheetmultiplier, user)
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
to_chat(user, "<span class='notice'>The [src] now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
else
return ..()
/obj/item/weapon/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
var/amount_to_use = min(S.amount, maxsheets)
S.use(amount_to_use)
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
return 0
/obj/item/weapon/construction/proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
/obj/item/weapon/construction/attack_self(mob/user)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(prob(20))
spark_system.start()
/obj/item/weapon/construction/proc/useResource(amount, mob/user)
if(matter < amount)
if(user)
to_chat(user, no_ammo_message)
return 0
matter -= amount
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/construction/proc/checkResource(amount, mob/user)
. = matter >= amount
if(!. && user)
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/construction/proc/range_check(atom/A, mob/user)
if(!(A in view(7, get_turf(user))))
to_chat(user, "<span class='warning'>The \'Out of Range\' light on the [src] blinks red.</span>")
return FALSE
/obj/item/weapon/construction/proc/prox_check(proximity)
if(!proximity)
return
/obj/item/weapon/construction/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
max_matter = 160
var/mode = 1
var/canRturf = 0
var/ranged = FALSE
var/airlock_type = /obj/machinery/door/airlock
var/window_type = /obj/structure/window/fulltile
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
var/delay_mod = 1
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \
the RCD blinks yellow.</span>"
/obj/item/weapon/rcd/suicide_act(mob/user)
/obj/item/weapon/construction/rcd/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/rcd/verb/toggle_window_type()
/obj/item/weapon/construction/rcd/verb/toggle_window_type()
set name = "Toggle Window Type"
set category = "Object"
set src in usr // What does this do?
@@ -64,7 +148,7 @@ RCD
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
/obj/item/weapon/rcd/verb/change_airlock_access()
/obj/item/weapon/construction/rcd/verb/change_airlock_access()
set name = "Change Airlock Access"
set category = "Object"
set src in usr
@@ -79,7 +163,6 @@ RCD
var/t1 = text("")
if(use_one_access)
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
else
@@ -114,7 +197,7 @@ RCD
popup.open()
onclose(usr, "airlock")
/obj/item/weapon/rcd/Topic(href, href_list)
/obj/item/weapon/construction/rcd/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
@@ -127,7 +210,7 @@ RCD
change_airlock_access()
/obj/item/weapon/rcd/proc/toggle_access(acc)
/obj/item/weapon/construction/rcd/proc/toggle_access(acc)
if (acc == "all")
conf_access = null
else if(acc == "one")
@@ -145,7 +228,7 @@ RCD
if (!conf_access.len)
conf_access = null
/obj/item/weapon/rcd/verb/change_airlock_setting()
/obj/item/weapon/construction/rcd/verb/change_airlock_setting()
set name = "Change Airlock Setting"
set category = "Object"
set src in usr
@@ -207,59 +290,16 @@ RCD
airlock_type = /obj/machinery/door/airlock
/obj/item/weapon/rcd/New()
/obj/item/weapon/construction/rcd/New()
..()
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
GLOB.rcd_list += src
/obj/item/weapon/rcd/Destroy()
qdel(spark_system)
spark_system = null
/obj/item/weapon/construction/rcd/Destroy()
GLOB.rcd_list -= src
. = ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
return
var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='warning'>The RCD can't hold any more matter-units!</span>")
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
loaded = 1
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
loaded = loadwithsheets(W, sheetmultiplier, user)
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
else
return ..()
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
var/amount_to_use = min(S.amount, maxsheets)
S.use(amount_to_use)
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>")
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!")
return 0
/obj/item/weapon/rcd/attack_self(mob/user)
//Change the mode
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
/obj/item/weapon/construction/rcd/attack_self(mob/user)
..()
switch(mode)
if(1)
mode = 2
@@ -274,16 +314,14 @@ RCD
mode = 1
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
if(prob(20))
src.spark_system.start()
/obj/item/weapon/rcd/proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
if(!proximity)
/obj/item/weapon/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
return TRUE
else
return FALSE
/obj/item/weapon/construction/rcd/afterattack(atom/A, mob/user, proximity)
prox_check()
var/list/rcd_results = A.rcd_vals(user, src)
if(!rcd_results)
return FALSE
@@ -295,40 +333,26 @@ RCD
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
if(matter < amount)
if(user)
to_chat(user, no_ammo_message)
return 0
matter -= amount
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
. = matter >= amount
if(!. && user)
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/proc/detonate_pulse()
/obj/item/weapon/construction/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
/obj/item/weapon/construction/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/weapon/rcd/borg/New()
/obj/item/weapon/construction/rcd/borg/New()
..()
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
desc = "A device used to rapidly build walls and floors."
canRturf = 1
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
/obj/item/weapon/construction/rcd/borg/useResource(amount, mob/user)
if(!iscyborg(user))
return 0
var/mob/living/silicon/robot/borgy = user
@@ -341,7 +365,7 @@ RCD
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
/obj/item/weapon/construction/rcd/borg/checkResource(amount, mob/user)
if(!iscyborg(user))
return 0
var/mob/living/silicon/robot/borgy = user
@@ -354,10 +378,10 @@ RCD
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/loaded
/obj/item/weapon/construction/rcd/loaded
matter = 160
/obj/item/weapon/rcd/combat
/obj/item/weapon/construction/rcd/combat
name = "industrial RCD"
max_matter = 500
matter = 500
@@ -378,7 +402,188 @@ RCD
ammoamt = 160
/obj/item/weapon/rcd/admin
/obj/item/weapon/construction/rcd/admin
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
// Ranged RCD
/obj/item/weapon/construction/rcd/arcd
name = "advanced rapid-construction-device (ARCD)"
desc = "A prototype RCD with ranged capability and extended capacity"
max_matter = 300
matter = 300
delay_mod = 0.6
ranged = TRUE
icon_state = "arcd"
/obj/item/weapon/construction/rcd/arcd/afterattack(atom/A, mob/user)
range_check(A,user)
if(target_check(A,user))
user.Beam(A,icon_state="rped_upgrade",time=30)
..()
// RAPID LIGHTING DEVICE
/obj/item/weapon/construction/rld
name = "rapid-light-device (RLD)"
desc = "A device used to rapidly provide lighting sources to an area."
icon = 'icons/obj/tools.dmi'
icon_state = "rld-5"
matter = 200
max_matter = 200
var/mode = LIGHT_MODE
actions_types = list(/datum/action/item_action/pick_color)
var/wallcost = 10
var/floorcost = 15
var/launchcost = 5
var/deconcost = 10
var/walldelay = 10
var/floordelay = 10
var/decondelay = 15
var/color_choice = null
/obj/item/weapon/construction/rld/ui_action_click(mob/user, var/datum/action/A)
if(istype(A, /datum/action/item_action/pick_color))
color_choice = input(user,"Choose Color") as color
else
..()
/obj/item/weapon/construction/rld/update_icon()
icon_state = "rld-[round(matter/35)]"
..()
/obj/item/weapon/construction/rld/attack_self(mob/user)
..()
switch(mode)
if(REMOVE_MODE)
mode = LIGHT_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Permanent Light Construction'.</span>")
if(LIGHT_MODE)
mode = GLOW_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Light Launcher'.</span>")
if(GLOW_MODE)
mode = REMOVE_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Deconstruct'.</span>")
/obj/item/weapon/construction/rld/proc/checkdupes(var/target)
. = list()
var/turf/checking = get_turf(target)
for(var/obj/machinery/light/dupe in checking)
if(istype(dupe, /obj/machinery/light))
. |= dupe
/obj/item/weapon/construction/rld/afterattack(atom/A, mob/user)
range_check(A,user)
var/turf/start = get_turf(src)
switch(mode)
if(REMOVE_MODE)
if(istype(A, /obj/machinery/light/))
if(checkResource(deconcost, user))
to_chat(user, "<span class='notice'>You start deconstructing [A]...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, decondelay, target = A))
if(!useResource(deconcost, user))
return 0
activate()
qdel(A)
return TRUE
return FALSE
if(LIGHT_MODE)
if(iswallturf(A))
var/turf/closed/wall/W = A
if(checkResource(floorcost, user))
to_chat(user, "<span class='notice'>You start building a wall light...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 0)
if(do_after(user, floordelay, target = A))
if(!istype(W))
return FALSE
var/list/candidates = list()
var/turf/open/winner = null
var/winning_dist = null
for(var/direction in GLOB.cardinal)
var/turf/C = get_step(W, direction)
var/list/dupes = checkdupes(C)
if(start.CanAtmosPass(C) && !dupes.len)
candidates += C
if(!candidates.len)
to_chat(user, "<span class='warning'>Valid target not found...</span>")
playsound(src.loc, 'sound/misc/compiler-failure.ogg', 30, 1)
return FALSE
for(var/turf/open/O in candidates)
if(istype(O))
var/x0 = O.x
var/y0 = O.y
var/contender = cheap_hypotenuse(start.x, start.y, x0, y0)
if(!winner)
winner = O
winning_dist = contender
else
if(contender < winning_dist) // lower is better
winner = O
winning_dist = contender
activate()
if(!useResource(wallcost, user))
return FALSE
var/light = get_turf(winner)
var/align = get_dir(winner, A)
var/obj/machinery/light/L = new /obj/machinery/light(light)
L.dir = align
L.color = color_choice
L.light_color = L.color
return TRUE
return FALSE
if(isfloorturf(A))
var/turf/open/floor/F = A
if(checkResource(floorcost, user))
to_chat(user, "<span class='notice'>You start building a floor light...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
if(do_after(user, floordelay, target = A))
if(!istype(F))
return 0
if(!useResource(floorcost, user))
return 0
activate()
var/destination = get_turf(A)
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
FL.color = color_choice
FL.light_color = FL.color
return TRUE
return FALSE
if(GLOW_MODE)
if(useResource(launchcost, user))
activate()
to_chat(user, "<span class='notice'>You fire a glowstick!</span>")
var/obj/item/device/flashlight/glowstick/G = new /obj/item/device/flashlight/glowstick(start)
G.color = color_choice
G.light_color = G.color
G.throw_at(A, 9, 3, user)
G.on = TRUE
G.update_brightness()
return TRUE
return FALSE
#undef GLOW_MODE
#undef LIGHT_MODE
#undef REMOVE_MODE
@@ -94,6 +94,9 @@
return 0
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
// Make it so the extinguisher doesn't spray yourself when you click your inventory items
if (target.loc == user)
return
//TODO; Add support for reagents in water.
if(refilling)
refilling = FALSE
+5 -10
View File
@@ -45,10 +45,7 @@
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
apply_cuffs(C,user)
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
feedback_add_details("handcuffs","C")
else
feedback_add_details("handcuffs","H")
feedback_add_details("handcuffs","[type]")
add_logs(user, C, "handcuffed")
else
@@ -247,7 +244,7 @@
var/armed = 0
var/trap_damage = 20
/obj/item/weapon/restraints/legcuffs/beartrap/New()
/obj/item/weapon/restraints/legcuffs/beartrap/Initialize()
..()
icon_state = "[initial(icon_state)][armed]"
@@ -278,7 +275,7 @@
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
feedback_add_details("handcuffs","[type]")
else if(isanimal(L))
var/mob/living/simple_animal/SA = L
if(SA.mob_size > MOB_SIZE_TINY)
@@ -307,9 +304,7 @@
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
if(!istype(loc, /mob))
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
qdel(src)
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
@@ -341,7 +336,7 @@
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B")
feedback_add_details("handcuffs","[type]")
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
C.Weaken(weaken)
@@ -31,7 +31,7 @@
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in || active)
return 0
if(cause == "action_button" || !popup)
if(cause == "action_button" && !popup)
popup = TRUE
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
popup = FALSE
@@ -106,6 +106,8 @@
/obj/item/weapon/twohanded/equip_to_best_slot(mob/M)
if(..())
if(istype(src, /obj/item/weapon/twohanded/required))
return // unwield forces twohanded-required items to be dropped.
unwield(M)
return
+1 -1
View File
@@ -12,7 +12,7 @@
/obj/structure/Initialize()
if (!armor)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
..()
. = ..()
if(smooth)
queue_smooth(src)
queue_smooth_neighbors(src)
@@ -139,7 +139,7 @@
..()
for(var/i in 1 to 4)
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/rcd(src)
new /obj/item/weapon/construction/rcd(src)
/obj/structure/closet/crate/science
name = "science crate"
+1 -1
View File
@@ -242,7 +242,7 @@
/obj/structure/displaycase/captain
alert = 1
start_showpiece_type = /obj/item/weapon/gun/energy/laser/captain
req_access = list(GLOB.access_captain)
req_access = list(GLOB.access_cent_specops)
/obj/structure/displaycase/labcage
name = "lab cage"
+2 -2
View File
@@ -396,7 +396,7 @@
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
qdel(src)
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_FLOORWALL)
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 8)
@@ -404,7 +404,7 @@
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 13)
return FALSE
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
var/turf/T = get_turf(src)
switch(passed_mode)
if(RCD_FLOORWALL)
+2 -2
View File
@@ -18,7 +18,7 @@
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
@@ -26,7 +26,7 @@
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 10)
return FALSE
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd, passed_mode)
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the grille.</span>")
+5 -3
View File
@@ -188,8 +188,10 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
if(locked)
return //don't let you cremate something twice or w/e
// Make sure we don't delete the actual morgue and its tray
var/list/conts = GetAllContents() - src - connected
if(contents.len <= 1)
if(conts.len <= 1)
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
return
@@ -199,7 +201,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
locked = 1
update_icon()
for(var/mob/living/M in contents)
for(var/mob/living/M in conts)
if (M.stat != DEAD)
M.emote("scream")
if(user)
@@ -212,7 +214,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
M.ghostize()
qdel(M)
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
for(var/obj/O in conts) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
qdel(O)
+2 -2
View File
@@ -57,13 +57,13 @@
if(rods)
debris += new /obj/item/stack/rods(src, rods)
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
return FALSE
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd)
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the window.</span>")
-12
View File
@@ -134,18 +134,6 @@
soundin = pick('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg', \
'sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg', \
'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg')
//Vore sounds
if ("digestion_sounds")
soundin = pick('sound/vore/digest1.ogg', 'sound/vore/digest2.ogg', 'sound/vore/digest3.ogg', \
'sound/vore/digest4.ogg', 'sound/vore/digest5.ogg', 'sound/vore/digest6.ogg', \
'sound/vore/digest7.ogg', 'sound/vore/digest8.ogg', 'sound/vore/digest9.ogg', \
'sound/vore/digest10.ogg','sound/vore/digest11.ogg', 'sound/vore/digest12.ogg')
if ("death_gurgles")
soundin = pick('sound/vore/death1.ogg', 'sound/vore/death2.ogg', 'sound/vore/death3.ogg', \
'sound/vore/death4.ogg', 'sound/vore/death5.ogg', 'sound/vore/death6.ogg', \
'sound/vore/death7.ogg', 'sound/vore/death8.ogg', 'sound/vore/death9.ogg', 'sound/vore/death10.ogg')
if ("struggle_sounds")
soundin = pick('sound/vore/squish1.ogg', 'sound/vore/squish2.ogg', 'sound/vore/squish3.ogg', 'sound/vore/squish4.ogg')
return soundin
/proc/playsound_global(file, repeat=0, wait, channel, volume)
+2 -2
View File
@@ -200,7 +200,7 @@
/turf/open/floor/acid_melt()
ChangeTurf(baseturf)
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_FLOORWALL)
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 16)
@@ -212,7 +212,7 @@
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 4)
return FALSE
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a wall.</span>")
+2 -5
View File
@@ -44,7 +44,6 @@
/turf/closed/mineral/attackby(obj/item/weapon/pickaxe/P, mob/user, params)
if (!user.IsAdvancedToolUser())
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
@@ -67,18 +66,16 @@
feedback_add_details("pick_used_mining","[P.type]")
else
return attack_hand(user)
return
/turf/closed/mineral/proc/gets_drilled()
if (mineralType && (src.mineralAmt > 0) && (src.mineralAmt < 11))
var/i
for (i=0;i<mineralAmt;i++)
for(i in 1 to mineralAmt)
new mineralType(src)
feedback_add_details("ore_mined","[mineralType]|[mineralAmt]")
feedback_add_details("ore_mined",mineralType)
ChangeTurf(turf_type, defer_change)
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
return
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash >= 2)
@@ -251,12 +251,12 @@
if(prob(30))
dismantle_wall()
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
if(!the_rcd.canRturf)
return FALSE
return ..()
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
if(!the_rcd.canRturf)
return FALSE
return ..()
+2 -2
View File
@@ -258,13 +258,13 @@
/turf/closed/wall/acid_melt()
dismantle_wall(1)
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 40, "cost" = 26)
return FALSE
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the wall.</span>")
+15 -4
View File
@@ -12,7 +12,7 @@
var/destination_x
var/destination_y
var/global/datum/gas_mixture/space/space_gas = new
var/global/datum/gas_mixture/immutable/space/space_gas = new
plane = PLANE_SPACE
light_power = 0.25
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
@@ -159,18 +159,29 @@
return 0
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
if(!CanBuildHere())
return FALSE
switch(the_rcd.mode)
if(RCD_FLOORWALL)
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
return FALSE
/turf/open/space/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/turf/open/space/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a floor.</span>")
ChangeTurf(/turf/open/floor/plating)
return TRUE
return FALSE
return FALSE
/turf/open/space/ReplaceWithLattice()
var/dest_x = destination_x
var/dest_y = destination_y
var/dest_z = destination_z
..()
destination_x = dest_x
destination_y = dest_y
destination_z = dest_z