From 398a8ee6a0f4149129888c9980da2b163b4523ec Mon Sep 17 00:00:00 2001 From: "polyxenitopalidou@gmail.com" Date: Mon, 9 Apr 2012 21:44:29 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2CONTRABAND=20UPDATE:=20Finalised=20pos?= =?UTF-8?q?ters.=20Bugless=20and=20thoroughly=20tested.=20They're=20so=20s?= =?UTF-8?q?implistic=20it=20wasn't=20really=20hard.=20=E2=80=A2How=20to=20?= =?UTF-8?q?obtain:=201.Get=20the=20circuitboard=20of=20your=20supply=20com?= =?UTF-8?q?puter=202.Multitool=20it=20and=20set=20its=20receiver=20to=20th?= =?UTF-8?q?e=20appropriate=20spectrum=203.Put=20it=20back=20in.=20You=20ca?= =?UTF-8?q?n=20now=20order=20contraband=204.Note=20that=20contraband=20is?= =?UTF-8?q?=20illegal.=20Security=20can=20do=20whatever=20they=20wish=20to?= =?UTF-8?q?=20it,=20and=20therefore=20you=20for=20bringing=20it=20on=20boa?= =?UTF-8?q?rd,=20within=20logical=20boundaries.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apart from that, I would like to start the small project of adding references of every on-wall object to the actual contents of the wall. I think of it as nice if we could have walls drop contents (in some unfinished form, so it actually makes a difference) once deleted so we don't have any more of those pesky hovering-over-nothing decals/machinery/whatever git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3423 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/obj/supplypacks.dm | 17 +++++ .../game/machinery/computer/buildandrepair.dm | 27 +++++++ code/game/objects/contraband.dm | 2 +- code/game/objects/crates.dm | 9 +++ code/game/supplyshuttle.dm | 8 +- code/game/turf.dm | 76 +++++++++++++++++++ code/unused/Agouri_stuff.dm | 4 +- html/changelog.html | 15 ++++ 8 files changed, 154 insertions(+), 4 deletions(-) diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index d23b63ba618..b14fc640794 100644 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -1,6 +1,7 @@ //SUPPLY PACKS //NOTE: only secure crate types use the access var (and are lockable) //NOTE: hidden packs only show up when the computer has been hacked. +//ANOTER NOTE: Contraband is obtainable through modified supplycomp circuitboards. //BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle. /datum/supply_packs/specialops name = "Special Ops supplies" @@ -577,4 +578,20 @@ contains = tempContains ..() + +/datum/supply_packs/contraband + contains = list("/obj/item/weapon/contraband/poster",) //We randomly pick 5 items from this list through the constructor, look below + name = "Contraband Crate" + cost = 30 + containertype = "/obj/structure/closet/crate/contraband" + containername = "Contraband crate" + contraband = 1 + +/datum/supply_packs/contraband/New() + var/list/tempContains = list() + for(var/i = 0,i<5,i++) + tempContains += pick(contains) + src.contains = tempContains + ..() + //SUPPLY PACKS \ No newline at end of file diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 2c082b39e09..80d67c7f21b 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -149,6 +149,7 @@ name = "Circuit board (Supply shuttle console)" build_path = "/obj/machinery/computer/supplycomp" origin_tech = "programming=3" + var/contraband_enabled = 0 /obj/item/weapon/circuitboard/operating name = "Circuit board (Operating Computer)" build_path = "/obj/machinery/computer/operating" @@ -181,6 +182,28 @@ +/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I,/obj/item/device/multitool)) + var/catastasis = src.contraband_enabled + var/opposite_catastasis + if(catastasis) + opposite_catastasis = "STANDARD" + catastasis = "BROAD" + else + opposite_catastasis = "BROAD" + catastasis = "STANDARD" + + switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") ) + //switch( alert("Current receiver spectrum is set to: " {(src.contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(src.contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") ) + if("Switch to STANDARD","Switch to BROAD") + src.contraband_enabled = !src.contraband_enabled + + if("Cancel") + return + else + user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri" + return + /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob) switch(state) if(0) @@ -277,4 +300,8 @@ if(circuit.id) B:id = circuit.id if(circuit.records) B:records = circuit.records if(circuit.frequency) B:frequency = circuit.frequency + if(istype(circuit,/obj/item/weapon/circuitboard/supplycomp)) + var/obj/machinery/computer/supplycomp/SC = B + var/obj/item/weapon/circuitboard/supplycomp/C = circuit + SC.can_order_contraband = C.contraband_enabled del(src) diff --git a/code/game/objects/contraband.dm b/code/game/objects/contraband.dm index 17cce5d4f36..3c465d2b794 100644 --- a/code/game/objects/contraband.dm +++ b/code/game/objects/contraband.dm @@ -166,7 +166,7 @@ obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob) if(user.loc != temp_loc) return for (var/mob/O in hearers(5, src.loc)) - O.show_message("[user.name] rips the [src.name] in a single, decisive motion!" ) + O.show_message("[user.name] rips the [src.name] in a single, decisive motion!" ) playsound(src.loc, 'poster_ripped.ogg', 100, 1) src.ruined = 1 src.icon_state = "poster_ripped" diff --git a/code/game/objects/crates.dm b/code/game/objects/crates.dm index 786a34a43c6..496504a3e6a 100644 --- a/code/game/objects/crates.dm +++ b/code/game/objects/crates.dm @@ -38,6 +38,15 @@ icon_opened = "crateopen" icon_closed = "crate" +/obj/structure/closet/crate/contraband + name = "Contraband crate" + desc = "A random assortment of items manufactured by providers NOT listed under Nanotrasen's whitelist." + icon = 'storage.dmi' + icon_state = "crate" + density = 1 + icon_opened = "crateopen" + icon_closed = "crate" + /obj/structure/closet/crate/medical desc = "A medical crate." name = "Medical crate" diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 4ab1ca9904a..998fd1f5ba3 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -94,6 +94,7 @@ var/ordernum=0 circuit = "/obj/item/weapon/circuitboard/supplycomp" var/temp = null var/hacked = 0 + var/can_order_contraband = 0 /obj/machinery/computer/ordercomp name = "Supply ordering console" @@ -102,6 +103,7 @@ var/ordernum=0 circuit = "/obj/item/weapon/circuitboard/ordercomp" var/temp = null var/reqtime = 0 //Cooldown for requisitions - Quarxink + /obj/effect/marker/supplymarker icon_state = "X" icon = 'mark.dmi' @@ -124,6 +126,7 @@ var/ordernum=0 var/containername = null var/access = null var/hidden = 0 + var/contraband = 0 /proc/supply_ticker() //world << "Supply ticker ticked : Adding [SUPPLY_POINTSPER] to [supply_shuttle_points]." @@ -310,7 +313,7 @@ This method wont take into account storage items developed in the future and doe src.temp = "Supply points: [supply_shuttle_points]


Request what?

" for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) ) var/datum/supply_packs/N = new S() - if(N.hidden) continue //Have to send the type instead of a reference to + if(N.hidden || N.contraband) continue //Have to send the type instead of a reference to src.temp += "[N.name] Cost: [N.cost] " //the obj because it would get caught by the garbage src.temp += "Print Requisition
" //collector. oh well. src.temp += "
OK" @@ -446,6 +449,8 @@ This method wont take into account storage items developed in the future and doe user << "\blue You disconnect the monitor." var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) var/obj/item/weapon/circuitboard/supplycomp/M = new /obj/item/weapon/circuitboard/supplycomp( A ) + if(src.can_order_contraband) + M.contraband_enabled = 1 for (var/obj/C in src) C.loc = src.loc A.circuit = M @@ -516,6 +521,7 @@ This method wont take into account storage items developed in the future and doe for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) ) var/datum/supply_packs/N = new S() if(N.hidden && !src.hacked) continue //Have to send the type instead of a reference to + if(N.contraband && !src.can_order_contraband){continue;} //Agouri -Kavalamarker src.temp += "[N.name] Cost: [N.cost]
" //the obj because it would get caught by the garbage src.temp += "
OK" //collector. oh well. diff --git a/code/game/turf.dm b/code/game/turf.dm index 494db297a31..7f9a25b048e 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -493,6 +493,43 @@ var/obj/item/apc_frame/AH = W AH.try_build(src) + else if(istype(W,/obj/item/weapon/contraband/poster)) //POSTERSSSS + var/obj/item/weapon/contraband/poster/P = W + if(P.resulting_poster) + var/check = 0 + var/stuff_on_wall = 0 + for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff + if(istype(O,/obj/effect/decal/poster)) + check = 1 + break + stuff_on_wall++ + if(stuff_on_wall==3) + check = 1 + break + + if(check) + user << "The wall is far too cluttered to place a poster!" + return + + user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. + + P.resulting_poster.loc = src + var/temp = P.resulting_poster.icon_state + var/temp_loc = user.loc + P.resulting_poster.icon_state = "poster_being_set" + playsound(P.resulting_poster.loc, 'poster_being_created.ogg', 100, 1) + sleep(22) + + if(user.loc == temp_loc)//Let's check if he still is there + user << "You place the poster!" + P.resulting_poster.icon_state = temp + src.contents += P.resulting_poster + del(P) + else + user << "You stop placing the poster." + P.resulting_poster.loc = P + P.resulting_poster.icon_state = temp + else return attack_hand(user) return @@ -727,6 +764,45 @@ var/obj/item/apc_frame/AH = W AH.try_build(src) + //Poster stuff + else if(istype(W,/obj/item/weapon/contraband/poster)) + var/obj/item/weapon/contraband/poster/P = W + if(P.resulting_poster) + var/check = 0 + var/stuff_on_wall = 0 + for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff + if(istype(O,/obj/effect/decal/poster)) + check = 1 + break + stuff_on_wall++ + if(stuff_on_wall==3) + check = 1 + break + + if(check) + user << "The wall is far too cluttered to place a poster!" + return + + user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. + + P.resulting_poster.loc = src + var/temp = P.resulting_poster.icon_state + var/temp_loc = user.loc + P.resulting_poster.icon_state = "poster_being_set" + playsound(P.resulting_poster.loc, 'poster_being_created.ogg', 100, 1) + sleep(22) + + if(user.loc == temp_loc)//Let's check if he still is there + user << "You place the poster!" + P.resulting_poster.icon_state = temp + src.contents += P.resulting_poster + del(P) + else + user << "You stop placing the poster." + P.resulting_poster.loc = P + P.resulting_poster.icon_state = temp + return + //Finally, CHECKING FOR FALSE WALLS if it isn't damaged else if(!d_state) return attack_hand(user) diff --git a/code/unused/Agouri_stuff.dm b/code/unused/Agouri_stuff.dm index 1f0270016fa..508c46f6a0d 100644 --- a/code/unused/Agouri_stuff.dm +++ b/code/unused/Agouri_stuff.dm @@ -1,4 +1,4 @@ -/turf/DblClick() +/*/turf/DblClick() if(istype(usr, /mob/living/silicon/ai)) return move_camera_by_click() if(usr.stat || usr.restrained() || usr.lying) @@ -1562,4 +1562,4 @@ turf/simulated/floor/return_siding_icon_state() if(flags & NOJAUNT) return flags |= NOJAUNT - overlays += image('water.dmi',src,"holywater") \ No newline at end of file + overlays += image('water.dmi',src,"holywater")*/ \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index b93e0cdfb6e..5ba64f5d0af 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -102,6 +102,21 @@ should be listed in the changelog upon commit tho. Thanks. --> +
+

April 10, the year of our lord 2012

+

Agouri updated:

+ +
+

2 April 2012

PolymorphBlue updated: