Random button added to traitor uplinks.

- All traitor items are available in the random button so long as you have the crystals to purchase it.
- This means it's possible (though very unlikely) to get 5 sets of revolver ammo.
- It's RANDOM, don't expect great stuff every time.

Made startSinglo() a game-master only verb in the debug tab.
- It is incredibly useful and time saving when testing stuff out before committing.

Added borgs, AIs and dead players to the list of protected paths in the delete all verb. 
- Unless someone can give me a valid reason as to why an admin would delete all ghosts.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3595 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-05-15 00:32:26 +00:00
parent c5e5a83a08
commit d336b65d1b
5 changed files with 105 additions and 5 deletions

View File

@@ -71,11 +71,104 @@ A list of items and costs is stored under the datum of every game mode, alongsid
src.menu_message += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>" src.menu_message += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
category_items++ category_items++
src.menu_message += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
src.menu_message += "<HR>" src.menu_message += "<HR>"
return return
Topic(href, href_list) Topic(href, href_list)
if (href_list["buy_item"]) if (href_list["buy_item"])
if(href_list["buy_item"] == "random")
var/list/randomItems = list()
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
//Add only items the player can afford:
if(uses > 19)
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
if(uses > 9)
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
randomItems.add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
//if(uses > 8) //Nothing... yet.
//if(uses > 7) //Nothing... yet.
if(uses > 6)
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
randomItems.Add("/obj/machinery/singularity_beacon/syndicate") //Singularity Beacon
if(uses > 5)
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
if(uses > 4)
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
randomItems.Add("/obj/item/device/powersink") //Powersink
if(uses > 3)
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
randomItems.Add("/obj/item/clothing/glasses/thermal") //Syndicate Space Suit
if(uses > 2)
randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
if(uses > 1)
var/list/usrItems = usr.get_contents()
var/hasRevolver = 0
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
if(istype(I,/obj/item/weapon/gun/projectile))
hasRevolver = 1
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
randomItems.Add("/obj/item/weapon/plastique") //C4
if(uses > 0)
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
if(!randomItems)
del(randomItems)
return 0
else
href_list["buy_item"] = pick(randomItems)
switch(href_list["buy_item"]) //Ok, this gets a little messy, sorry.
if("/obj/item/weapon/circuitboard/teleporter")
uses -= 20
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink")
uses -= 10
if("/obj/item/weapon/aiModule/syndicate" , "/obj/machinery/singularity_beacon/syndicate" , "/obj/item/weapon/storage/box/syndicate")
uses -= 7
if("/obj/item/weapon/gun/projectile")
uses -= 6
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
uses -= 5
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon" , "/obj/item/clothing/glasses/thermal")
uses -= 4
if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
"/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
"/obj/item/weapon/storage/syndie_kit/imp_freedom")
uses -= 3
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
uses -= 2
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
uses -= 1
del(randomItems)
return 1
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
return 0 return 0

View File

@@ -64,13 +64,11 @@ Implants;
/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals); /obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator; Whitespace:Seperator;
(Pointless) Badassery; (Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon); /obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
Whitespace:Seperator;"}
// Items removed from above: // Items removed from above:
/* /*
/obj/item/weapon/cloaking_device:4:Cloaking Device; //Replacing cloakers with thermals. -Pete /obj/item/weapon/cloaking_device:4:Cloaking Device; //Replacing cloakers with thermals. -Pete
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon); //That fucking balloon -Pete
*/ */
/datum/game_mode/proc/announce() //to be calles when round starts /datum/game_mode/proc/announce() //to be calles when round starts

View File

@@ -273,8 +273,9 @@
verbs += /client/proc/everyone_random verbs += /client/proc/everyone_random
verbs += /client/proc/only_one verbs += /client/proc/only_one
verbs += /client/proc/deadmin_self verbs += /client/proc/deadmin_self
verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs verbs += /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs += /client/proc/cinematic //show a cinematic sequence verbs += /client/proc/cinematic //show a cinematic sequence
verbs += /client/proc/startSinglo //Used to prevent the station from losing power while testing stuff out.
else return else return
return return

View File

@@ -329,7 +329,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
set name = "Del-All" set name = "Del-All"
// to prevent REALLY stupid deletions // to prevent REALLY stupid deletions
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human) var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/dead, /mob/dead/observer, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
if(hsbitem) if(hsbitem)
for(var/atom/O in world) for(var/atom/O in world)
@@ -773,6 +773,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
/client/proc/startSinglo() /client/proc/startSinglo()
set category = "Debug"
set name = "Start Singularity"
set desc = "Sets up the singularity and all machines to get power flowing through the station"
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes") if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return return

View File

@@ -53,6 +53,10 @@ should be listed in the changelog upon commit tho. Thanks. -->
<li class="tweak">Reinforced table parts are now made by using four metal rods on regular table parts. No plasteel involved.</li> <li class="tweak">Reinforced table parts are now made by using four metal rods on regular table parts. No plasteel involved.</li>
<li class="rscadd">Beakers, small and large can now be made/recycled in autolathes.</li> <li class="rscadd">Beakers, small and large can now be made/recycled in autolathes.</li>
</ul> </ul>
<h3 class="author">Nodrak updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added a 'random item' button to traitor uplinks. You can potentially get ANY item that shows up on the traitor item list, provided you have enough crystals for it.</li>
</ul>
</div> </div>
<div class="commit sansserif"> <div class="commit sansserif">