Moving stuff around part 2!

Committing this early to allow pete to commit something involving the .dme file which would probably conflict otherwise.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4514 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-08-22 16:32:45 +00:00
parent 19135de9eb
commit 9e30e7d2ec
20 changed files with 20 additions and 521 deletions
-66
View File
@@ -1,66 +0,0 @@
/obj/effect/decal/cleanable/New()
if (random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
..()
/*
/obj/effect/decal/cleanable/blood/burn(fi_amount)
if(fi_amount > 900000.0)
src.virus = null
sleep(11)
del(src)
return
*/
//Gibs.spread proc in gibs.dm
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
for(var/datum/disease/D in src.viruses)
b.viruses += D
if (step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
for(var/datum/disease/D in src.viruses)
b.viruses += D
if (step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
if (prob(40))
/*var/obj/effect/decal/cleanable/oil/o =*/
new /obj/effect/decal/cleanable/oil/streak(src.loc)
else if (prob(10))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
if (step_to(src, get_step(src, direction), 0))
break
// not a great place for it, but as good as any
/obj/effect/decal/cleanable/greenglow
New()
..()
sd_SetLuminosity(1)
spawn(1200) // 2 minutes
del(src)
-212
View File
@@ -1,212 +0,0 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 17
/obj/item/weapon/contraband
name = "contraband item"
desc = "You probably shouldn't be holding this."
icon = 'icons/obj/contraband.dmi'
force = 0
/obj/item/weapon/contraband/poster
name = "rolled-up poster"
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. Its vulgar themes have marked it as Contraband aboard Nanotrasen© Space Facilities."
icon_state = "rolled_poster"
var/serial_number = 0
var/obj/effect/decal/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
if(given_serial==0)
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
src.resulting_poster = new(serial_number)
else
serial_number = given_serial
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
src.name += " - No. [serial_number]"
..(loc)
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
if(src.resulting_poster)
src.resulting_poster.add_fingerprint(user)
..()*/
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
if (istype(A, /turf/simulated/wall))
if(src.resulting_poster == null)
return
else
var/turf/simulated/wall/W = A
var/check = 0
var/stuff_on_wall = 0
for( var/obj/O in W.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 << "<FONT COLOR='RED'>The wall is far too cluttered to place a poster!</FONT>"
return
src.resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
W.contents += src.resulting_poster
del(src)*/
//############################## THE ACTUAL DECALS ###########################
obj/effect/decal/poster
name = "poster"
desc = "A large piece of space-resistant printed paper. It's considered contraband."
icon = 'icons/obj/contraband.dmi'
anchored = 1
var/serial_number //Will hold the value of src.loc if nobody initialises it
var/ruined = 0
obj/effect/decal/poster/New(var/serial)
src.serial_number = serial
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
icon_state = "poster[serial_number]"
switch(serial_number)
if(1)
name += " - Unlucky Space Explorer"
desc += " This particular one depicts a skeletal form within a space suit."
if(2)
name += " - Positronic Logic Conflicts"
desc += " This particular one depicts the cold, unmoving stare of a particular advanced AI."
if(3)
name += " - Paranoia"
desc += " This particular one warns of the dangers of trusting your co-workers too much."
if(4)
name += " - Keep Calm"
desc += " This particular one is of a famous New Earth design, although a bit modified."
if(5)
name += " - Martian Warlord"
desc += " This particular one depicts the cartoony mug of a certain Martial Warmonger."
if(6)
name += " - Technological Singularity"
desc += " This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
if(7)
name += " - Wasteland"
desc += " This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"13\" is visible on their blue jumpsuits."
if(8)
name += " - Pinup Girl Cindy"
desc += " This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
if(9)
name += " - Pinup Girl Amy"
desc += " This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
if(10)
name += " - Don't Panic"
desc += " This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
if(11)
name += " - Underwater Laboratory"
desc += " This particular one is of the fabled last crew of Nanotrasen's previous project before going big on Asteroid mining, Sealab."
if(12)
name += " - Missing Gloves"
desc += " This particular one is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
if(13)
name += " - Rogue AI"
desc += " This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
if(14)
name += " - User of the Arcane Arts"
desc += " This particular one depicts a wizard, casting a spell. You can't really make out if it's an actial photograph or a computer-generated image."
if(15)
name += " - Levitating Skull"
desc += " This particular one is the portrait of a certain flying, friendly and somewhat sex-crazed enchanted skull. Its adventures along with its fabled companion are now fading through history..."
if(16)
name += " - Augmented Legend"
desc += " This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
if(17)
name += " - Dangerous Static"
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
..()
obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/wirecutters) )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
if(src.ruined)
user << "<FONT COLOR='BLUE'>You remove the remnants of the poster.</FONT>"
del(src)
else
user << "<FONT COLOR='BLUE'>You carefully remove the poster from the wall.</FONT>"
src.roll_and_drop(user.loc)
return
/obj/effect/decal/poster/attack_hand(mob/user as mob)
if(src.ruined)
return
var/temp_loc = user.loc
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
if("Yes")
if(user.loc != temp_loc)
return
for (var/mob/O in hearers(5, src.loc))
O.show_message("<FONT COLOR='RED'>[user.name] rips the [src.name] in a single, decisive motion!</FONT>" )
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
src.ruined = 1
src.icon_state = "poster_ripped"
src.name = "Ripped poster"
src.desc = "You can't make out anything from the poster's original print. It's ruined."
src.add_fingerprint(user)
if("No")
return
/obj/effect/decal/poster/proc/roll_and_drop(turf/loc)
var/obj/item/weapon/contraband/poster/P = new(src,src.serial_number)
P.resulting_poster = src
P.loc = loc
src.loc = P
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
if(!P.resulting_poster) return
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))
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
return
stuff_on_wall++
if(stuff_on_wall==3)
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
return
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
var/obj/effect/decal/poster/D = P.resulting_poster
var/temp_loc = user.loc
flick("poster_being_set",D)
D.loc = src
del(P) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway
playsound(D.loc, 'sound/items/poster_being_created.ogg', 100, 1)
sleep(17)
if(!D) return
if(istype(src,/turf/simulated/wall) && user && user.loc == temp_loc)//Let's check if everything is still there
user << "<span class='notice'>You place the poster!</span>"
else
D.roll_and_drop(temp_loc)
return
-46
View File
@@ -212,49 +212,3 @@
else
return 0
return 0
/*if(ishuman(user)) //Let's check if the guy's wearing electrically insulated gloves --Agourimarkan
var/mob/living/carbon/human/H = user
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(istype(G,/obj/item/clothing/gloves/yellow) ) //Business as usual for guys with gloves
src.health -= W.force * 0.2
else // Guy has gloves, not electrically insulated ones
var/outcome = pick(1,2,3)
switch(outcome) // 3 possible outcomes
if(1) //Guy gets shocked. If not electrified, cause damage.
if(shock(user,100))
return
else
src.health -= W.force *0.2
if(2) //Shard breaks
user << "<font color='blue'>The shard breaks!</font>"
del W
return
if(3) //You somehow manage to damage the grille. Beefin' up the damage, a bit. Instead of doing 10% damage it now does... 20% of the shard's force? Yeah, 20% sounds good at 66% chance of failure.
src.health -=W.force *0.2
else //SHIT SON, GUY DOESN'T HAVE ANY GLOVES
var/outcome = pick(1,2,3)
switch(outcome)
if(1) // Let's see, the guy damages it but takes some damage back
user << "<font color='red'>You cut yourself with the shard as you hit the grille!</font>"
src.health -= W.force *0.2
var/brutedamagetaken = rand(3,6)
H.take_organ_damage(brutedamagetaken,0)
if(2) //Guy gets shocked. If not electrified, apply damage
if(shock(user,100))
return
else
src.health -= W.force *0.2
if(3) // It breaks in his hands. Ouch.
user << "<font color='red'>As you smash the grille the shard breaks into smithereens in your palm!</font>"
src.health -= W.force *0.2
del(W)
var/brutedamagetaken = rand(5,8)
H.take_organ_damage(brutedamagetaken,0)
return
else //Alright, he's not a human. Can monkeys or aliens even wear gloves?
src.health -= W.force *0.1*/ //10% damage only for non-glorious human master race members