Merge branch 'master' into adminin

This commit is contained in:
Crazy Lemon
2017-03-03 21:45:41 -08:00
committed by Crazylemon64
244 changed files with 11181 additions and 6402 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
@@ -242,7 +242,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 +258,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 +401,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 +463,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 +562,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 +573,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()
@@ -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"
-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>")
+30 -24
View File
@@ -10,7 +10,6 @@
var/list/oxytanks = list() //sorry for the similar var names
var/list/platanks = list()
/obj/structure/dispenser/oxygen
plasmatanks = 0
@@ -18,6 +17,7 @@
oxygentanks = 0
/obj/structure/dispenser/New()
..()
update_icon()
/obj/structure/dispenser/update_icon()
@@ -31,43 +31,49 @@
/obj/structure/dispenser/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/structure/dispenser/attack_ghost(mob/user)
interact(user)
/obj/structure/dispenser/interact(mob/user)
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 1
add_fingerprint(user)
ui_interact(user)
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user, params)
/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)
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, 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>")
@@ -75,7 +81,6 @@
else
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
anchored = 1
return
/obj/structure/dispenser/Topic(href, href_list)
if(..())
@@ -109,6 +114,7 @@
update_icon()
add_fingerprint(usr)
updateUsrDialog()
nanomanager.update_uis(src)
else
usr << browse(null, "window=dispenser")
return
nanomanager.close_user_uis(usr,src)
return 1