-You can make newlines with PDA notes.

-Fixed a bug where if an Alien manages to pickup an item that they shouldn't and put it in their pocket then it won't be stuck remain stuck, being unable to pickup the item you placed in your pocket. It will now instead just drop it if it detects the item in your contents.
-APC will auto-turn on equipment if there is enough power for a certain duration. I want to tweak this some more until I get the perfect balance.
-Updated the changelog

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4141 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-07-22 15:45:42 +00:00
parent 4a2e3c405a
commit 4f5f726edb
5 changed files with 28 additions and 6 deletions

View File

@@ -305,7 +305,7 @@ var/global/list/obj/machinery/camera/Cameras = list()
else else
P = W P = W
itemname = P.name itemname = P.name
info = P.note info = P.notehtml
U << "You hold \a [itemname] up to the camera ..." U << "You hold \a [itemname] up to the camera ..."
for(var/mob/living/silicon/ai/O in world) for(var/mob/living/silicon/ai/O in world)
//if (O.current == src) //if (O.current == src)

View File

@@ -32,7 +32,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/ttone = "beep" //The ringtone! var/ttone = "beep" //The ringtone!
var/honkamt = 0 //How many honks left when infected with honk.exe var/honkamt = 0 //How many honks left when infected with honk.exe
var/mimeamt = 0 //How many silence left when infected with mime.exe var/mimeamt = 0 //How many silence left when infected with mime.exe
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function. var/note = "" //Current note in the notepad function, without HTML.
var/notehtml = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function, with HTML.
var/cart = "" //A place to stick cartridge menu information var/cart = "" //A place to stick cartridge menu information
var/detonate = 1 // Can the PDA be blown up? var/detonate = 1 // Can the PDA be blown up?
@@ -333,7 +334,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<a href='byond://?src=\ref[src];choice=Lock'> Lock</a><br>" dat += "<a href='byond://?src=\ref[src];choice=Lock'> Lock</a><br>"
else else
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>" dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
dat += note dat += notehtml
if (2) if (2)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>" dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
@@ -536,6 +537,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (in_range(src, U) && loc == U) if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN) n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
if (mode == 1) if (mode == 1)
notehtml = dd_replacetext(n, "\n", "<BR>")
note = n note = n
else else
U << browse(null, "window=pda") U << browse(null, "window=pda")

View File

@@ -130,6 +130,8 @@
var/mob/living/carbon/alien/A = user var/mob/living/carbon/alien/A = user
if(!A.has_fine_manipulation || w_class >= 4) if(!A.has_fine_manipulation || w_class >= 4)
if(src in A.contents) // To stop Aliens having items stuck in their pockets
A.drop_from_inventory(src)
user << "Your claws aren't capable of such fine manipulation." user << "Your claws aren't capable of such fine manipulation."
return return

View File

@@ -63,6 +63,8 @@
"White" = 3, "White" = 3,
"Yellow" = 4, "Yellow" = 4,
) )
var/longtermpower = 10
//var/debug = 0
/proc/RandomAPCWires() /proc/RandomAPCWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else). //to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
@@ -1016,6 +1018,9 @@
if(terminal && terminal.powernet) if(terminal && terminal.powernet)
perapc = terminal.powernet.perapc perapc = terminal.powernet.perapc
//if(debug)
// world.log << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]"
if(cell && !shorted) if(cell && !shorted)
// draw power from cell as before // draw power from cell as before
@@ -1025,7 +1030,6 @@
if(excess > 0 || perapc > lastused_total) // if power excess, or enough anyway, recharge the cell if(excess > 0 || perapc > lastused_total) // if power excess, or enough anyway, recharge the cell
// by the same amount just used // by the same amount just used
cell.give(cellused) cell.give(cellused)
add_load(cellused/CELLRATE) // add the load used to recharge the cell add_load(cellused/CELLRATE) // add the load used to recharge the cell
@@ -1046,19 +1050,26 @@
lighting = autoset(lighting, 0) lighting = autoset(lighting, 0)
environ = autoset(environ, 0) environ = autoset(environ, 0)
// set channels depending on how much charge we have left // set channels depending on how much charge we have left
// Allow the APC to operate as normal if the cell can charge
if(charging && longtermpower < 10)
longtermpower += 1
else if(longtermpower > -10)
longtermpower -= 2
if(cell.charge <= 0) // zero charge, turn all off if(cell.charge <= 0) // zero charge, turn all off
equipment = autoset(equipment, 0) equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0) lighting = autoset(lighting, 0)
environ = autoset(environ, 0) environ = autoset(environ, 0)
area.poweralert(0, src) area.poweralert(0, src)
else if(cell.percent() < 15) // <15%, turn off lighting & equipment else if(cell.percent() < 15 && longtermpower < 0) // <15%, turn off lighting & equipment
equipment = autoset(equipment, 2) equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2) lighting = autoset(lighting, 2)
environ = autoset(environ, 1) environ = autoset(environ, 1)
area.poweralert(0, src) area.poweralert(0, src)
else if(cell.percent() < 30) // <30%, turn off equipment else if(cell.percent() < 30 && longtermpower < 0) // <30%, turn off equipment
equipment = autoset(equipment, 2) equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1) lighting = autoset(lighting, 1)
environ = autoset(environ, 1) environ = autoset(environ, 1)

View File

@@ -55,6 +55,13 @@ should be listed in the changelog upon commit tho. Thanks. -->
<li class="tweak">Supply shuttle arrival time reduced to 2 minutes</li> <li class="tweak">Supply shuttle arrival time reduced to 2 minutes</li>
<li class="bugfix">Hopefully fixed the toy haul problem which made it possible to get a million toys from arcade machines.</li> <li class="bugfix">Hopefully fixed the toy haul problem which made it possible to get a million toys from arcade machines.</li>
</ul> </ul>
<h3 class="author">Giacom updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">You can now make newlines with your PDA notes.</li>
<li class="tweak">You can now research and build the Light Replacer.</li>
<li class="tweak">You can now store donuts in the donut box. The next donut you pull out will be the last one you put in.</li>
<li class="tweak">APCs will auto-turn on if there is enough power in the grid, even if the powercell is below 30%. The APC needs to be charged for a long enough time before it starts turning equipment on, to avoid spazzing out. If you have any problems with it, such as equipment turning off and on repeatedly then please make an issue report with a screenshot of the APC.</li>
</ul>
</div> </div>
<div class="commit sansserif"> <div class="commit sansserif">