Merge pull request #1269 from Erthilo/TGUpdates

TG Updates r3721 to r3745 Redo
This commit is contained in:
SkyMarshal
2012-06-09 17:50:05 -07:00
105 changed files with 2553 additions and 1097 deletions
+1 -1
View File
@@ -82,7 +82,7 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.welding)
if(WT.remove_fuel(0, user))
damage = 15
playsound(src.loc, 'Welder.ogg', 100, 1)
+1 -1
View File
@@ -76,7 +76,7 @@ Alien plants should do something if theres a lot of poison
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.welding)
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'Welder.ogg', 100, 1)
+6 -4
View File
@@ -133,8 +133,9 @@
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
if(!W:remove_fuel(0,user))
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
new /obj/item/stack/sheet/metal(src.loc)
@@ -156,8 +157,9 @@
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
if(!W:remove_fuel(0,user))
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
src.welded =! src.welded
+4 -2
View File
@@ -72,14 +72,14 @@
new /obj/item/device/pda/medical(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/device/flashlight/pen(src)
switch(pick(list("blue", "green", "purple")))
switch(pick("blue", "green", "purple"))
if ("blue")
new /obj/item/clothing/under/rank/medical/blue(src)
if ("green")
new /obj/item/clothing/under/rank/medical/green(src)
if ("purple")
new /obj/item/clothing/under/rank/medical/purple(src)
switch(pick(list("blue", "green", "purple")))
switch(pick("blue", "green", "purple"))
if ("blue")
new /obj/item/clothing/under/rank/medical/blue(src)
if ("green")
@@ -162,6 +162,8 @@
new /obj/item/device/flashlight/pen(src)
new /obj/item/weapon/cartridge/cmo(src)
new /obj/item/device/radio/headset/heads/cmo(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/device/flash(src)
return
@@ -136,6 +136,8 @@
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(!opened) // If we let him lock it while it's open, it will close without the items inside going with it
togglelock(usr)
if (ishuman(usr))
if (!opened)
togglelock(usr)
else
usr << "\red This mob type can't use this verb."
+16 -1
View File
@@ -54,7 +54,11 @@
/obj/item/device/pda/detective
default_cartridge = /obj/item/weapon/cartridge/detective
icon_state = "pda-s"
icon_state = "pda-det"
/obj/item/device/pda/warden
default_cartridge = /obj/item/weapon/cartridge/security
icon_state = "pda-warden"
/obj/item/device/pda/janitor
default_cartridge = /obj/item/weapon/cartridge/janitor
@@ -107,6 +111,10 @@
icon_state = "pda-c"
toff = 1
/obj/item/device/pda/cargo
default_cartridge = /obj/item/weapon/cartridge/quartermaster
icon_state = "pda-cargo"
/obj/item/device/pda/quartermaster
default_cartridge = /obj/item/weapon/cartridge/quartermaster
icon_state = "pda-q"
@@ -143,6 +151,13 @@
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
/obj/item/device/pda/chef
icon_state = "pda-chef"
/obj/item/device/pda/bar
icon_state = "pda-bar"
/obj/item/device/pda/atmos
icon_state = "pda-atmo"
+4 -5
View File
@@ -179,20 +179,19 @@ obj/structure/door_assembly
glass = 1
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && W:welding && !anchored )
if (W:remove_fuel(0,user))
W:welding = 2
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
playsound(src.loc, 'Welder2.ogg', 50, 1)
if(do_after(user, 40))
if(!src) return
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(get_turf(src), 4)
if(src.glass==1)
new /obj/item/stack/sheet/rglass(get_turf(src))
del(src)
W:welding = 1
else
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
return
+7 -6
View File
@@ -511,18 +511,19 @@
if (is_sharp(W))
burst()
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
return ( \
istype(W, /obj/item/weapon/screwdriver) || \
istype(W, /obj/item/weapon/pen) || \
istype(W, /obj/item/weapon/weldingtool) && W:welding || \
istype(W, /obj/item/weapon/lighter/zippo) && W:lit || \
istype(W, /obj/item/weapon/match) && W:lit || \
istype(W, /obj/item/clothing/mask/cigarette) && W:lit || \
istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/lighter/zippo) || \
istype(W, /obj/item/weapon/match) || \
istype(W, /obj/item/clothing/mask/cigarette) || \
istype(W, /obj/item/weapon/wirecutters) || \
istype(W, /obj/item/weapon/circular_saw) || \
istype(W, /obj/item/weapon/melee/energy/sword) && W:active || \
istype(W, /obj/item/weapon/melee/energy/blade) || \
istype(W, /obj/item/weapon/melee/energy/sword) || \
istype(W, /obj/item/weapon/melee/energy/blade) || \
istype(W, /obj/item/weapon/shovel) || \
istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/butch) || \
+17 -9
View File
@@ -1,4 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#define CANDLE_LUM 3
@@ -27,14 +27,22 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter) && W:lit)
light()
else if(istype(W, /obj/item/weapon/match) && W:lit)
light()
else if(istype(W, /obj/item/candle) && W:lit)
light()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light()
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit)
light()
else if(istype(W, /obj/item/candle))
var/obj/item/candle/C = W
if(C.lit)
light()
light(var/flavor_text = "\red [usr] lights the [name].")
+87 -80
View File
@@ -330,87 +330,93 @@ THERMAL GLASSES
/obj/item/clothing/suit/storage/labcoat/verb/toggle()
set name = "Toggle Labcoat Buttons"
set category = "Object"
if(src.icon_state == "labcoat_open")
src.icon_state = "labcoat"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat")
src.icon_state = "labcoat_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cmo_open")
src.icon_state = "labcoat_cmo"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cmo")
src.icon_state = "labcoat_cmo_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cmoalt_open")
src.icon_state = "labcoat_cmoalt"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cmoalt")
src.icon_state = "labcoat_cmoalt_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_gen_open")
src.icon_state = "labcoat_gen"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_gen")
src.icon_state = "labcoat_gen_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_chem_open")
src.icon_state = "labcoat_chem"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_chem")
src.icon_state = "labcoat_chem_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_vir_open")
src.icon_state = "labcoat_vir"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_vir")
src.icon_state = "labcoat_vir_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_tox_open")
src.icon_state = "labcoat_tox"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_tox")
src.icon_state = "labcoat_tox_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labgreen_open")
src.icon_state = "labgreen"
usr << "You button up the labcoat."
else if(src.icon_state == "labgreen")
src.icon_state = "labgreen_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_pink_open")
src.icon_state = "labcoat_pink"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_pink")
src.icon_state = "labcoat_pink_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_red_open")
src.icon_state = "labcoat_red"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_red")
src.icon_state = "labcoat_red_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cdc_open")
src.icon_state = "labcoat_cdc"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cdc")
src.icon_state = "labcoat_cdc_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "fr_jacket_open")
src.icon_state = "fr_jacket"
usr << "You button up the jacket."
else if(src.icon_state == "fr_jacket")
src.icon_state = "fr_jacket_open"
usr << "You unbutton the jacket."
else if(src.icon_state == "fr_sleeve_open")
src.icon_state = "fr_sleeve"
usr << "You button up the jacket."
else if(src.icon_state == "fr_sleeve")
src.icon_state = "fr_sleeve_open"
usr << "You unbutton the jacket."
if(!usr.canmove || usr.stat || usr.restrained())
return 0
else
usr << "Sorry! The suit you're wearing doesn't have buttons!"
usr.update_clothing()
if(src.icon_state == "labcoat_open")
src.icon_state = "labcoat"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat")
src.icon_state = "labcoat_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cmo_open")
src.icon_state = "labcoat_cmo"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cmo")
src.icon_state = "labcoat_cmo_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cmoalt_open")
src.icon_state = "labcoat_cmoalt"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cmoalt")
src.icon_state = "labcoat_cmoalt_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_gen_open")
src.icon_state = "labcoat_gen"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_gen")
src.icon_state = "labcoat_gen_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_chem_open")
src.icon_state = "labcoat_chem"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_chem")
src.icon_state = "labcoat_chem_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_vir_open")
src.icon_state = "labcoat_vir"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_vir")
src.icon_state = "labcoat_vir_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_tox_open")
src.icon_state = "labcoat_tox"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_tox")
src.icon_state = "labcoat_tox_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labgreen_open")
src.icon_state = "labgreen"
usr << "You button up the labcoat."
else if(src.icon_state == "labgreen")
src.icon_state = "labgreen_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_pink_open")
src.icon_state = "labcoat_pink"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_pink")
src.icon_state = "labcoat_pink_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_red_open")
src.icon_state = "labcoat_red"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_red")
src.icon_state = "labcoat_red_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "labcoat_cdc_open")
src.icon_state = "labcoat_cdc"
usr << "You button up the labcoat."
else if(src.icon_state == "labcoat_cdc")
src.icon_state = "labcoat_cdc_open"
usr << "You unbutton the labcoat."
else if(src.icon_state == "fr_jacket_open")
src.icon_state = "fr_jacket"
usr << "You button up the jacket."
else if(src.icon_state == "fr_jacket")
src.icon_state = "fr_jacket_open"
usr << "You unbutton the jacket."
else if(src.icon_state == "fr_sleeve_open")
src.icon_state = "fr_sleeve"
usr << "You button up the jacket."
else if(src.icon_state == "fr_sleeve")
src.icon_state = "fr_sleeve_open"
usr << "You unbutton the jacket."
else
usr << "Sorry! The suit you're wearing doesn't have buttons!"
usr.update_clothing()
/obj/item/clothing/head/ushanka/attack_self(mob/user as mob)
if(src.icon_state == "ushankadown")
@@ -422,6 +428,7 @@ THERMAL GLASSES
src.item_state = "ushankadown"
user << "You lower the ear flaps on the ushanka."
/obj/item/clothing/glasses/thermal/emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src.loc
@@ -1,4 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
@@ -124,71 +124,82 @@ ZIPPO
var/smoketime = 300
var/butt_count = 5 //count of butt sprite variations
proc
light(var/flavor_text = "[usr] lights the [name].")
put_out()
if (src.lit == -1)
return
src.lit = -1
src.damtype = "brute"
src.icon_state = icon_butt + "[rand(0,butt_count)]"
src.item_state = icon_off
src.desc = "A [src.name] butt."
src.name = "[src.name] butt"
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0))
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.lit > 0)
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0))
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit > 0)
light("\red After some fiddling, [user] manages to light their [name] with [W].")
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
else if(istype(W, /obj/item/weapon/melee/energy/sword))
var/obj/item/weapon/melee/energy/sword/S = W
if(S.active)
light("\red [user] swings their [W], barely missing their nose. They light their [name] in the process.")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
return
return
light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
src.damtype = "fire"
src.icon_state = icon_on
src.item_state = icon_on
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
processing_objects.Add(src)
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
src.damtype = "fire"
src.icon_state = icon_on
src.item_state = icon_on
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
processing_objects.Add(src)
process()
var/turf/location = get_turf(src)
src.smoketime--
if(src.smoketime < 1)
if(ismob(src.loc))
var/mob/living/M = src.loc
M << "\red Your [src.name] goes out."
put_out()
M.update_clothing()
else
put_out()
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
dropped(mob/user as mob)
if(src.lit == 1)
src.visible_message("\red [user] calmly drops and treads on the lit [src], putting it out instantly.")
/obj/item/clothing/mask/cigarette/process()
var/turf/location = get_turf(src)
src.smoketime--
if(src.smoketime < 1)
if(ismob(src.loc))
var/mob/living/M = src.loc
M << "\red Your [src.name] goes out."
put_out()
return ..()
M.update_clothing()
else
put_out()
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/clothing/mask/cigarette/dropped(mob/user as mob)
if(src.lit == 1)
src.visible_message("\red [user] calmly drops and treads on the lit [src], putting it out instantly.")
put_out()
return ..()
/obj/item/clothing/mask/cigarette/proc/put_out()
if (src.lit == -1)
return
src.lit = -1
src.damtype = "brute"
src.icon_state = icon_butt + "[rand(0,butt_count)]"
src.item_state = icon_off
src.desc = "A [src.name] butt."
src.name = "[src.name] butt"
////////////
// CIGARS //
@@ -252,24 +263,30 @@ ZIPPO
var/lastHolder = null
var/smoketime = 100
var/maxsmoketime = 100 //make sure this is equal to your smoketime
proc
light(var/flavor_text = "[usr] lights the [name].")
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
light("\red [user] casually lights the [name] with [W], what a badass.")
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())
light("\red [user] casually lights the [name] with [W], what a badass.")
else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0))
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.lit > 0)
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0))
light("\red After some fiddling, [user] manages to light their [name] with [W].")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit > 0)
light("\red After some fiddling, [user] manages to light their [name] with [W].")
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
light("\red [user] lights \his [name] with \his [W].")
return
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
@@ -475,4 +492,4 @@ ZIPPO
if(lit)
user.total_luminosity -= 2
src.sd_SetLuminosity(2)
return
return
+260 -216
View File
@@ -71,242 +71,278 @@ WELDINGTOOOL
icon_state = "welder"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
//Amount of OUCH when it's thrown
force = 3.0
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
//Cost to make in the autolathe
m_amt = 70
g_amt = 30
//R&D tech level
origin_tech = "engineering=1"
var/welding = 0
var/status = 1
var/max_fuel = 20
proc
get_fuel()
remove_fuel(var/amount = 1, var/mob/M = null)
check_status()
toggle(var/message = 0)
eyecheck(mob/user as mob)
//Welding tool specific stuff
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
/obj/item/weapon/weldingtool/New()
// var/random_fuel = min(rand(10,20),max_fuel)
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", max_fuel)
return
New()
var/random_fuel = min(rand(10,20),max_fuel)
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", random_fuel)
return
/obj/item/weapon/weldingtool/examine()
set src in usr
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
return
examine()
set src in usr
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
return
attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "\red Stop welding first!"
return
status = !status
if(status)
user << "\blue You resecure the welder."
else
user << "\blue The welder can now be attached and modified."
src.add_fingerprint(user)
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "\red Stop welding first!"
return
if((!status) && (istype(W,/obj/item/stack/rods)))
var/obj/item/stack/rods/R = W
R.use(1)
var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc)
src.loc = F
F.weldtool = src
if (user.client)
user.client.screen -= src
if (user.r_hand == src)
user.u_equip(src)
else
user.u_equip(src)
src.master = F
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = F
src.add_fingerprint(user)
return
..()
return
process()
switch(welding)
if(0)
processing_objects.Remove(src)
return
if(1)
if(prob(5))//Welders left on now use up fuel, but lets not have them run out quite that fast
remove_fuel(1)
if(2)
if(prob(75))
remove_fuel(1)
//if you're actually actively welding, use fuel faster.
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
afterattack(obj/O as obj, mob/user as mob)
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
O.reagents.trans_to(src, max_fuel)
user << "\blue Welder refueled"
playsound(src.loc, 'refill.ogg', 50, 1, -6)
return
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.")
user << "\red That was stupid of you."
explosion(O.loc,-1,0,2)
if(O)
del(O)
return
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
return
attack_self(mob/user as mob)
toggle()
user.update_clothing()
return
///GET prop for fuel
get_fuel()
return reagents.get_reagent_amount("fuel")
///SET prop for fuel
///Will also turn it off if it is out of fuel
///The mob argument is not needed but if included will call eyecheck() on it if the welder is on.
remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding || !check_status())
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_status()
if(M)
eyecheck(M)//TODO:eyecheck should really be in mob not here
return 1
status = !status
if(status)
user << "\blue You resecure the welder."
else
if(M)
M << "\blue You need more welding fuel to complete this task."
return 0
user << "\blue The welder can now be attached and modified."
src.add_fingerprint(user)
return
if((!status) && (istype(W,/obj/item/stack/rods)))
var/obj/item/stack/rods/R = W
R.use(1)
var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc)
src.loc = F
F.weldtool = src
if (user.client)
user.client.screen -= src
if (user.r_hand == src)
user.u_equip(src)
else
user.u_equip(src)
src.master = F
src.layer = initial(src.layer)
user.u_equip(src)
if (user.client)
user.client.screen -= src
src.loc = F
src.add_fingerprint(user)
return
..()
return
///Quick check to see if we even have any fuel and should shut off
///This could use a better name
check_status()
if((get_fuel() <= 0) && welding)
toggle(1)
return 0
return 1
//toggles the welder off and on
toggle(var/message = 0)
if(!status) return
src.welding = !( src.welding )
if (src.welding)
if (remove_fuel(1))
usr << "\blue You switch the [src] on."
/obj/item/weapon/weldingtool/process()
switch(welding)
//If off
if(0)
if(src.icon_state != "welder") //Check that the sprite is correct, if it isnt, it means toggle() was not called
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
src.welding = 0
processing_objects.Remove(src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
if(src.icon_state != "welder1") //Check that the sprite is correct, if it isnt, it means toggle() was not called
src.force = 15
src.damtype = "fire"
src.icon_state = "welder1"
processing_objects.Add(src)
else
usr << "\blue Need more fuel!"
src.welding = 0
return
else
if(!message)
usr << "\blue You switch the [src] off."
else
usr << "\blue The [src] shuts off!"
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
src.welding = 0
if(prob(5))
remove_fuel(1)
//If you're actually actively welding, use fuel faster.
//Is this actually used or set anywhere? - Nodrak
if(2)
if(prob(75))
remove_fuel(1)
eyecheck(mob/user as mob)
//check eye protection
if(!iscarbon(user)) return 1
var/safety = user:eyecheck()
switch(safety)
if(1)
usr << "\red Your eyes sting a little."
user.eye_stat += rand(1, 2)
if(user.eye_stat > 12)
user.eye_blurry += rand(3,6)
if(0)
usr << "\red Your eyes burn."
user.eye_stat += rand(2, 4)
if(user.eye_stat > 10)
user.eye_blurry += rand(4,10)
if(-1)
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
user.eye_blurry += rand(12,20)
user.eye_stat += rand(12, 16)
if(user.eye_stat > 10 && safety < 2)
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
if (prob(user.eye_stat - 25 + 1))
user << "\red You go blind!"
user.disabilities |= 128
else if (prob(user.eye_stat - 15 + 1))
user << "\red You go blind!"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= 1
// spawn(100)
// user.disabilities &= ~1 //Simpler to just leave them short sighted.
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob)
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
O.reagents.trans_to(src, max_fuel)
user << "\blue Welder refueled"
playsound(src.loc, 'refill.ogg', 50, 1, -6)
return
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.")
user << "\red That was stupid of you."
explosion(O.loc,-1,0,2)
if(O)
del(O)
return
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
return
attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(S)
message_admins("It appears [M] has \"null\" where there should be a [user.zone_sel.selecting]. Check into this, and tell SkyMarshal: \"[M.type]\"")
return ..()
if(!S.robot || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red You patch some dents on \the [M]'s [S.display_name]",\
"\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"You hear a welder.")
else
user.visible_message("\red You patch some dents on your [S.display_name]",\
"\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"You hear a welder.")
else
user << "Nothing to fix!"
/obj/item/weapon/weldingtool/attack_self(mob/user as mob)
toggle()
user.update_clothing()
return
//Returns the amount of fuel in the welder
/obj/item/weapon/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding || !check_fuel())
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
eyecheck(M)
return 1
else
if(M)
M << "\blue You need more welding fuel to complete this task."
return 0
//Returns whether or not the welding tool is currently on.
/obj/item/weapon/weldingtool/proc/isOn()
return src.welding
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
//so that the welding tool updates accordingly
/obj/item/weapon/weldingtool/proc/setWelding(var/temp_welding)
//If we're turning it on
if(temp_welding > 0)
if (remove_fuel(1))
usr << "\blue The [src] switches on."
src.force = 15
src.damtype = "fire"
src.icon_state = "welder1"
processing_objects.Add(src)
else
return ..()
usr << "\blue Need more fuel!"
src.welding = 0
return
//Otherwise
else
usr << "\blue The [src] switches off."
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
src.welding = 0
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
/obj/item/weapon/weldingtool/proc/check_fuel()
if((get_fuel() <= 0) && welding)
toggle(1)
return 0
return 1
//Toggles the welder off and on
/obj/item/weapon/weldingtool/proc/toggle(var/message = 0)
if(!status) return
src.welding = !( src.welding )
if (src.welding)
if (remove_fuel(1))
usr << "\blue You switch the [src] on."
src.force = 15
src.damtype = "fire"
src.icon_state = "welder1"
processing_objects.Add(src)
else
usr << "\blue Need more fuel!"
src.welding = 0
return
else
if(!message)
usr << "\blue You switch the [src] off."
else
usr << "\blue The [src] shuts off!"
src.force = 3
src.damtype = "brute"
src.icon_state = "welder"
src.welding = 0
return
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
if(!iscarbon(user)) return 1
var/safety = user:eyecheck()
switch(safety)
if(1)
usr << "\red Your eyes sting a little."
user.eye_stat += rand(1, 2)
if(user.eye_stat > 12)
user.eye_blurry += rand(3,6)
if(0)
usr << "\red Your eyes burn."
user.eye_stat += rand(2, 4)
if(user.eye_stat > 10)
user.eye_blurry += rand(4,10)
if(-1)
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
user.eye_blurry += rand(12,20)
user.eye_stat += rand(12, 16)
if(user.eye_stat > 10 && safety < 2)
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
if (prob(user.eye_stat - 25 + 1))
user << "\red You go blind!"
user.disabilities |= 128
else if (prob(user.eye_stat - 15 + 1))
user << "\red You go blind!"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= 1
// spawn(100)
// user.disabilities &= ~1 //Simpler to just leave them short sighted.
return
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!S.robot || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red You patch some dents on \the [M]'s [S.display_name]",\
"\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"You hear a welder.")
else
user.visible_message("\red You patch some dents on your [S.display_name]",\
"\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"You hear a welder.")
else
user << "Nothing to fix!"
else
return ..()
/obj/item/weapon/weldingtool/largetank
name = "Industrial Welding Tool"
@@ -325,13 +361,21 @@ WELDINGTOOOL
/obj/item/weapon/weldingtool/experimental
name = "Experimental Welding Tool"
max_fuel = 80
max_fuel = 40
w_class = 3.0
m_amt = 70
g_amt = 120
origin_tech = "engineering=4;plasma=3"
icon_state = "ewelder"
var/last_gen = 0
/obj/item/weapon/weldingtool/experimental/proc/fuel_gen()//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
var/gen_amount = ((world.time-last_gen)/25)
reagents += (gen_amount)
if(reagents > max_fuel)
reagents = max_fuel
/obj/item/weapon/wirecutters
name = "wirecutters"
desc = "This cuts wires."
@@ -346,10 +390,10 @@ WELDINGTOOOL
m_amt = 80
origin_tech = "materials=1;engineering=1"
New()
if(prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/New()
if(prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
+2 -1
View File
@@ -188,7 +188,8 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
if(W:welding)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
TemperatureAct(100)
..()
+6 -6
View File
@@ -67,16 +67,16 @@
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, mx, my)
src.boxes.screen_loc = "[tx],[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = text("[],[]", cx, cy)
O.screen_loc = "[cx],[cy]"
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
//Foreach goto(56)
src.closer.screen_loc = text("[],[]", mx, my)
src.closer.screen_loc = "[mx],[my]"
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
@@ -85,15 +85,15 @@
var/cols = 6
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.screen_loc = "[cx]:16,[cy]:16"
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("11:16,2:16")
src.closer.screen_loc = "11:16,2:16"
return
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
+2 -1
View File
@@ -95,7 +95,8 @@
attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
if(W:welding == 1)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
overlays = null
usr << "You slice off [src]'s uneven chunks of aluminum and scorch marks."
return
+14 -13
View File
@@ -237,19 +237,20 @@ SHARDS
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ( istype(W, /obj/item/weapon/weldingtool) && W:welding )
W:eyecheck(user)
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
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/glass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
return ..()
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
+5 -2
View File
@@ -12,11 +12,14 @@ FLOOR TILES
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(amount < 2)
user << "\red You need at least two rods to do this."
return
if(W:remove_fuel(0,user))
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
+4 -4
View File
@@ -8,9 +8,9 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 30, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/wood
New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
+6 -6
View File
@@ -66,30 +66,30 @@
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = text("[cx],[cy]")
O.screen_loc = "[cx],[cy]"
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
src.closer.screen_loc = text("[mx+1],[my]")
src.closer.screen_loc = "[mx+1],[my]"
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/storage/proc/standard_orient_objs(var/rows,var/cols)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
for(var/obj/O in src.contents)
O.screen_loc = text("[cx]:16,[cy]:16")
O.screen_loc = "[cx]:16,[cy]:16"
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
src.closer.screen_loc = "[4+cols+1]:16,2:16"
return
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
+4 -4
View File
@@ -173,7 +173,6 @@ obj/structure/meteorhit(obj/O as obj)
else
return
/obj/structure/girder/displaced
icon_state = "displaced"
anchored = 0
@@ -259,9 +258,10 @@ obj/structure/meteorhit(obj/O as obj)
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
if (istype(C, /obj/item/weapon/weldingtool) && C:welding)
user << "\blue Slicing lattice joints ..."
C:eyecheck(user)
if (istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user))
user << "\blue Slicing lattice joints ..."
new /obj/item/stack/rods(src.loc)
del(src)
+4 -5
View File
@@ -283,23 +283,22 @@ TABLE AND RACK OBJECT INTERATIONS
return
if (istype(W, /obj/item/weapon/weldingtool))
if(W:welding == 1)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
if(src.status == 2)
W:welding = 2
user << "\blue Now weakening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
if (do_after(user, 50))
if(!src || !WT.isOn()) return
user << "\blue Table weakened"
src.status = 1
W:welding = 1
else
W:welding = 2
user << "\blue Now strengthening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
if (do_after(user, 50))
if(!src || !WT.isOn()) return
user << "\blue Table strengthened"
src.status = 2
W:welding = 1
return
if(isrobot(user))
return
+172 -101
View File
@@ -81,113 +81,184 @@ 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=random'>Random Item (??)</A><br>"
src.menu_message += "<HR>"
return
/*
//If 'random' was selected
proc/chooseRandomItem()
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/item/device/radio/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
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
randomItems.Add("/obj/item/clothing/glasses/thermal") //Thermal Imaging Goggles
if(uses > 1)
/*
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
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/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
var/buyItem = pick(randomItems)
switch(buyItem) //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" , "/obj/item/weapon/storage/box/syndicate")
uses -= 10
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/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")
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" , "/obj/item/clothing/glasses/thermal")
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 buyItem
proc/handleStatTracking(var/boughtItem)
//For stat tracking, sorry for making it so ugly
if(!boughtItem) return
switch(boughtItem)
if("/obj/item/weapon/circuitboard/teleporter")
feedback_add_details("traitor_uplink_items_bought","TP")
if("/obj/item/toy/syndicateballoon")
feedback_add_details("traitor_uplink_items_bought","BS")
if("/obj/item/weapon/storage/syndie_kit/imp_uplink")
feedback_add_details("traitor_uplink_items_bought","UI")
if("/obj/item/weapon/storage/box/syndicate")
feedback_add_details("traitor_uplink_items_bought","BU")
if("/obj/item/weapon/aiModule/syndicate")
feedback_add_details("traitor_uplink_items_bought","AI")
if("/obj/item/device/radio/beacon/syndicate")
feedback_add_details("traitor_uplink_items_bought","SB")
if("/obj/item/weapon/gun/projectile")
feedback_add_details("traitor_uplink_items_bought","RE")
if("/obj/item/weapon/gun/energy/crossbow")
feedback_add_details("traitor_uplink_items_bought","XB")
if("/obj/item/device/powersink")
feedback_add_details("traitor_uplink_items_bought","PS")
if("/obj/item/weapon/melee/energy/sword")
feedback_add_details("traitor_uplink_items_bought","ES")
if("/obj/item/clothing/mask/gas/voice")
feedback_add_details("traitor_uplink_items_bought","VC")
if("/obj/item/device/chameleon")
feedback_add_details("traitor_uplink_items_bought","CP")
if("/obj/item/weapon/storage/emp_kit")
feedback_add_details("traitor_uplink_items_bought","EM")
if("/obj/item/weapon/pen/paralysis")
feedback_add_details("traitor_uplink_items_bought","PP")
if("/obj/item/weapon/cartridge/syndicate")
feedback_add_details("traitor_uplink_items_bought","DC")
if("/obj/item/clothing/under/chameleon")
feedback_add_details("traitor_uplink_items_bought","CJ")
if("/obj/item/weapon/card/id/syndicate")
feedback_add_details("traitor_uplink_items_bought","AC")
if("/obj/item/weapon/card/emag")
feedback_add_details("traitor_uplink_items_bought","EC")
if("/obj/item/weapon/storage/syndie_kit/space")
feedback_add_details("traitor_uplink_items_bought","SS")
if("/obj/item/device/encryptionkey/binary")
feedback_add_details("traitor_uplink_items_bought","BT")
if("/obj/item/weapon/storage/syndie_kit/imp_freedom")
feedback_add_details("traitor_uplink_items_bought","FI")
if("/obj/item/clothing/glasses/thermal")
feedback_add_details("traitor_uplink_items_bought","TM")
if("/obj/item/ammo_magazine/a357")
feedback_add_details("traitor_uplink_items_bought","RA")
if("/obj/item/clothing/shoes/syndigaloshes")
feedback_add_details("traitor_uplink_items_bought","SH")
if("/obj/item/weapon/plastique")
feedback_add_details("traitor_uplink_items_bought","C4")
if("/obj/item/weapon/soap/syndie")
feedback_add_details("traitor_uplink_items_bought","SP")
if("/obj/item/weapon/storage/toolbox/syndicate")
feedback_add_details("traitor_uplink_items_bought","ST")
*/
Topic(href, href_list)
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/item/device/radio/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
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
randomItems.Add("/obj/item/clothing/glasses/thermal") //Thermal Imaging Goggles
if(uses > 1)
/*
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
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/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" , "/obj/item/weapon/storage/box/syndicate")
uses -= 10
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/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")
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" , "/obj/item/clothing/glasses/thermal")
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(href_list["buy_item"] == "random")
return 0
/*
var/boughtItem = chooseRandomItem()
if(boughtItem)
href_list["buy_item"] = boughtItem
feedback_add_details("traitor_uplink_items_bought","RN")
return 1
else
return 0
*/
else
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
return 0
//if(usr:mind && ticker.mode.traitors[usr:mind])
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
//info.spawnlist += href_list["buy_item"]
uses -= text2num(href_list["cost"])
//if(usr:mind && ticker.mode.traitors[usr:mind])
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
//info.spawnlist += href_list["buy_item"]
uses -= text2num(href_list["cost"])
// handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
return 1
+1 -1
View File
@@ -68,7 +68,7 @@ obj/structure/windoor_assembly/Del()
playsound(src.loc, 'Welder2.ogg', 50, 1)
if(do_after(user, 40))
if(!src) return
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the windoor assembly!"
new /obj/item/stack/sheet/rglass(get_turf(src), 5)
if(secure)