Merge remote-tracking branch 'origin/master' into modular_computers

This commit is contained in:
davipatury
2017-03-04 15:44:20 -03:00
323 changed files with 13245 additions and 7898 deletions
@@ -1,228 +0,0 @@
//This item is not completely unused- the central datacore datum uses it.
/*
* This item is completely unused, but removing it will break something in R&D and Radio code causing PDA and Ninja code to fail on compile
*/
/obj/effect/datacore
name = "datacore"
var/medical[] = list()
var/general[] = list()
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
/obj/effect/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/ser = new()
var/list/sup = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"]
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
// to_chat(world, "[name]: [rank]")
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in service_positions)
ser[name] = rank
department = 1
if(real_rank in supply_positions)
sup[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(ser.len > 0)
dat += "<tr><th colspan=3>Service</th></tr>"
for(name in ser)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[ser[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sup.len > 0)
dat += "<tr><th colspan=3>Supply</th></tr>"
for(name in sup)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sup[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/*
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
Instead of creating this list over and over when someone leaves their PDA open to the page
we'll only update it when it changes. The PDA_Manifest global list is zeroed out upon any change
using /obj/effect/datacore/proc/manifest_inject( ), or manifest_insert( )
*/
var/global/list/PDA_Manifest = list()
/obj/effect/datacore/proc/get_manifest_json()
if(PDA_Manifest.len)
return
var/heads[0]
var/sec[0]
var/eng[0]
var/med[0]
var/sci[0]
var/ser[0]
var/sup[0]
var/bot[0]
var/misc[0]
for(var/datum/data/record/t in data_core.general)
var/name = sanitize(t.fields["name"])
var/rank = sanitize(t.fields["rank"])
var/real_rank = t.fields["real_rank"]
var/isactive = t.fields["p_stat"]
var/department = 0
var/depthead = 0 // Department Heads will be placed at the top of their lists.
if(real_rank in command_positions)
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
depthead = 1
if(rank == "Captain" && heads.len != 1)
heads.Swap(1, heads.len)
if(real_rank in security_positions)
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sec.len != 1)
sec.Swap(1, sec.len)
if(real_rank in engineering_positions)
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && eng.len != 1)
eng.Swap(1, eng.len)
if(real_rank in medical_positions)
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && med.len != 1)
med.Swap(1, med.len)
if(real_rank in science_positions)
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sci.len != 1)
sci.Swap(1, sci.len)
if(real_rank in service_positions)
ser[++ser.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && ser.len != 1)
ser.Swap(1, ser.len)
if(real_rank in supply_positions)
sup[++sup.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sup.len != 1)
sup.Swap(1, sup.len)
if(real_rank in nonhuman_positions)
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(!department && !(name in heads))
misc[++misc.len] = list("name" = name, "rank" = rank, "active" = isactive)
PDA_Manifest = list(\
"heads" = heads,\
"sec" = sec,\
"eng" = eng,\
"med" = med,\
"sci" = sci,\
"ser" = ser,\
"sup" = sup,\
"bot" = bot,\
"misc" = misc\
)
return
@@ -0,0 +1,55 @@
/obj/effect/spawner/random_barrier
name = "random tile"
var/list/result = list(
/turf/simulated/floor/plasteel = 1,
/turf/simulated/wall = 1,
/obj/structure/falsewall = 1,
/obj/effect/spawner/window/reinforced = 1,
/obj/machinery/door/airlock = 1,
/obj/machinery/door/airlock/welded = 1,
/obj/structure/barricade/wooden = 1)
// This needs to come before the initialization wave because
// the thing it creates might need to be initialized too
/obj/effect/spawner/random_barrier/New()
. = ..()
var/turf/T = get_turf(src)
if(!T)
log_runtime(EXCEPTION("Barrier spawner placed in nullspace!"), src)
return
var/thing_to_place = pickweight(result)
if(ispath(thing_to_place, /turf))
T.ChangeTurf(thing_to_place)
else
new thing_to_place(T)
qdel(src)
/obj/effect/spawner/random_barrier/wall_probably
name = "probably a wall"
result = list(
/turf/simulated/wall = 9,
/obj/structure/falsewall = 1
)
/obj/effect/spawner/random_barrier/floor_probably
name = "probably a floor"
result = list(
/turf/simulated/floor/plasteel = 3,
/turf/simulated/wall = 1
)
/obj/effect/spawner/random_barrier/obstruction
name = "obstruction"
result = list(
/turf/simulated/wall = 1,
/obj/structure/falsewall = 1,
/obj/structure/barricade/wooden = 1,
/obj/machinery/door/airlock/welded = 1
)
/obj/effect/spawner/random_barrier/possibly_welded_airlock
name = "possibly welded airlock"
result = list(
/obj/machinery/door/airlock = 3,
/obj/machinery/door/airlock/welded = 1
)
+15 -18
View File
@@ -12,24 +12,22 @@
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot speak in IC (muted).")
return
if(!ishuman(user))
to_chat(user, "\red You don't know how to use this!")
if(user.client && (user.client.prefs.muted & MUTE_IC))
to_chat(src, "<span class='warning'>You cannot speak in IC (muted).</span>")
return
if(user.silent)
if(!ishuman(user))
to_chat(user, "<span class='warning'>You don't know how to use this!</span>")
return
if(!user.can_speak())
to_chat(user, "<span class='warning'>You find yourself unable to speak at all.</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H && H.mind)
if(H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(H && H.mind && H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(spamcheck)
to_chat(user, "\red \The [src] needs to recharge!")
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
return
var/message = input(user, "Shout a message:", "Megaphone") as text|null
@@ -39,28 +37,27 @@
if(!message)
return
message = capitalize(message)
if((src.loc == user && usr.stat == 0))
if((loc == user && !user.incapacitated()))
if(emagged)
if(insults)
saymsg(user, pick(insultmsg))
insults--
else
to_chat(user, "\red *BZZZZzzzzzt*")
to_chat(user, "<span class='warning'>*BZZZZzzzzzt*</span>")
else
saymsg(user, message)
spamcheck = 1
spawn(20)
spamcheck = 0
return
/obj/item/device/megaphone/proc/saymsg(mob/living/user as mob, message)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <FONT size=3>\"[message]\"</FONT></span>", hearing_distance = 14)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
for(var/obj/O in oview(14, get_turf(src)))
O.hear_talk(user, "<FONT size=3>[message]</FONT>")
O.hear_talk(user, "<span class='reallybig'>[message]</span>")
/obj/item/device/megaphone/emag_act(user as mob)
if(!emagged)
to_chat(user, "\red You overload \the [src]'s voice synthesizer.")
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
emagged = 1
insults = rand(1, 3)//to prevent dickflooding
+6 -11
View File
@@ -180,11 +180,6 @@ var/global/list/default_medbay_channels = list(
/mob/dead/observer/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses)
return can_admin_interact()
/obj/item/device/radio/proc/text_wires()
if(b_stat)
return wires.GetInteractWindow()
return
/obj/item/device/radio/proc/ToggleBroadcast()
broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
@@ -242,7 +237,6 @@ var/global/list/default_medbay_channels = list(
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if(channel == "department")
// to_chat(world, "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
channel = channels[1]
connection = secure_radio_connections[channel]
else
@@ -259,9 +253,8 @@ var/global/list/default_medbay_channels = list(
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
4, 0, zlevel, connection.frequency, follow_target=follow_target)
4, 0, zlevel, connection.frequency, follow_target = follow_target)
qdel(A)
return
// Just a dummy mob used for making announcements, so we don't create AIs to do this
// I'm not sure who thought that was a good idea. -- Crazylemon
@@ -403,6 +396,7 @@ var/global/list/default_medbay_channels = list(
// Identity-associated tags:
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"race" = signal.get_race(M),
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
@@ -464,6 +458,7 @@ var/global/list/default_medbay_channels = list(
"mob" = M, // store a reference to the mob
"mobtype" = M.type, // the mob's type
"race" = signal.get_race(M), // text to show next to mob in comms log console
"realname" = real_name, // the mob's real name
"name" = displayname, // the mob's display name
"job" = jobname, // the mob's job
@@ -562,7 +557,7 @@ var/global/list/default_medbay_channels = list(
var/range = receive_range(freq, level)
if(range > -1)
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/proc/is_listening()
var/is_listening = TRUE
if(!on)
@@ -573,11 +568,11 @@ var/global/list/default_medbay_channels = list(
is_listening = FALSE
return is_listening
/obj/item/device/radio/proc/send_announcement()
if(is_listening())
return get_mobs_in_view(canhear_range, src)
return null
/obj/item/device/radio/examine(mob/user, var/distance = -1)
@@ -17,24 +17,41 @@ Mineral Sheets
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("Breakdown into sand", /obj/item/weapon/ore/glass, 1, one_per_turf = 0, on_floor = 1), \
)
var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("silver tile", /obj/item/stack/tile/mineral/silver, 1, 4, 20), \
null, \
new/datum/stack_recipe("Janitor Statue", /obj/structure/statue/silver/janitor, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Sec Officer Statue", /obj/structure/statue/silver/sec, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Sec Borg Statue", /obj/structure/statue/silver/secborg, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Med Doctor Statue", /obj/structure/statue/silver/md, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Med Borg Statue", /obj/structure/statue/silver/medborg, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("diamond tile", /obj/item/stack/tile/mineral/diamond, 1, 4, 20), \
null, \
new/datum/stack_recipe("Captain Statue", /obj/structure/statue/diamond/captain, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Hologram Statue", /obj/structure/statue/diamond/ai1, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("uranium tile", /obj/item/stack/tile/mineral/uranium, 1, 4, 20), \
null, \
new/datum/stack_recipe("Nuke Statue", /obj/structure/statue/uranium/nuke, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Engineer Statue", /obj/structure/statue/uranium/eng, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/gold_recipes = list ( \
@@ -42,6 +59,12 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \
null, \
new/datum/stack_recipe("gold tile", /obj/item/stack/tile/mineral/gold, 1, 4, 20), \
null, \
new/datum/stack_recipe("HoS Statue", /obj/structure/statue/gold/hos, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("HoP Statue", /obj/structure/statue/gold/hop, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("CE Statue", /obj/structure/statue/gold/ce, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("RD Statue", /obj/structure/statue/gold/rd, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("CMO Statue", /obj/structure/statue/gold/cmo, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("Simple Crown", /obj/item/clothing/head/crown, 5), \
)
@@ -49,6 +72,9 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("plasma tile", /obj/item/stack/tile/mineral/plasma, 1, 4, 20), \
null, \
new/datum/stack_recipe("Scientist Statue", /obj/structure/statue/plasma/scientist, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Xenomorph Statue", /obj/structure/statue/plasma/xeno, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
@@ -71,6 +97,8 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
var/global/list/datum/stack_recipe/bananium_recipes = list ( \
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
null, \
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("bananium computer frame", /obj/structure/computerframe/HONKputer, 50, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bananium grenade casing", /obj/item/weapon/grenade/bananade/casing, 4, on_floor = 1), \
)
@@ -79,6 +107,8 @@ var/global/list/datum/stack_recipe/tranquillite_recipes = list ( \
new/datum/stack_recipe("invisible wall", /obj/structure/barricade/mime, 5, one_per_turf = 1, on_floor = 1, time = 50), \
null, \
new/datum/stack_recipe("silent tile", /obj/item/stack/tile/mineral/tranquillite, 1, 4, 20), \
null, \
new/datum/stack_recipe("Mime Statue", /obj/structure/statue/tranquillite/mime, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/abductor_recipes = list ( \
@@ -80,8 +80,7 @@
//TODO; Add support for reagents in water.
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
return
var/Refill = AttemptRefill(target, user)
if(Refill)
if(AttemptRefill(target, user))
return
if(!safety)
if(src.reagents.total_volume < 1)
@@ -164,4 +163,4 @@
if(W.loc == my_target) break
sleep(2)
else
return ..()
return ..()
@@ -3,6 +3,7 @@
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
var/mobname = "Will Robinson"
activated = 0
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_station, /area/syndicate_mothership, /area/shuttle/syndicate_elite))
/obj/item/weapon/implant/death_alarm/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -33,26 +34,26 @@
/obj/item/weapon/implant/death_alarm/activate(var/cause)
var/mob/M = imp_in
var/area/t = get_area(M)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.follow_target = M
switch(cause)
if("death")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
if(is_type_in_typecache(t, stealth_areas))
//give the syndies a bit of stealth
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm")
else
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
qdel(a)
qdel(src)
if("emp")
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
var/name = prob(50) ? t.name : pick(teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
qdel(a)
else
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
qdel(a)
qdel(src)
qdel(a)
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
activate("emp") //let's shout that this dude is dead
@@ -45,7 +45,7 @@
/obj/item/weapon/tank/ui_action_click(mob/user)
toggle_internals(user)
/obj/item/weapon/tank/proc/toggle_internals(mob/user)
/obj/item/weapon/tank/proc/toggle_internals(mob/user, silent = FALSE)
var/mob/living/carbon/C = user
if(!istype(C))
return 0
@@ -65,13 +65,16 @@
if(can_open_valve)
if(C.internal)
to_chat(C, "<span class='notice'>You switch your internals to [src].</span>")
if(!silent)
to_chat(C, "<span class='notice'>You switch your internals to [src].</span>")
else
to_chat(C, "<span class='notice'>You open \the [src] valve.</span>")
if(!silent)
to_chat(C, "<span class='notice'>You open \the [src] valve.</span>")
C.internal = src
C.update_internals_hud_icon(1)
else
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
if(!silent)
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
return 0
C.update_action_buttons_icon()
@@ -22,7 +22,7 @@
..()
spawn(1)
if(!opened) // if closed, any item at the crate's loc is put in the contents
for(var/obj/item/I in src.loc)
for(var/obj/item/I in loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
@@ -39,7 +39,7 @@
return (!density)
/obj/structure/closet/proc/can_open()
if(src.welded)
if(welded)
return 0
return 1
@@ -59,46 +59,46 @@
throwing = 0
/obj/structure/closet/proc/open()
if(src.opened)
if(opened)
return 0
if(!src.can_open())
if(!can_open())
return 0
src.dump_contents()
dump_contents()
src.icon_state = src.icon_opened
src.opened = 1
icon_state = icon_opened
opened = 1
if(sound)
playsound(src.loc, src.sound, 15, 1, -3)
playsound(loc, sound, 15, 1, -3)
else
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
density = 0
return 1
/obj/structure/closet/proc/close()
if(!src.opened)
if(!opened)
return 0
if(!src.can_close())
if(!can_close())
return 0
var/itemcount = 0
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src.loc)
for(var/obj/effect/dummy/chameleon/AD in loc)
if(itemcount >= storage_capacity)
break
AD.forceMove(src)
itemcount++
for(var/obj/item/I in src.loc)
for(var/obj/item/I in loc)
if(itemcount >= storage_capacity)
break
if(!I.anchored)
I.forceMove(src)
itemcount++
for(var/mob/M in src.loc)
for(var/mob/M in loc)
if(itemcount >= storage_capacity)
break
if(istype (M, /mob/dead/observer))
@@ -109,37 +109,37 @@
M.forceMove(src)
itemcount++
src.icon_state = src.icon_closed
src.opened = 0
icon_state = icon_closed
opened = 0
if(sound)
playsound(src.loc, src.sound, 15, 1, -3)
playsound(loc, sound, 15, 1, -3)
else
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
density = 1
return 1
/obj/structure/closet/proc/toggle(mob/user as mob)
if(!(src.opened ? src.close() : src.open()))
/obj/structure/closet/proc/toggle(mob/user)
if(!(opened ? close() : open()))
to_chat(user, "<span class='notice'>It won't budge!</span>")
// this should probably use dump_contents()
/obj/structure/closet/ex_act(severity)
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(src.loc)
for(var/atom/movable/A in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(loc)
A.ex_act(severity++)
qdel(src)
if(2)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.forceMove(loc)
A.ex_act(severity++)
new /obj/item/stack/sheet/metal(loc)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.forceMove(loc)
A.ex_act(severity++)
new /obj/item/stack/sheet/metal(loc)
@@ -150,32 +150,32 @@
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
if(health <= 0)
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.forceMove(loc)
qdel(src)
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
/obj/structure/closet/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation(src)
visible_message("\red [user] destroys the [src]. ")
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.forceMove(loc)
qdel(src)
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
for(var/atom/movable/A in src)
A.forceMove(loc)
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
/obj/structure/closet/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/rcs) && !opened)
if(user in contents) //to prevent self-teleporting.
return
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
if(!is_level_reachable(src.z))
if(!is_level_reachable(z))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
@@ -194,7 +194,7 @@
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "\blue Teleporting [src.name]...")
to_chat(user, "\blue Teleporting [name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
E.teleporting = 0
@@ -216,7 +216,7 @@
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "\blue Teleporting [src.name]...")
to_chat(user, "\blue Teleporting [name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
E.teleporting = 0
@@ -237,9 +237,9 @@
to_chat(user, "<span class='warning'>Out of charges.</span>")
return
if(src.opened)
if(opened)
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, cutting_tool))
@@ -276,14 +276,14 @@
if(!WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
src.welded = !src.welded
src.update_icon()
welded = !welded
update_icon()
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
else
src.attack_hand(user)
attack_hand(user)
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
..()
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
@@ -297,24 +297,24 @@
return
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
return
if(!src.opened)
if(!opened)
return
if(istype(O, /obj/structure/closet))
return
step_towards(O, src.loc)
step_towards(O, loc)
if(user != O)
user.visible_message("<span class='danger'>[user] stuffs [O] into [src]!</span>", "<span class='danger'>You stuff [O] into [src]!</span>")
src.add_fingerprint(user)
add_fingerprint(user)
/obj/structure/closet/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) //Robots can open/close it, but not the AI
if(isrobot(user) && Adjacent(user)) //Robots can open/close it, but not the AI
attack_hand(user)
/obj/structure/closet/relaymove(mob/user as mob)
if(user.stat || !isturf(src.loc))
/obj/structure/closet/relaymove(mob/user)
if(user.stat || !isturf(loc))
return
if(!src.open())
if(!open())
to_chat(user, "<span class='notice'>It won't budge!</span>")
if(!lastbang)
lastbang = 1
@@ -323,14 +323,18 @@
spawn(30)
lastbang = 0
/obj/structure/closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
src.toggle(user)
/obj/structure/closet/attack_hand(mob/user)
add_fingerprint(user)
toggle(user)
/obj/structure/closet/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
toggle(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user as mob)
src.add_fingerprint(user)
if(!src.toggle())
/obj/structure/closet/attack_self_tk(mob/user)
add_fingerprint(user)
if(!toggle())
to_chat(usr, "<span class='notice'>It won't budge!</span>")
/obj/structure/closet/verb/verb_toggleopen()
@@ -338,12 +342,12 @@
set category = null
set name = "Toggle Open"
if(!usr.canmove || usr.stat || usr.restrained())
if(usr.incapacitated())
return
if(ishuman(usr))
src.add_fingerprint(usr)
src.toggle(usr)
add_fingerprint(usr)
toggle(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
@@ -399,8 +403,8 @@
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
for(var/mob/O in viewers(L.loc))
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
if(istype(src.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = src.loc
if(istype(loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
var/obj/structure/bigDelivery/BD = loc
BD.attack_hand(usr)
open()
@@ -19,14 +19,14 @@
/obj/structure/closet/secure_closet/can_open()
if(!..())
return 0
if(src.locked)
if(locked)
return 0
return ..()
/obj/structure/closet/secure_closet/close()
if(..())
if(broken)
icon_state = src.icon_off
icon_state = icon_off
return 1
else
return 0
@@ -36,29 +36,29 @@
O.emp_act(severity)
if(!broken)
if(prob(50/severity))
src.locked = !src.locked
src.update_icon()
locked = !locked
update_icon()
if(prob(20/severity) && !opened)
if(!locked)
open()
else
src.req_access = list()
src.req_access += pick(get_all_accesses())
req_access = list()
req_access += pick(get_all_accesses())
..()
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
if(src.opened)
/obj/structure/closet/secure_closet/proc/togglelock(mob/user)
if(opened)
to_chat(user, "<span class='notice'>Close the locker first.</span>")
return
if(src.broken)
if(broken)
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
return
if(user.loc == src)
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
return
if(src.allowed(user))
src.locked = !src.locked
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
if(allowed(user))
locked = !locked
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
to_chat(O, "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
@@ -66,14 +66,14 @@
else
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/rcs))
return ..()
if(src.opened)
if(opened)
if(istype(W, /obj/item/weapon/grab))
if(src.large)
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(large)
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
if(isrobot(user))
@@ -88,7 +88,7 @@
else
togglelock(user)
/obj/structure/closet/secure_closet/emag_act(user as mob)
/obj/structure/closet/secure_closet/emag_act(mob/user)
if(!broken)
broken = 1
locked = 0
@@ -97,24 +97,24 @@
flick(icon_broken, src)
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(src.locked)
src.togglelock(user)
/obj/structure/closet/secure_closet/attack_hand(mob/user)
add_fingerprint(user)
if(locked)
togglelock(user)
else
src.toggle(user)
toggle(user)
/obj/structure/closet/secure_closet/verb/verb_togglelock()
set src in oview(1) // One square distance
set category = "Object"
set name = "Toggle Lock"
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
if(usr.incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
add_fingerprint(usr)
togglelock(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
@@ -170,7 +170,7 @@
to_chat(usr, "\red You successfully break out!")
for(var/mob/O in viewers(L.loc))
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
if(istype(src.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = src.loc
if(istype(loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
var/obj/structure/bigDelivery/BD = loc
BD.attack_hand(usr)
open()
@@ -15,7 +15,6 @@
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/weapon/book/manual/faxes(src)
new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/weapon/storage/backpack/duffel/captain(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/captunic/capjacket(src)
@@ -71,7 +71,7 @@
M.forceMove(loc)
M.disabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
..()
/obj/structure/closet/statue/open()
@@ -138,18 +138,3 @@
dump_contents()
visible_message("\red [src] shatters!. ")
qdel(src)
/obj/structure/statue
name = "statue"
desc = "An incredibly lifelike marble carving"
icon = 'icons/obj/statue.dmi'
icon_state = "human_male"
density = 1
anchored = 1
obj/structure/statue/angel
icon_state = "angelseen"
obj/structure/statue/corgi
icon_state = "corgi"
@@ -80,7 +80,7 @@
src.opened = 0
return 1
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/structure/closet/crate/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
@@ -191,7 +191,7 @@
else
return
/obj/structure/closet/crate/attack_hand(mob/user as mob)
/obj/structure/closet/crate/attack_hand(mob/user)
if(manifest)
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
playsound(src.loc, 'sound/items/poster_ripped.ogg', 75, 1)
@@ -250,7 +250,7 @@
/obj/structure/closet/crate/secure/can_open()
return !locked
/obj/structure/closet/crate/secure/proc/togglelock(mob/user as mob)
/obj/structure/closet/crate/secure/proc/togglelock(mob/user)
if(src.opened)
to_chat(user, "<span class='notice'>Close the crate first.</span>")
return
@@ -280,7 +280,7 @@
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
/obj/structure/closet/crate/secure/attack_hand(mob/user)
if(manifest)
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
playsound(src.loc, 'sound/items/poster_ripped.ogg', 75, 1)
@@ -296,7 +296,7 @@
src.toggle(user)
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W, mob/user, params)
if(is_type_in_list(W, list(/obj/item/stack/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters,/obj/item/weapon/rcs)))
return ..()
if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)))
@@ -307,7 +307,7 @@
return
return ..()
/obj/structure/closet/crate/secure/emag_act(user as mob)
/obj/structure/closet/crate/secure/emag_act(mob/user)
if(locked)
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
@@ -38,7 +38,14 @@
/obj/structure/falsewall/CanAtmosPass(turf/T)
return !density
/obj/structure/falsewall/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
toggle(user)
/obj/structure/falsewall/attack_hand(mob/user)
toggle(user)
/obj/structure/falsewall/proc/toggle(mob/user)
if(opening)
return
+20 -4
View File
@@ -469,16 +469,32 @@
connected.connected = null
connected = null
return ..()
// Crematorium switch
/obj/machinery/crema_switch
desc = "Burn baby burn!"
name = "crematorium igniter"
icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
anchored = 1.0
req_access = list(access_crematorium)
var/on = 0
var/area/area = null
var/otherarea = null
var/id = 1
/obj/machinery/crema_switch/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
return attack_hand(user)
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
if(allowed(usr))
/obj/machinery/crema_switch/attack_hand(mob/user)
if(allowed(usr) || user.can_advanced_admin_interact())
for(var/obj/structure/crematorium/C in world)
if(C.id == id)
if(!C.cremating)
C.cremate(user)
else
to_chat(usr, "\red Access denied.")
return
to_chat(usr, "<span class='warning'>Access denied.</span>")
/mob/proc/update_morgue()
if(stat == DEAD)
-32
View File
@@ -1,32 +0,0 @@
/obj/structure/snowman
name = "snowman"
desc = "Seems someone made a snowman here."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "snowman"
anchored = 1
density = 1
/obj/structure/kidanstatue
name = "Obsidian Kidan warrior statue"
desc = "A beautifully carved and menacing statue of a Kidan warrior made out of obsidian. It looks very heavy."
icon = 'icons/obj/decorations.dmi'
icon_state = "kidanstatue"
anchored = 1
density = 1
/obj/structure/chickenstatue
name = "Bronze Chickenman Statue"
desc = "An antique and oriental-looking statue of a Chickenman made of bronze."
icon = 'icons/obj/decorations.dmi'
icon_state = "chickenstatue"
anchored = 1
density = 1
/obj/structure/clownstatue
name = "Bananium Clown Statue"
desc = "A golden statue made of bananium, commemorating the coronation of King Squiggles the Eighth."
icon = 'icons/obj/decorations.dmi'
icon_state = "clownstatue"
anchored = 1
density = 1
+370
View File
@@ -0,0 +1,370 @@
/obj/structure/statue
name = "statue"
desc = "Placeholder. Yell at Firecage if you SOMEHOW see this."
icon = 'icons/obj/statue.dmi'
icon_state = ""
density = 1
anchored = 0
var/hardness = 1
var/oreAmount = 5
var/material_drop_type = /obj/item/stack/sheet/metal
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user, params)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
if(iswrench(W))
if(anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] is loosening the [name]'s bolts.", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user, 40, target = src))
if(!loc || !anchored)
return
user.visible_message("[user] loosened the [name]'s bolts!", \
"<span class='notice'>You loosen the [name]'s bolts!</span>")
anchored = 0
else
if(!isfloorturf(loc))
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
return
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] is securing the [name]'s bolts...", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40, target = src))
if(!loc || anchored)
return
user.visible_message("[user] has secured the [name]'s bolts.", \
"<span class='notice'>You have secured the [name]'s bolts.</span>")
anchored = 1
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
user.visible_message("[user] is slicing apart the [name]...", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40, target = src))
if(!loc)
return
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name].</span>")
Dismantle(TRUE)
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
if(!loc)
return
user.visible_message("[user] destroys the [name]!", \
"<span class='notice'>You destroy the [name].</span>")
D.playDigSound()
qdel(src)
else if(iswelder(W) && !anchored)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40, target = src))
if(!loc)
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(TRUE)
else
hardness -= W.force/100
..()
CheckHardness()
return ..()
/obj/structure/statue/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
user.visible_message("[user] rubs some dust off from the [name]'s surface.", \
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
/obj/structure/statue/CanAtmosPass()
return !density
/obj/structure/statue/bullet_act(obj/item/projectile/Proj)
hardness -= Proj.damage
..()
CheckHardness()
/obj/structure/statue/proc/CheckHardness()
if(hardness <= 0)
Dismantle(TRUE)
/obj/structure/statue/proc/Dismantle(disassembled = TRUE)
if(material_drop_type)
var/drop_amt = oreAmount
if(!disassembled)
drop_amt -= 2
if(drop_amt > 0)
new material_drop_type(get_turf(src), drop_amt)
qdel(src)
/obj/structure/statue/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(TRUE)
if(2)
if(prob(20))
Dismantle(TRUE)
else
hardness--
CheckHardness()
if(3)
hardness -= 0.1
CheckHardness()
/obj/structure/statue/uranium
hardness = 3
light_range = 2
material_drop_type = /obj/item/stack/sheet/mineral/uranium
var/last_event = 0
var/active = null
/obj/structure/statue/uranium/nuke
name = "statue of a nuclear fission explosive"
desc = "This is a grand statue of a Nuclear Explosive. It has a sickening green colour."
icon_state = "nuke"
/obj/structure/statue/uranium/eng
name = "statue of an engineer"
desc = "This statue has a sickening green colour."
icon_state = "eng"
/obj/structure/statue/uranium/attackby(obj/item/weapon/W, mob/user, params)
radiate()
..()
/obj/structure/statue/uranium/Bumped(atom/user)
radiate()
..()
/obj/structure/statue/uranium/attack_hand(mob/user)
radiate()
..()
/obj/structure/statue/uranium/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
last_event = world.time
active = null
/obj/structure/statue/plasma
hardness = 2
material_drop_type = /obj/item/stack/sheet/mineral/plasma
desc = "This statue is suitably made from plasma."
/obj/structure/statue/plasma/scientist
name = "statue of a scientist"
icon_state = "sci"
/obj/structure/statue/plasma/xeno
name = "statue of a xenomorph"
icon_state = "xeno"
/obj/structure/statue/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature)
/obj/structure/statue/plasma/bullet_act(obj/item/projectile/Proj)
var/burn = FALSE
if(istype(Proj,/obj/item/projectile/beam))
PlasmaBurn(2500)
burn = TRUE
else if(istype(Proj,/obj/item/projectile/ion))
PlasmaBurn(500)
burn = TRUE
if(burn)
if(Proj.firer)
message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)](<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma statue ignited by [key_name(Proj.firer)] in ([x],[y],[z])")
else
message_admins("Plasma statue ignited by [Proj]. No known firer.(<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma statue ignited by [Proj] in ([x],[y],[z]). No known firer.")
..()
/obj/structure/statue/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma statue ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])")
ignite(is_hot(W))
return
..()
/obj/structure/statue/plasma/proc/PlasmaBurn()
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 160)
Dismantle(FALSE)
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
PlasmaBurn()
/obj/structure/statue/gold
hardness = 3
material_drop_type = /obj/item/stack/sheet/mineral/gold
desc = "This is a highly valuable statue made from gold."
/obj/structure/statue/gold/hos
name = "statue of the head of security"
icon_state = "hos"
/obj/structure/statue/gold/hop
name = "statue of the head of personnel"
icon_state = "hop"
/obj/structure/statue/gold/cmo
name = "statue of the chief medical officer"
icon_state = "cmo"
/obj/structure/statue/gold/ce
name = "statue of the chief engineer"
icon_state = "ce"
/obj/structure/statue/gold/rd
name = "statue of the research director"
icon_state = "rd"
/obj/structure/statue/silver
hardness = 3
material_drop_type = /obj/item/stack/sheet/mineral/silver
desc = "This is a valuable statue made from silver."
/obj/structure/statue/silver/md
name = "statue of a medical doctor"
icon_state = "md"
/obj/structure/statue/silver/janitor
name = "statue of a janitor"
icon_state = "jani"
/obj/structure/statue/silver/sec
name = "statue of a security officer"
icon_state = "sec"
/obj/structure/statue/silver/secborg
name = "statue of a security cyborg"
icon_state = "secborg"
/obj/structure/statue/silver/medborg
name = "statue of a medical cyborg"
icon_state = "medborg"
/obj/structure/statue/diamond
hardness = 10
material_drop_type = /obj/item/stack/sheet/mineral/diamond
desc = "This is a very expensive diamond statue"
/obj/structure/statue/diamond/captain
name = "statue of THE captain."
icon_state = "cap"
/obj/structure/statue/diamond/ai1
name = "statue of the AI hologram."
icon_state = "ai1"
/obj/structure/statue/diamond/ai2
name = "statue of the AI core."
icon_state = "ai2"
/obj/structure/statue/bananium
hardness = 3
material_drop_type = /obj/item/stack/sheet/mineral/bananium
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
var/spam_flag = 0
/obj/structure/statue/bananium/clown
name = "statue of a clown"
icon_state = "clown"
/obj/structure/statue/bananium/Bumped(atom/user)
honk()
..()
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user, params)
honk()
..()
/obj/structure/statue/bananium/attack_hand(mob/user)
honk()
..()
/obj/structure/statue/bananium/proc/honk()
if(!spam_flag)
spam_flag = 1
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
/obj/structure/statue/sandstone
hardness = 0.5
material_drop_type = /obj/item/stack/sheet/mineral/sandstone
/obj/structure/statue/sandstone/assistant
name = "statue of an assistant"
desc = "A cheap statue of sandstone for a greyshirt."
icon_state = "assist"
/obj/structure/statue/sandstone/venus //call me when we add marble i guess
name = "statue of a pure maiden"
desc = "An ancient marble statue. The subject is depicted with a floor-length braid and is wielding a toolbox. By Jove, it's easily the most gorgeous depiction of a woman you've ever seen. The artist must truly be a master of his craft. Shame about the broken arm, though."
icon = 'icons/obj/statuelarge.dmi'
icon_state = "venus"
/*
/obj/structure/statue/snow
hardness = 0.5
material_drop_type = /obj/item/stack/sheet/mineral/snow
/obj/structure/statue/snow/snowman
name = "snowman"
desc = "Several lumps of snow put together to form a snowman."
icon_state = "snowman"
*/
/obj/structure/statue/tranquillite
hardness = 0.5
material_drop_type = /obj/item/stack/sheet/mineral/tranquillite
desc = "..."
/obj/structure/statue/tranquillite/mime
name = "statue of a mime"
icon_state = "mime"
/obj/structure/statue/tranquillite/mime/AltClick(mob/user)//has 4 dirs
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
return
if(anchored)
to_chat(user, "It is fastened to the floor!")
return
setDir(turn(dir, 90))
////////////////////////////////
/obj/structure/snowman
name = "snowman"
desc = "Seems someone made a snowman here."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "snowman"
anchored = 1
density = 1
/obj/structure/kidanstatue
name = "Obsidian Kidan warrior statue"
desc = "A beautifully carved and menacing statue of a Kidan warrior made out of obsidian. It looks very heavy."
icon = 'icons/obj/decorations.dmi'
icon_state = "kidanstatue"
anchored = 1
density = 1
/obj/structure/chickenstatue
name = "Bronze Chickenman Statue"
desc = "An antique and oriental-looking statue of a Chickenman made of bronze."
icon = 'icons/obj/decorations.dmi'
icon_state = "chickenstatue"
anchored = 1
density = 1
@@ -60,19 +60,16 @@
set src in oview(1)
if(config.ghost_interaction)
src.dir = turn(src.dir, 90)
setDir(turn(dir, 90))
handle_rotation()
return
else
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
src.dir = turn(src.dir, 90)
handle_rotation()
if(usr.incapacitated())
return
setDir(turn(dir, 90))
handle_rotation()
/obj/structure/stool/bed/chair/AltClick(mob/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
+32 -23
View File
@@ -10,18 +10,16 @@
var/list/oxytanks = list() //sorry for the similar var names
var/list/platanks = list()
/obj/structure/dispenser/oxygen
plasmatanks = 0
/obj/structure/dispenser/plasma
oxygentanks = 0
/obj/structure/dispenser/New()
..()
update_icon()
/obj/structure/dispenser/update_icon()
overlays.Cut()
switch(oxygentanks)
@@ -31,40 +29,51 @@
if(1 to 4) overlays += "plasma-[plasmatanks]"
if(5 to INFINITY) overlays += "plasma-5"
/obj/structure/dispenser/attack_hand(mob/user)
if(..())
return 1
add_fingerprint(user)
ui_interact(user)
/obj/structure/dispenser/attack_hand(mob/user as mob)
/obj/structure/dispenser/attack_ghost(mob/user)
ui_interact(user)
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
user.set_machine(src)
var/dat = "[src]<br><br>"
dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "<A href='?src=[UID()];oxygen=1'>Dispense</A>" : "empty"]<br>"
dat += "Plasma tanks: [plasmatanks] - [plasmatanks ? "<A href='?src=[UID()];plasma=1'>Dispense</A>" : "empty"]"
user << browse(dat, "window=dispenser")
onclose(user, "dispenser")
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "tank_dispenser.tmpl", name, 275, 100, state = state)
ui.open()
/obj/structure/dispenser/ui_data(user)
var/list/data = list()
data["o_tanks"] = oxygentanks
data["p_tanks"] = plasmatanks
return data
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob, params)
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/tank/oxygen) || istype(I, /obj/item/weapon/tank/air) || istype(I, /obj/item/weapon/tank/anesthetic))
if(oxygentanks < 10)
user.drop_item()
I.loc = src
I.forceMove(src)
oxytanks.Add(I)
oxygentanks++
update_icon()
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is full.</span>")
updateUsrDialog()
return
nanomanager.update_uis(src)
if(istype(I, /obj/item/weapon/tank/plasma))
if(plasmatanks < 10)
user.drop_item()
I.loc = src
I.forceMove(src)
platanks.Add(I)
plasmatanks++
update_icon()
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is full.</span>")
updateUsrDialog()
return
nanomanager.update_uis(src)
if(istype(I, /obj/item/weapon/wrench))
if(anchored)
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
@@ -72,11 +81,11 @@
else
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
anchored = 1
return
/obj/structure/dispenser/Topic(href, href_list)
if(usr.stat || usr.restrained())
return
if(..())
return 1
if(Adjacent(usr))
usr.set_machine(src)
if(href_list["oxygen"])
@@ -105,7 +114,7 @@
update_icon()
add_fingerprint(usr)
updateUsrDialog()
nanomanager.update_uis(src)
else
usr << browse(null, "window=dispenser")
return
return
nanomanager.close_user_uis(usr,src)
return 1