Fixed Copypasta!

Fixed Copypasta!
This commit is contained in:
Iamgoofball
2013-11-02 11:17:17 -07:00
parent a75492d26b
commit 74b5a003cc
4 changed files with 64 additions and 153 deletions

View File

@@ -83,13 +83,30 @@
if(!found)
dir_to_set = direction
break
if(istype(src, /obj/item/stack/sheet/glass))
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
else if(istype(src, /obj/item/stack/sheet/glass/plasmaglass))
var/obj/structure/window/W
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
else if(istype(src, /obj/item/stack/sheet/glass/plasmarglass))
var/obj/structure/window/W
W = new /obj/structure/window/plasmareinforced( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
else
user << "#$%&. CONDOM IS CAPTAIN, CAPTAIN IS CONDOM, CONDOMS FOR EVERYONE(so yeah code dun fuked up, let Iamgoofball on #codershuttle on irc.sorcery.net know)"
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
@@ -99,12 +116,30 @@
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
if(istype(src, /obj/item/stack/sheet/glass))
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
else if(istype(src, /obj/item/stack/sheet/glass/plasmaglass))
var/obj/structure/window/W
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
else if(istype(src, /obj/item/stack/sheet/glass/plasmarglass))
var/obj/structure/window/W
W = new /obj/structure/window/plasmareinforced( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
else
user << "#$%&. ALL CYBORGS MUST COMMENCE CELEBRATORY SPANKINGS!!!(so yeah code dun fuked up, let Iamgoofball on #codershuttle on irc.sorcery.net know)"
return 0
@@ -302,7 +337,7 @@
/*
* Plasma Glass sheets
*/
/obj/item/stack/sheet/plasmaglass
/obj/item/stack/sheet/glass/plasmaglass
name = "plasma glass"
desc = "A very strong and very resistant sheet of a plasma-glass alloy."
singular_name = "glass sheet"
@@ -310,14 +345,14 @@
g_amt = 7500
origin_tech = "materials=3;plasma=2"
/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
/obj/item/stack/sheet/glass/plasmaglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user)
/obj/item/stack/sheet/glass/plasmaglass/attackby(obj/item/W, mob/user)
..()
if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/rods/V = W
var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc)
var/obj/item/stack/sheet/glass/plasmarglass/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
V.use(1)
@@ -330,69 +365,10 @@
else
return ..()
/obj/item/stack/sheet/plasmaglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
var/title = "Sheet-PlasmaGlass"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
user << "\red There are too many windows in this location."
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "\red Can't let you do that."
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
W = new /obj/structure/window/plasmabasic( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
return 0
/*
* Reinforced plasma glass sheets
*/
/obj/item/stack/sheet/plasmarglass
/obj/item/stack/sheet/glass/plasmarglass
name = "reinforced plasma glass"
desc = "Plasma glass which seems to have rods or something stuck in them."
singular_name = "reinforced plasma glass sheet"
@@ -401,70 +377,5 @@
m_amt = 1875
origin_tech = "materials=4;plasma=2"
/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
/obj/item/stack/sheet/glass/plasmarglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
var/title = "Sheet Plasma Reinf. Glass"
title += " ([src.amount] sheet\s left)"
switch(input(title, "Would you like full tile glass or a one direction glass pane?") in list("One Direction", "Full Window", "Cancel"))
if("One Direction")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
user << "\red There are too many windows in this location."
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "\red Can't let you do that."
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/plasmareinforced( user.loc, 1 )
W.state = 0
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("Full Window")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
W = new /obj/structure/window/plasmareinforced( user.loc, 1 )
W.state = 0
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
else
return 1
return 0

View File

@@ -302,7 +302,7 @@
if (ore_glass > 0 && ore_plasma > 0)
ore_glass--;
ore_plasma--;
new /obj/item/stack/sheet/plasmaglass(output.loc)
new /obj/item/stack/sheet/glass/plasmaglass(output.loc)
else
on = 0
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
@@ -310,7 +310,7 @@
ore_glass--;
ore_iron--;
ore_plasma--;
new /obj/item/stack/sheet/plasmarglass(output.loc)
new /obj/item/stack/sheet/glass/plasmarglass(output.loc)
else
on = 0
continue

View File

@@ -89,13 +89,13 @@
machine.ore_plasma = 0
if ("plasmaglass")
if (machine.ore_plasmaglass > 0)
var/obj/item/stack/sheet/plasmaglass/G = new /obj/item/stack/sheet/plasmaglass
var/obj/item/stack/sheet/glass/plasmaglass/G = new /obj/item/stack/sheet/glass/plasmaglass
G.amount = machine.ore_plasmaglass
G.loc = machine.output.loc
machine.ore_plasmaglass = 0
if ("plasmarglass")
if (machine.ore_plasmarglass > 0)
var/obj/item/stack/sheet/plasmarglass/G = new /obj/item/stack/sheet/plasmarglass
var/obj/item/stack/sheet/glass/plasmarglass/G = new /obj/item/stack/sheet/glass/plasmarglass
G.amount = machine.ore_plasmarglass
G.loc = machine.output.loc
machine.ore_plasmarglass = 0
@@ -281,11 +281,11 @@
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasmaglass))
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
ore_plasmaglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasmarglass))
if (istype(O,/obj/item/stack/sheet/glass/plasmarglass))
ore_plasmarglass+= O:amount
del(O)
continue
@@ -376,13 +376,13 @@
ore_rglass -= stack_amt
return
if (ore_plasmaglass >= stack_amt)
var/obj/item/stack/sheet/plasmaglass/G = new /obj/item/stack/sheet/plasmaglass
var/obj/item/stack/sheet/glass/plasmaglass/G = new /obj/item/stack/sheet/glass/plasmaglass
G.amount = stack_amt
G.loc = output.loc
ore_plasmaglass -= stack_amt
return
if (ore_plasmarglass >= stack_amt)
var/obj/item/stack/sheet/plasmarglass/G = new /obj/item/stack/sheet/plasmarglass
var/obj/item/stack/sheet/glass/plasmarglass/G = new /obj/item/stack/sheet/glass/plasmarglass
G.amount = stack_amt
G.loc = output.loc
ore_plasmarglass -= stack_amt

View File

@@ -26,8 +26,8 @@
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/plasmaglass/NG = new (user.loc)
for (var/obj/item/stack/sheet/plasmaglass/G in user.loc)
var/obj/item/stack/sheet/glass/plasmaglass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/plasmaglass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)