Merge branch 'incremental_tg' r5514 (11/1/2013) into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/ATMOSPHERICS/components/unary/vent_pump.dm
	code/ATMOSPHERICS/components/unary/vent_scrubber.dm
	code/__HELPERS/game.dm
	code/controllers/shuttle_controller.dm
	code/datums/datumvars.dm
	code/datums/supplypacks.dm
	code/defines/obj/storage.dm
	code/defines/obj/vending.dm
	code/defines/obj/weapon.dm
	code/defines/procs/command_alert.dm
	code/game/area/Space Station 13 areas.dm
	code/game/atoms.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/runes.dm
	code/game/gamemodes/events.dm
	code/game/gamemodes/events/dust.dm
	code/game/gamemodes/events/miniblob.dm
	code/game/gamemodes/events/ninja_equipment.dm
	code/game/gamemodes/factions.dm
	code/game/gamemodes/game_mode.dm
	code/game/gamemodes/gameticker.dm
	code/game/jobs/access.dm
	code/game/jobs/job/assistant.dm
	code/game/jobs/job/captain.dm
	code/game/jobs/job/civilian.dm
	code/game/jobs/job/engineering.dm
	code/game/jobs/job/medical.dm
	code/game/jobs/job/science.dm
	code/game/jobs/job/security.dm
	code/game/jobs/job_controller.dm
	code/game/machinery/alarm.dm
	code/game/machinery/atmo_control.dm
	code/game/machinery/atmoalter/area_atmos_computer.dm
	code/game/machinery/bots/medbot.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/computer/ai_core.dm
	code/game/machinery/computer/atmos_alert.dm
	code/game/machinery/computer/card.dm
	code/game/machinery/computer/cloning.dm
	code/game/machinery/computer/computer.dm
	code/game/machinery/computer/message.dm
	code/game/machinery/computer/pod.dm
	code/game/machinery/computer/prisoner.dm
	code/game/machinery/computer/syndicate_shuttle.dm
	code/game/machinery/constructable_frame.dm
	code/game/machinery/doors/door.dm
	code/game/machinery/doors/firedoor.dm
	code/game/machinery/newscaster.dm
	code/game/machinery/recharger.dm
	code/game/machinery/spaceheater.dm
	code/game/machinery/telecomms/broadcaster.dm
	code/game/machinery/telecomms/logbrowser.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/machinery/teleporter.dm
	code/game/machinery/wishgranter.dm
	code/game/mecha/mech_fabricator.dm
	code/game/mecha/working/ripley.dm
	code/game/objects/items.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/flashlight.dm
	code/game/objects/items/devices/radio/encryptionkey.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/stacks/medical.dm
	code/game/objects/items/weapons/cards_ids.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/hydroponics.dm
	code/game/objects/items/weapons/manuals.dm
	code/game/objects/items/weapons/secstorage/secstorage.dm
	code/game/objects/items/weapons/storage/backpack.dm
	code/game/objects/items/weapons/storage/firstaid.dm
	code/game/objects/items/weapons/storage/kit.dm
	code/game/objects/items/weapons/storage/storage.dm
	code/game/objects/items/weapons/storage/toolbox.dm
	code/game/objects/items/weapons/storage/uplink_kits.dm
	code/game/objects/items/weapons/stunbaton.dm
	code/game/objects/items/weapons/surgery_tools.dm
	code/game/objects/items/weapons/tools.dm
	code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
	code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm
	code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
	code/game/objects/structures/crates_lockers/closets/secure/security.dm
	code/game/objects/structures/electricchair.dm
	code/game/objects/structures/extinguisher.dm
	code/game/objects/structures/watercloset.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/game/vehicles/airtight/airtight.dm
	code/game/vehicles/vehicle.dm
	code/global.dm
	code/modules/DetectiveWork/evidence.dm
	code/modules/admin/IsBanned.dm
	code/modules/admin/player_panel.dm
	code/modules/admin/verbs/diagnostics.dm
	code/modules/admin/verbs/getlogs.dm
	code/modules/client/preferences.dm
	code/modules/clothing/masks/miscellaneous.dm
	code/modules/clothing/spacesuits/rig.dm
	code/modules/clothing/suits/miscellaneous.dm
	code/modules/critters/critter_defenses.dm
	code/modules/detectivework/scanner.dm
	code/modules/flufftext/Hallucination.dm
	code/modules/food/recipes_microwave.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mining/satchel_ore_boxdm.dm
	code/modules/mob/dead/observer/observer.dm
	code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
	code/modules/mob/living/carbon/alien/special/facehugger.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/carbon/carbon_defines.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_attackhand.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/carbon/human/say.dm
	code/modules/mob/living/carbon/human/update_icons.dm
	code/modules/mob/living/carbon/metroid/metroid.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/silicon/ai/life.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/mob_cleanup.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/mob_transformation_simple.dm
	code/modules/paperwork/clipboard.dm
	code/modules/paperwork/folders.dm
	code/modules/paperwork/paper.dm
	code/modules/paperwork/paperbin.dm
	code/modules/paperwork/pen.dm
	code/modules/power/cable.dm
	code/modules/projectiles/guns/energy/special.dm
	code/modules/projectiles/guns/projectile/revolver.dm
	code/modules/projectiles/projectile/change.dm
	code/modules/projectiles/projectile/special.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/glass.dm
	code/modules/reagents/reagent_containers/hypospray.dm
	code/modules/recycling/sortingmachinery.dm
	code/modules/research/designs.dm
	config/config.txt
	html/changelog.html
	icons/mob/head.dmi
	icons/mob/hud.dmi
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
	icons/mob/mask.dmi
	icons/mob/suit.dmi
	icons/mob/ties.dmi
	icons/mob/uniform.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/masks.dmi
	icons/obj/clothing/suits.dmi
	icons/obj/clothing/ties.dmi
	icons/obj/grenade.dmi
	icons/obj/projectiles.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-01-11 22:10:41 +10:00
637 changed files with 28812 additions and 21593 deletions

View File

@@ -8,7 +8,11 @@ client/verb/tcssave()
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
Server.setcode( winget(src, "tcscode", "text") ) // this actually saves the code from input to the server
var/tcscode=winget(src, "tcscode", "text")
var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
diary << msg
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[mob.x];Y=[mob.y];Z=[mob.z]'>JMP</a>)",0,1)
Server.setcode( tcscode ) // this actually saves the code from input to the server
src << output(null, "tcserror") // clear the errors
else
src << output(null, "tcserror")
@@ -179,4 +183,29 @@ client/verb/tcsrevert()
src << output("<font color = red>Failed to revert: Unable to locate machine.</font color>", "tcserror")
client/verb/tcsclearmem()
set hidden = 1
if(mob.machine || issilicon(mob))
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
Server.memory = list() // clear the memory
// Show results
src << output(null, "tcserror")
src << output("<font color = blue>Server memory cleared!</font color>", "tcserror")
for(var/mob/M in Machine.viewingcode)
if(M.client)
M << output("<font color = blue>Server memory cleared!</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate server machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")

View File

@@ -68,8 +68,7 @@
interpreter.SetVar("$medical", 1355)
interpreter.SetVar("$engineering",1357)
interpreter.SetVar("$security", 1359)
interpreter.SetVar("$mining", 1349)
interpreter.SetVar("$cargo", 1347)
interpreter.SetVar("$supply", 1347)
// Signal data
@@ -119,7 +118,7 @@
@param replacestring: the string to replace the substring with
*/
interpreter.SetProc("replace", /proc/replacetext)
interpreter.SetProc("replace", /proc/string_replacetext)
/*
-> Locates an element/substring inside of a list or string
@@ -223,10 +222,13 @@ datum/signal
proc/tcombroadcast(var/message, var/freq, var/source, var/job)
var/mob/living/carbon/human/H = new
var/datum/signal/newsign = new
var/obj/machinery/telecomms/server/S = data["server"]
var/obj/item/device/radio/hradio
var/obj/item/device/radio/hradio = S.server_radio
if(!hradio)
error("[src] has no radio.")
return
if((!message || message == "") && message != 0)
message = "*beep*"
@@ -241,8 +243,8 @@ datum/signal
if(!job)
job = "?"
newsign.data["mob"] = H
newsign.data["mobtype"] = H.type
newsign.data["mob"] = null
newsign.data["mobtype"] = /mob/living/carbon/human
if(source in S.stored_names)
newsign.data["name"] = source
else
@@ -259,15 +261,14 @@ datum/signal
var/datum/radio_frequency/connection = radio_controller.return_frequency(freq)
newsign.data["connection"] = connection
// The radio is a radio headset!
if(!hradio)
hradio = new /obj/item/device/radio/headset
newsign.data["radio"] = hradio
newsign.data["vmessage"] = H.voice_message
newsign.data["vname"] = H.voice_name
newsign.data["vmessage"] = message
newsign.data["vname"] = source
newsign.data["vmask"] = 0
newsign.data["level"] = list()
var/pass = S.relay_information(newsign, "/obj/machinery/telecomms/hub")
if(!pass)
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters
S.relay_information(newsign, "/obj/machinery/telecomms/hub")

View File

@@ -1,5 +1,5 @@
// Script -> BYOND code procs
#define SCRIPT_MAX_REPLACEMENTS_ALLOWED 200
// --- List operations (lists known as vectors in n_script) ---
// Clone of list()
@@ -173,6 +173,8 @@ proc/n_repeat(var/string, var/amount)
if(istext(string) && isnum(amount))
var/i
var/newstring = ""
if(length(newstring)*amount >=1000)
return
for(i=0, i<=amount, i++)
if(i>=1000)
break
@@ -242,3 +244,48 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
if(isnum(num)&&isnum(min)&&isnum(max))
return ((min <= num) && (num <= max))
// END OF BY DONKIE :(
// Non-recursive
// Imported from Mono string.ReplaceUnchecked
/proc/string_replacetext(var/haystack,var/a,var/b)
if(istext(haystack)&&istext(a)&&istext(b))
var/i = 1
var/lenh=lentext(haystack)
var/lena=lentext(a)
//var/lenb=lentext(b)
var/count = 0
var/list/dat = list()
while (i < lenh)
var/found = findtext(haystack, a, i, 0)
//diary << "findtext([haystack], [a], [i], 0)=[found]"
if (found == 0) // Not found
break
else
if (count < SCRIPT_MAX_REPLACEMENTS_ALLOWED)
dat+=found
count+=1
else
//diary << "Script found [a] [count] times, aborted"
break
//diary << "Found [a] at [found]! Moving up..."
i = found + lena
if (count == 0)
return haystack
//var/nlen = lenh + ((lenb - lena) * count)
var/buf = copytext(haystack,1,dat[1]) // Prefill
var/lastReadPos = 0
for (i = 1, i <= count, i++)
var/precopy = dat[i] - lastReadPos-1
//internal static unsafe void CharCopy (String target, int targetIndex, String source, int sourceIndex, int count)
//fixed (char* dest = target, src = source)
//CharCopy (dest + targetIndex, src + sourceIndex, count);
//CharCopy (dest + curPos, source + lastReadPos, precopy);
buf+=copytext(haystack,lastReadPos,precopy)
diary << "buf+=copytext([haystack],[lastReadPos],[precopy])"
diary<<"[buf]"
lastReadPos = dat[i] + lena
//CharCopy (dest + curPos, replace, newValue.length);
buf+=b
diary<<"[buf]"
buf+=copytext(haystack,lastReadPos, 0)
return buf