From 156696be7a1e8eb3a3b4f45d3ee7d29a82b84f8f Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Wed, 18 Jul 2012 22:51:28 +0000 Subject: [PATCH] -Added the Light Replacer (LR) ABOUT THE DEVICE This is a device supposedly to be used by Janitors and Janitor Cyborgs which will allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since they don't have hands or a way to replace lightbulbs. HOW IT WORKS You attack a light fixture with it, if the light fixture is broken it will replace the light fixture with a working light; the broken light is then placed on the floor for the user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture. HOW TO REFILL THE DEVICE It will need to be manually refilled with glass. If it's part of a robot module, it will charge when the Robot is inside a Recharge Station. EMAGGED FEATURES NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore. I'm not sure everyone will react the emag's features so please say what your opinions are of it. When emagged it will rig every light it replaces, which will explode when the light is on. This is VERY noticable, even the device's name changes when you emag it so if anyone examines you when you're holding it in your hand, you will be discovered. It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy access to them, and only one of them can emag their device. The explosion cannot insta-kill anyone with 30% or more health. -Changed the broken bottle item icon to "broken_beer" -Made the flavour text, for hitting yourself on the haad with a bottle, better. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4108 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/rechargestation.dm | 4 + code/game/objects/closets/janitor.dm | 3 +- code/modules/chemical/Chemistry-Tools.dm | 4 +- .../mob/living/silicon/robot/robot_modules.dm | 3 +- code/modules/power/lighting.dm | 47 ++- html/changelog.html | 9 + icons/obj/janitor.dmi | Bin 854 -> 4356 bytes tgstation.dme | 286 ++++++++++++++++++ 8 files changed, 351 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index ca7d1dbb66..45944ac4d9 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -108,6 +108,10 @@ var/obj/item/weapon/reagent_containers/glass/bottle/robot/B = O if(B.reagent && (B.reagents.get_reagent_amount(B.reagent) < B.volume)) B.reagents.add_reagent(B.reagent, 2) + //Janitor + if(istype(O, /obj/item/device/lightreplacer)) + var/obj/item/device/lightreplacer/LR = O + LR.charge(R) if(R) if(R.module) diff --git a/code/game/objects/closets/janitor.dm b/code/game/objects/closets/janitor.dm index dc9f05985b..7f4fddc71f 100644 --- a/code/game/objects/closets/janitor.dm +++ b/code/game/objects/closets/janitor.dm @@ -11,4 +11,5 @@ new /obj/item/weapon/caution(src) new /obj/item/weapon/caution(src) new /obj/item/weapon/caution(src) - new /obj/item/weapon/trashbag(src) \ No newline at end of file + new /obj/item/weapon/trashbag(src) + new /obj/item/device/lightreplacer(src) \ No newline at end of file diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index 50d4d53637..059d093aad 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -2646,7 +2646,7 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle amount_per_transfer_from_this = 10 volume = 100 - item_state = "beer" //Generic held-item sprite until unique ones are made. + item_state = "broken_beer" //Generic held-item sprite until unique ones are made. var/const/duration = 13 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets) var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it @@ -2724,7 +2724,7 @@ //Display an attack message. for(var/mob/O in viewers(user, null)) if(target != user) O.show_message(text("\red [target] has been hit over the head with a bottle of [src.name], by [user]!"), 1) - else O.show_message(text("\red [target] has hit himself with a bottle of [src.name] over his head!"), 1) + else O.show_message(text("\red [target] hit himself with a bottle of [src.name] on the head!"), 1) //Weaken the target for the duration that we calculated and divide it by 5. if(armor_duration) target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash! diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 9b046dbd42..04eb06bb30 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -149,7 +149,8 @@ ..() src.modules += new /obj/item/weapon/soap/nanotrasen(src) src.modules += new /obj/item/weapon/trashbag(src) - src.modules += new/obj/item/weapon/mop(src) + src.modules += new /obj/item/weapon/mop(src) + src.modules += new /obj/item/device/lightreplacer(src) src.emag = new /obj/item/weapon/cleaner(src) var/datum/reagents/R = new/datum/reagents(1000) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index bf9da9600f..76ea08c808 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -352,6 +352,51 @@ /obj/machinery/light/attackby(obj/item/W, mob/user) + //Light replacer code + if(istype(W, /obj/item/device/lightreplacer)) + if(status != LIGHT_OK) + if(isliving(user)) + var/obj/item/device/lightreplacer/LR = W + var/mob/living/U = user + if(LR.CanUse(U)) + + if(!LR.Use(U)) return + U << "You replace the [src.fitting] with the [W]." + if(status != LIGHT_EMPTY) + var/obj/item/weapon/light/L1 = new light_type(src.loc) + L1.status = status + L1.rigged = rigged + L1.brightness = src.brightness + L1.switchcount = switchcount + switchcount = 0 + L1.update() + + status = LIGHT_EMPTY + update() + + var/obj/item/weapon/light/L2 = new light_type() + + status = L2.status + switchcount = L2.switchcount + rigged = LR.emagged + brightness = L2.brightness + on = has_power() + update() + del(L2) + + // Leaving this here in case I get the go ahead to make emagged light replacers to insert rigged lights + if(on && rigged) + explode() + return + + else + user << LR.failmsg + return + else + user << "There is a working [fitting] already inserted." + return + + // attempt to insert light if(istype(W, /obj/item/weapon/light)) if(status != LIGHT_EMPTY) @@ -592,7 +637,7 @@ spawn(0) broken() // break it first to give a warning sleep(2) - explosion(T, 0, 1, 2, 2) + explosion(T, 0, 0, 2, 2) sleep(1) del(src) diff --git a/html/changelog.html b/html/changelog.html index cc2c70fefc..da96f16317 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -46,6 +46,15 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

18 July 2012

+

Giacom updated:

+ +
+

17 July 2012

Icarus updated:

diff --git a/icons/obj/janitor.dmi b/icons/obj/janitor.dmi index 3b38f599a2863617d96ad627239879e4167ecfb6..0971ee425f26275920d3a73ded1294e07f94e42a 100644 GIT binary patch literal 4356 zcmV+f5&Q0mP)V=-0C=30%&`uGAQXk+8J^-s_eR^UEDgpm=sQrn6;cEP*Y@>0ICN^T+xe3( zr-obCs}ba&_zP2ZF@S*Usp0JHCbA&la^}pUn=S2;NfUyA%IJ+;3>9aSOBn>ToIR3W zaNl3&Q3p&#ci+qtsmPYN9x(^sObl2=-p!U0u3j5V?SH)a#cSwB335>U1L(+Zkgj(^ zWdHyWB1uF+RCt{2oquc_=Y7UM?@^YS*=y)Vp5-b|nWV;;HlCSST$rSo8MOhF#?qLz z&1AR37$9qfTH6$)iJ7HAIdn;wrh$b<&eUXp)OK?;^oKbqfjJm(=nZ!0(y|$(TRFIi zX*)_NSgw`SX%$<#cYnNhA}LEUj}l4C<^vpfynF9`@1E!T<9*+|BSkD0ql(HwtMmz6 z>8J`&VN?aEFscGn7*zo(jH&Jw0_lnRf zqTp8s~8vJM?YSmdsW4*_-_X#I*M4hj zt7vU)72Vz4mPIHi1TDvR(TdL!D?2HDvDnmk1$@4ewqH|IBPS*%1i*bA&s@OAuI_CD zpu4+Uc64+Ud@cniVfV(__a*lgTFb)Wg;#gW&wV$X{r+fBe&gPIN-Ba${F!xrxO%nP zc=acYeNRY$&$*Uas?$<0XeOfP66SJ2Fc_3}yPY%ZHqTn-%;tXqV06z{2nK^P91a&` z43=}iSz^Lma<>-}rWOh>yt-Si-xg-{G*ip^ZDC$`b$3b5Ash~iH%6~w#hVdUycwCX z%!-#EWW~!5^2X>@6iPl6F%Bpv(N^$yo#6gQww1IE)5=%8{NRQA*7?=GSp=F5mIRn9 z+_*PFa-UCDA{jqkCw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