Merge pull request #243 from SoundScopes/master

Scopes updates
This commit is contained in:
skull132
2014-08-25 20:38:09 +03:00
10 changed files with 363 additions and 37 deletions
Binary file not shown.
+11 -1
View File
@@ -21,7 +21,7 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
/client/proc/cmd_dev_reset_gravity()
set category = "Debug"
set name = "Restore Default Gravity"
set desc = "Resets all gravity on the entire server"
set desc = "Resets all gravity on the entire server(This spams Scopes like mad.)"
if(!check_rights(R_DEBUG|R_DEV)) return
@@ -36,6 +36,9 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
src << "\red The game hasn't started yet!"
return
if(alert(usr, "Be sure to warn Scopes, Chris, and Skull. This could be very spammy for their logs", "Restore gravity", "No", "Yes") == "No")
return 0
world << "\red \b Resetting Gravity Simulation."
gravity_is_on = 1
spawn(10)
@@ -44,10 +47,12 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
continue
A.has_gravity = 1
msg_scopes("Gravity reset in: [A.name]")
for(var/area/SubA in A.related)
SubA.has_gravity = 1
for(var/mob/living/carbon/human/M in SubA)
M:float(0)
msg_scopes("Did you enjoy that insane amount of things")
world << "\red Gravity Simulation reset."
feedback_add_details("admin_verb","RSG")
@@ -156,6 +161,7 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
var/list/localareas = list()
var/effectiverange = 255 //Currently unused due to errors
var/round_start = 2 //To help stop a bug with round start
var/has_been_charged = 0
/obj/machinery/gravity_field_generator/main/Del() // If we somehow get deleted, remove all of our other parts.
log_debug("Gravity Generator Destroyed")
@@ -329,6 +335,8 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
var/alert = 0
var/area/area = get_area(src)
if(new_state) // If we turned on
if(has_been_charged)
return
if(gravity_in_level() == 0)
alert = 1
gravity_is_on = 1
@@ -355,8 +363,10 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi
if(charging_state != POWER_IDLE)
if(charging_state == POWER_UP && charge_count >= 100)
set_state(1)
has_been_charged = 1
else if(charging_state == POWER_DOWN && charge_count <= 0)
set_state(0)
has_been_charged = 0
else
if(charging_state == POWER_UP)
charge_count += 2
+11 -7
View File
@@ -7,10 +7,11 @@
/obj/machinery/medical_alarm
name = "Medical Emergency button"
desc = "Medical Emergency button for when people are hurt"
icon = 'Scopes Files/Alarms.dmi'
icon = 'Scopes Files/Alarms.dmi' //temp holder until it's done
icon_state = "eng_stand"
anchored = 1
var/on = 1
var/played_sound = 0
var/area/area = null
var/otherarea = null
//luminosity = 1
@@ -40,6 +41,7 @@
icon_state = "eng_unlock"
else
icon_state = "eng_stand"
..()
/obj/machinery/medical_alarm/examine()
set src in oview(1)
@@ -50,7 +52,6 @@
src.attack_hand(user)
/obj/machinery/medical_alarm/attack_hand(mob/user)
// var/last_icon = icon_state
icon_state = "eng_press"
add_fingerprint(usr)
// if(!allowed(user))
@@ -62,24 +63,27 @@
for(var/area/A in area.master.related)
A.medical_alarm = on
spawn(10)
spawn(8)
A.updateicon()
for(var/obj/machinery/medical_alarm/L in A)
L.on = on
spawn(10)
spawn(8)
L.updateicon()
L.activate()
area.master.power_change()
/obj/machinery/medical_alarm/proc/make_noise()
for (var/mob/O in hearers(6, src.loc))
O << "Impliment Sound"
if(!played_sound)
O.playsound_local(src, 'Scopes Files/PowerPlant_Alarm.ogg', 10, 1, 0.5, 1)
O << "The [src] beeps"
played_sound = 1
/obj/machinery/medical_alarm/proc/activate()
if(on)
make_noise()
spawn(100)
activate()
else
played_sound = 0
return
+210
View File
@@ -0,0 +1,210 @@
// Sooooo Yeah.
//
// This is reverse of the heater code.
// Still want to make it use super cooled N2 instead of a power cell
// Changes will come but wanted to get it in the DME quickly
//
// This does work if you want to use it. Just needs sprites.
/obj/machinery/space_cooler
anchored = 0
density = 1
icon = 'icons/obj/atmos.dmi'
icon_state = "sheater0"
name = "space cooler"
desc = "Made by Space Amish using traditional space techniques, this cooler is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/on = 0
var/open = 0
var/set_temperature = 20 // in celcius, add T0C for kelvin
var/cooling_power = 40000
flags = FPRINT
New()
..()
cell = new(src)
cell.charge = 1000
cell.maxcharge = 1000
update_icon()
return
update_icon()
overlays.Cut()
icon_state = "sheater[on]"
if(open)
overlays += "sheater-open"
return
examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
usr << "The cooler is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(cell)
cell.emp_act(severity)
..(severity)
attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(open)
if(cell)
user << "There is already a power cell inside."
return
else
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
user.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].")
else
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
update_icon()
if(!open && user.machine == src)
user << browse(null, "window=spacecooler")
user.unset_machine()
else
..()
return
attack_hand(mob/user as mob)
src.add_fingerprint(user)
interact(user)
interact(mob/user as mob)
if(open)
var/dat
dat = "Power cell: "
if(cell)
dat += "<A href='byond://?src=\ref[src];op=cellremove'>Installed</A><BR>"
else
dat += "<A href='byond://?src=\ref[src];op=cellinstall'>Removed</A><BR>"
dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += "Set Temperature: "
dat += "<A href='?src=\ref[src];op=temp;val=-5'>-</A>"
dat += " [set_temperature]&deg;C "
dat += "<A href='?src=\ref[src];op=temp;val=5'>+</A><BR>"
user.set_machine(src)
user << browse("<HEAD><TITLE>Space cooler Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=spacecooler")
onclose(user, "spacecooler")
else
on = !on
user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].")
update_icon()
return
Topic(href, href_list)
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
switch(href_list["op"])
if("temp")
var/value = text2num(href_list["val"])
// limit to 20-90 degC
set_temperature = dd_range(-50, 20, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
updateDialog()
else
usr << browse(null, "window=spacecooler")
usr.unset_machine()
return
process()
if(on)
if(cell && cell.charge > 0)
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature != set_temperature + T0C)
var/transfer_moles = 0.25 * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
//world << "got [transfer_moles] moles at [removed.temperature]"
if(removed)
var/heat_capacity = removed.heat_capacity()
//world << "heating ([heat_capacity])"
if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
if(removed.temperature > set_temperature + T0C)
removed.temperature = min(removed.temperature - cooling_power/heat_capacity, TCMB) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
else
removed.temperature = max(removed.temperature + cooling_power/heat_capacity, 1000)
cell.use(cooling_power/20000)
//world << "now at [removed.temperature]"
env.merge(removed)
//world << "turf now at [env.temperature]"
else
on = 0
update_icon()
return
+2
View File
@@ -1469,5 +1469,7 @@
#include "interface\skin.dmf"
#include "maps\tgstation2.dmm"
#include "Scopes Files\gravitygenerator.dm"
#include "Scopes Files\medical_alarm.dm"
#include "Scopes Files\signal_modifier.dm"
#include "Scopes Files\space_cooler.dm"
// END_INCLUDE
+3
View File
@@ -238,7 +238,10 @@ datum/controller/vote
started_time = world.time
var/timedifference = round((world.time - last_vote_time))
var/timedifference_text
timedifference_text = time2text(timedifference, "hh:mm:ss")
msg_scopes("timedifference_text debug: [timedifference]")
timedifference_text = time2text(timedifference,"mm:ss")
msg_scopes("timedifference: [timedifference] timedifference_text: [timedifference_text] started_time: [started_time]")
for(var/client/C in admins)
C << "Time since last vote: [timedifference_text]"
var/text = "[capitalize(mode)] vote started by [initiator]."
+1
View File
@@ -98,6 +98,7 @@
if (A)
A.meteorhit(src)
message_admins("Meteor hit [A] at [src.x], [src.y], [src.z]([src ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>" : "null"])" , 0)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if (--src.hits <= 0)
+105 -27
View File
@@ -18,8 +18,39 @@
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
if(on)
user << "<span class='notice'>[src] is still active!</span>"
return
var/obj/item/weapon/grab/G = I
if(istype(G)) // handle grabbed mob
if(ismob(G.affecting))
var/mob/living/GM = G.affecting
for (var/mob/V in viewers(usr))
V.show_message("[usr] starts pushing [GM.name] into the fryer.", 3)
if(do_after(usr, 20))
var/body_part = fry_mob_by_limb(GM, user.zone_sel.selecting)
if(!body_part) //If you fry a valid part this will be set
for (var/mob/V in viewers(usr))
if(GM.sleeping||GM.resting)
V.show_message("[GM.name] is to much of a dead weight to be place in the fryer")
else
V.show_message("[GM.name] breaks free.", 3)
return
for (var/mob/C in viewers(src))
C.show_message("\red [GM.name]'s [body_part] has been placed in the [src] by [user].", 3)
del(G)
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has placed [GM.name] ([GM.ckey]) in in the fryer.</font>")
GM.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fried by [usr.name] ([usr.ckey])</font>")
msg_admin_attack("[usr] ([usr.ckey]) placed [GM] ([GM.ckey]) in a fryer. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
else
for (var/mob/V in viewers(usr))
V.show_message("[usr] broke free")
return
else
user << "<span class='notice'>[src] is still active!</span>"
return
if(!istype(I, /obj/item/weapon/reagent_containers/food/snacks/))
user << "<span class='warning'>Budget cuts won't let you put that in there.</span>"
return
@@ -27,31 +58,51 @@
user << "<span class='userdanger'>You cannot doublefry.</span>"
return
else
user << "<span class='notice'>You put [I] into [src].</span>"
on = TRUE
user.drop_item()
frying = I
frying.loc = src
icon_state = "fryer_on"
sleep(200)
if(frying && frying.loc == src)
var/obj/item/weapon/reagent_containers/food/snacks/deepfryholder/S = new(get_turf(src))
if(istype(frying, /obj/item/weapon/reagent_containers/))
var/obj/item/weapon/reagent_containers/food = frying
food.reagents.trans_to(S, food.reagents.total_volume)
S.color = "#FFAD33"
S.icon = frying.icon
S.overlays = I.overlays
S.icon_state = frying.icon_state
S.name = "deep fried [frying.name]"
S.desc = I.desc
frying.loc = S //this might be a bad idea.
icon_state = "fryer_off"
on = FALSE
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
fry_food(I, user)
/obj/machinery/deepfryer/proc/fry_mob_by_limb(var/mob/living/M, var/limb)
switch(limb)
if("head")
M.apply_damage(40, BURN, limb)
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your head."
return "head"
if("l_leg")
M.apply_damage(20, BURN, limb)
M.apply_damage(30, BURN, "l_foot")
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your left leg and foot."
return "left leg"
if("l_foot")
M.apply_damage(20, BURN, limb)
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your left foot."
return "left foot"
if("r_leg")
M.apply_damage(20, BURN, limb)
M.apply_damage(30, BURN, "r_foot")
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your right leg and foot."
return "right leg"
if("r_foot")
M.apply_damage(20, BURN, limb)
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your right foot."
return "right foot"
if("l_arm")
M.apply_damage(20, BURN, limb)
M.apply_damage(30, BURN, "l_hand")
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your left arm and hand."
return "left arm"
if("l_hand")
M.apply_damage(20, BURN, limb)
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your left hand."
return "left hand"
if("r_arm")
M.apply_damage(20, BURN, limb)
M.apply_damage(30, BURN, "r_hand")
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your right arm and hand."
return "right arm"
if("r_hand")
M.apply_damage(20, BURN, limb)
M << "\red Your thoughts are overwritten by the pain, as seering hot oil encompasses your right hand."
return "right hand"
return null
/obj/machinery/deepfryer/attack_hand(mob/user)
if(on && frying)
@@ -59,4 +110,31 @@
user.put_in_hands(frying)
frying = null
return
..()
..()
/obj/machinery/deepfryer/proc/fry_food(var/obj/I, var/mob/user)
user << "<span class='notice'>You put [I] into [src].</span>"
on = TRUE
user.drop_item()
frying = I
frying.loc = src
icon_state = "fryer_on"
sleep(200)
if(frying && frying.loc == src)
var/obj/item/weapon/reagent_containers/food/snacks/deepfryholder/S = new(get_turf(src))
if(istype(frying, /obj/item/weapon/reagent_containers/))
var/obj/item/weapon/reagent_containers/food = frying
food.reagents.trans_to(S, food.reagents.total_volume)
S.color = "#FFAD33"
S.icon = frying.icon
S.overlays = I.overlays
S.icon_state = frying.icon_state
S.name = "deep fried [frying.name]"
S.desc = I.desc
frying.loc = S //this might be a bad idea.
icon_state = "fryer_off"
on = FALSE
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
return
@@ -279,6 +279,9 @@
New()
..()
reagents.add_reagent("nutriment", 10)
Del()
contents = null
..()
/obj/item/weapon/reagent_containers/food/snacks/candy
name = "candy"
+17 -2
View File
@@ -56,9 +56,24 @@ should be listed in the changelog upon commit though. Thanks. -->
<!-- DO NOT REMOVE, MOVE, OR COPY THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->␍␍␍␍␍␍␍
<div class='commit sansserif'>
<h2 class='date'>25 August 2014</h2>
<h3 class='author'>SoundScopes updated:</h3>
<ul class='changes bgimages16'>
<li class='rscadd'>Workplace hazards baised of hair length</li>
<li class='bugfix'>Gavity Generator Fix</li>
<li class='bugfix'>Fryed food no longer drops it's original item when eaten</li>
<li class='wip'>Medical Alarms</li>
<li class='wip'>Air Conditioners</li>
<li class='tweak'>Admin Logs</li>
<li class='tweak'>Debug Logs</li>
</ul>
</div>
<div class='commit sansserif'>
<h2 class='date'>20 August 2014</h2>
<h3 class='author'> updated:</h3>
<h3 class='author'>SoundScopes updated:</h3>
<ul class='changes bgimages16'>
<li class='tweak'>Malf - Cameras reactivating now play the wirecutter sound, offering audible</li>
<li class='tweak'>Malf - Overload no longer breaches and does less damage</li>
@@ -75,7 +90,7 @@ should be listed in the changelog upon commit though. Thanks. -->
<div class='commit sansserif'>
<h2 class='date'>16 August 2014</h2>
<h3 class='author'>Sound Scopes updated:</h3>
<h3 class='author'>SoundScopes updated:</h3>
<ul class='changes bgimages16'>
<li class='rscadd'>Custom loadout - Green Plaid Skirt</li>
<li class='rscadd'>Custom loadout - Old Man Suit</li>