Merged airlock assembly changes and ZAS changes, hopefully.

This commit is contained in:
Zuhayr
2013-06-24 21:06:51 -07:00
763 changed files with 5739 additions and 1917 deletions
+1 -1
View File
@@ -4,5 +4,5 @@
anchored = 1
New()
var/list/valid_states = list("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead")
var/list/valid_states = list("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt")
src.icon_state = "[pick(valid_states)]"
+22 -5
View File
@@ -4,18 +4,35 @@
icon_state = "voice0"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
w_class = 1.0
flags = FPRINT | TABLEPASS| CONDUCT
flags = FPRINT | TABLEPASS | CONDUCT
var/spamcheck = 0
var/emagged = 0
var/insults = 0//just in case
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if (spamcheck)
return
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.visible_message("<span class='warning'>[user]'s [name] rasps, \"Halt! Security!\"</span>")
if(emagged)
if(insults >= 1)
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)//hueheuheuheuheuheuhe
user.visible_message("<span class='warning'>[user]'s [name] gurgles, \"FUCK YOUR CUNT YOU SHIT EATING CUNT TILL YOU ARE A MASS EATING SHIT CUNT. EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS TO FUCK UP SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FROM THE DEPTHS OF SHIT\"</span>")
insults--
else
user << "\red *BZZZZcuntZZZZT*"
else
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.visible_message("<span class='warning'>[user]'s [name] rasps, \"Halt! Security!\"</span>")
spamcheck = 1
spawn(20)
spamcheck = 0
spamcheck = 0
/obj/item/device/hailer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
user << "\red You overload \the [src]'s voice synthesizer."
emagged = 1
insults = rand(1, 3)//to prevent dickflooding
return
return
+13 -2
View File
@@ -8,6 +8,7 @@
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
var/list/part = null
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
/obj/item/robot_parts/l_arm
name = "robot left arm"
@@ -161,7 +162,7 @@
else
user << "\blue You need to attach a flash to it first!"
if(istype(W, /obj/item/device/mmi) || istype(W, /obj/item/device/mmi/posibrain))
if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
if(!istype(loc,/turf))
@@ -193,7 +194,7 @@
user << "\red This [W] does not seem to fit."
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
if(!O) return
user.drop_item()
@@ -278,3 +279,13 @@
del(src)
return
return
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/card/emag))
if(sabotaged)
user << "\red [src] is already sabotaged!"
else
user << "\red You slide [W] into the dataport on [src] and short out the safeties."
sabotaged = 1
return
..()
@@ -124,7 +124,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
throw_range = 3
origin_tech = "materials=3"
perunit = 2000
sheettype = "plastic"
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/pcrate, 10, one_per_turf = 1, on_floor = 1), \
@@ -13,10 +13,20 @@
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("swivel chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
@@ -28,10 +38,27 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \
), 4), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
+74 -38
View File
@@ -1,7 +1,8 @@
/* Stack type objects!
* Contains:
* Stacks
* Recipe datum
* Recipe datum
* Recipe list datum
*/
/*
@@ -32,51 +33,66 @@
return
/obj/item/stack/attack_self(mob/user as mob)
interact(user)
list_recipes(user)
/obj/item/stack/interact(mob/user as mob)
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
if (!recipes)
return
if (!src || amount<=0)
user << browse(null, "window=stack")
user.set_machine(src) //for correct work of onclose
var/list/recipe_list = recipes
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
for(var/i=1;i<=recipes.len,i++)
var/datum/stack_recipe/R = recipes[i]
if (isnull(R))
for(var/i=1;i<=recipe_list.len,i++)
var/E = recipe_list[i]
if (isnull(E))
t1 += "<hr>"
continue
if (i>1 && !isnull(recipes[i-1]))
if (i>1 && !isnull(recipe_list[i-1]))
t1+="<br>"
var/max_multiplier = round(src.amount / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
title+= "[R.title]"
title+= " ([R.req_amount] [src.singular_name]\s)"
if (can_build)
t1 += text("<A href='?src=\ref[];make=[]'>[]</A> ", src, i, title)
else
t1 += text("[]", title)
continue
if (R.max_res_amount>1 && max_multiplier>1)
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for (var/n in multipliers)
if (max_multiplier>=n)
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
if (!(max_multiplier in multipliers))
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
if (istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
if (src.amount >= srl.req_amount)
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
else
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.amount / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
title+= "[R.title]"
title+= " ([R.req_amount] [src.singular_name]\s)"
if (can_build)
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i]'>[title]</A> ")
else
t1 += text("[]", title)
continue
if (R.max_res_amount>1 && max_multiplier>1)
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for (var/n in multipliers)
if (max_multiplier>=n)
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
if (!(max_multiplier in multipliers))
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
t1 += "</TT></body></HTML>"
user << browse(t1, "window=stack")
@@ -87,10 +103,18 @@
..()
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
if (href_list["sublist"] && !href_list["make"])
list_recipes(usr, text2num(href_list["sublist"]))
if (href_list["make"])
if (src.amount < 1) del(src) //Never should happen
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
var/list/recipes_list = recipes
if (href_list["sublist"])
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
recipes_list = srl.recipes
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
if (src.amount < R.req_amount*multiplier)
@@ -222,4 +246,16 @@
src.max_res_amount = max_res_amount
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
src.on_floor = on_floor
/*
* Recipe list datum
*/
/datum/stack_recipe_list
var/title = "ERROR"
var/list/recipes = null
var/req_amount = 1
New(title, recipes, req_amount = 1)
src.title = title
src.recipes = recipes
src.req_amount = req_amount
@@ -153,6 +153,7 @@
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = FPRINT | TABLEPASS | CONDUCT
sharp = 1
force = 10.0
w_class = 3.0
throwforce = 6.0
@@ -277,7 +277,41 @@
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
/obj/item/weapon/storage/box/farwacubes
name = "farwa cube box"
desc = "Drymate brand farwa cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/farwacube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/farwacube/wrapped(src)
/obj/item/weapon/storage/box/stokcubes
name = "stok cube box"
desc = "Drymate brand stok cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/stokcube/wrapped(src)
/obj/item/weapon/storage/box/neaeracubes
name = "neaera cube box"
desc = "Drymate brand neaera cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/neaeracube/wrapped(src)
/obj/item/weapon/storage/box/ids
name = "spare IDs"
@@ -19,7 +19,7 @@
m_amt = 10000
g_amt = 5000
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
@@ -133,7 +133,7 @@ LOOK FOR SURGERY.DM*/
m_amt = 5000
g_amt = 2500
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
@@ -268,7 +268,7 @@ LOOK FOR SURGERY.DM*/
m_amt = 5000
g_amt = 2500
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
@@ -360,7 +360,7 @@ LOOK FOR SURGERY.DM*/
g_amt = 10000
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 1.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("drilled")
@@ -379,7 +379,7 @@ LOOK FOR SURGERY.DM*/
icon_state = "scalpel"
flags = FPRINT | TABLEPASS | CONDUCT
force = 10.0
w_class = 1.0
w_class = 2.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
@@ -631,7 +631,7 @@ LOOK FOR SURGERY.DM*/
hitsound = 'sound/weapons/circsawhit.ogg'
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 1.0
w_class = 2.0
throwforce = 9.0
throw_speed = 3
throw_range = 5
@@ -797,6 +797,7 @@ LOOK FOR SURGERY.DM*/
icon = 'surgery.dmi'
icon_state = "bone-gel"
force = 0
w_class = 2.0
throwforce = 1.0
/obj/item/weapon/FixOVein
@@ -806,6 +807,7 @@ LOOK FOR SURGERY.DM*/
force = 0
throwforce = 1.0
origin_tech = "materials=1;biotech=3"
w_class = 2.0
var/usage_amount = 10
/obj/item/weapon/bonesetter
@@ -816,4 +818,5 @@ LOOK FOR SURGERY.DM*/
throwforce = 9.0
throw_speed = 3
throw_range = 5
w_class = 2.0
attack_verb = list("attacked", "hit", "bludgeoned")
+12 -1
View File
@@ -136,4 +136,15 @@
/obj/item/weapon/katana/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
return ..()
/obj/item/weapon/harpoon
name = "harpoon"
sharp = 1
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
+104
View File
@@ -0,0 +1,104 @@
/obj/random
name = "Random Object"
desc = "This item type is used to spawn random objects at round-start"
icon = 'icons/misc/mark.dmi'
icon_state = "rup"
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
// creates a new object and deletes itself
/obj/random/New()
..()
if (!prob(spawn_nothing_percentage))
spawn_item()
del src
// this function should return a specific item to spawn
/obj/random/proc/item_to_spawn()
return 0
// creates the random item
/obj/random/proc/spawn_item()
var/build_path = item_to_spawn()
return (new build_path(src.loc))
/obj/random/tool
name = "Random Tool"
desc = "This is a random tool"
icon = 'icons/obj/items.dmi'
icon_state = "welder"
item_to_spawn()
return pick(/obj/item/weapon/screwdriver,\
/obj/item/weapon/wirecutters,\
/obj/item/weapon/weldingtool,\
/obj/item/weapon/crowbar,\
/obj/item/weapon/wrench,\
/obj/item/device/flashlight)
/obj/random/technology_scanner
name = "Random Scanner"
desc = "This is a random technology scanner."
icon = 'icons/obj/device.dmi'
icon_state = "atmos"
item_to_spawn()
return pick(prob(5);/obj/item/device/t_scanner,\
prob(2);/obj/item/device/radio/intercom,\
prob(5);/obj/item/device/analyzer)
/obj/random/powercell
name = "Random Powercell"
desc = "This is a random powercell."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_to_spawn()
return pick(prob(10);/obj/item/weapon/cell/crap,\
prob(40);/obj/item/weapon/cell,\
prob(40);/obj/item/weapon/cell/high,\
prob(9);/obj/item/weapon/cell/super,\
prob(1);/obj/item/weapon/cell/hyper)
/obj/random/bomb_supply
name = "Bomb Supply"
desc = "This is a random bomb supply."
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "signaller"
item_to_spawn()
return pick(/obj/item/device/assembly/igniter,\
/obj/item/device/assembly/prox_sensor,\
/obj/item/device/assembly/signaler)
/obj/random/toolbox
name = "Random Toolbox"
desc = "This is a random toolbox."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/toolbox/mechanical,\
prob(2);/obj/item/weapon/storage/toolbox/electrical,\
prob(1);/obj/item/weapon/storage/toolbox/emergency)
/obj/random/tech_supply
name = "Random Tech Supply"
desc = "This is a random piece of technology supplies."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(3);/obj/random/powercell,\
prob(2);/obj/random/technology_scanner,\
prob(1);/obj/item/weapon/packageWrap,\
prob(2);/obj/random/bomb_supply,\
prob(1);/obj/item/weapon/extinguisher,\
prob(1);/obj/item/clothing/gloves/fyellow,\
prob(3);/obj/item/weapon/cable_coil,\
prob(2);/obj/random/toolbox,\
prob(2);/obj/item/weapon/storage/belt/utility,\
prob(5);/obj/random/tool)
@@ -104,6 +104,10 @@
new /obj/item/weapon/storage/backpack/industrial(src)
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
new /obj/item/clothing/tie/storage/brown_vest(src)
else
new /obj/item/clothing/tie/storage/webbing(src)
new /obj/item/clothing/under/rank/engineer(src)
new /obj/item/clothing/shoes/orange(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
@@ -81,6 +81,7 @@
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/leather(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
return
@@ -187,6 +188,7 @@
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/clothing/tie/storage/black_vest(src)
return
+141 -306
View File
@@ -6,278 +6,100 @@ obj/structure/door_assembly
anchored = 0
density = 1
var/state = 0
var/mineral = null
var/base_icon_state = "door_as_0"
var/glass_base_icon_state = "door_as_g0"
var/base_icon_state = ""
var/base_name = "Airlock"
var/obj/item/weapon/airlock_electronics/electronics = null
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
var/glass_type = /obj/machinery/door/airlock/glass
var/glass = null
var/airlock_type = "" //the type path of the airlock once completed
var/glass_type = "/glass"
var/glass = 0 // 0 = glass can be installed. -1 = glass can't be installed. 1 = glass is already installed. Text = mineral plating is installed instead.
var/created_name = null
New()
base_icon_state = copytext(icon_state,1,lentext(icon_state))
door_assembly_0
name = "Airlock Assembly"
icon_state = "door_as_1"
airlock_type = /obj/machinery/door/airlock
anchored = 1
density = 1
state = 1
glass = 0
update_state()
door_assembly_com
name = "Command Airlock Assembly"
icon_state = "door_as_com1"
glass_base_icon_state = "door_as_gcom"
glass_type = /obj/machinery/door/airlock/glass_command
airlock_type = /obj/machinery/door/airlock/command
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gcom1"
base_icon_state = "com"
base_name = "Command Airlock"
glass_type = "/glass_command"
airlock_type = "/command"
door_assembly_sec
name = "Security Airlock Assembly"
icon_state = "door_as_sec1"
glass_base_icon_state = "door_as_gsec"
glass_type = /obj/machinery/door/airlock/glass_security
airlock_type = /obj/machinery/door/airlock/security
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gsec1"
base_icon_state = "sec"
base_name = "Security Airlock"
glass_type = "/glass_security"
airlock_type = "/security"
door_assembly_eng
name = "Engineering Airlock Assembly"
icon_state = "door_as_eng1"
glass_base_icon_state = "door_as_geng"
glass_type = /obj/machinery/door/airlock/glass_engineering
airlock_type = /obj/machinery/door/airlock/engineering
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_geng1"
base_icon_state = "eng"
base_name = "Engineering Airlock"
glass_type = "/glass_engineering"
airlock_type = "/engineering"
door_assembly_min
name = "Mining Airlock Assembly"
icon_state = "door_as_min1"
glass_base_icon_state = "door_as_gmin"
glass_type = /obj/machinery/door/airlock/glass_mining
airlock_type = /obj/machinery/door/airlock/mining
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gmin1"
base_icon_state = "min"
base_name = "Mining Airlock"
glass_type = "/glass_mining"
airlock_type = "/mining"
door_assembly_atmo
name = "Atmospherics Airlock Assembly"
icon_state = "door_as_atmo1"
glass_base_icon_state = "door_as_gatmo"
glass_type = /obj/machinery/door/airlock/glass_atmos
airlock_type = /obj/machinery/door/airlock/atmos
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gatmo1"
base_icon_state = "atmo"
base_name = "Atmospherics Airlock"
glass_type = "/glass_atmos"
airlock_type = "/atmos"
door_assembly_research
name = "Research Airlock Assembly"
icon_state = "door_as_res1"
glass_base_icon_state = "door_as_gres"
glass_type = /obj/machinery/door/airlock/glass_research
airlock_type = /obj/machinery/door/airlock/research
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gres1"
base_icon_state = "res"
base_name = "Research Airlock"
glass_type = "/glass_research"
airlock_type = "/research"
door_assembly_science
name = "Science Airlock Assembly"
icon_state = "door_as_sci1"
glass_base_icon_state = "door_as_gsci"
glass_type = /obj/machinery/door/airlock/glass_science
airlock_type = /obj/machinery/door/airlock/science
anchored = 1
density = 1
state = 1
glass = 0
glass
glass = 1
icon_state = "door_as_gsci1"
base_icon_state = "sci"
base_name = "Science Airlock"
glass_type = "/glass_science"
airlock_type = "/science"
door_assembly_med
name = "Medical Airlock Assembly"
icon_state = "door_as_med1"
airlock_type = /obj/machinery/door/airlock/medical
anchored = 1
density = 1
state = 1
glass
mineral = "glass"
icon_state = "door_as_gmed1"
base_icon_state = "med"
base_name = "Medical Airlock"
glass_type = "/glass_medical"
airlock_type = "/medical"
door_assembly_mai
name = "Maintenance Airlock Assembly"
icon_state = "door_as_mai1"
airlock_type = /obj/machinery/door/airlock/maintenance
anchored = 1
density = 1
state = 1
glass = 0
base_icon_state = "mai"
base_name = "Maintenance Airlock"
airlock_type = "/maintenance"
glass = -1
door_assembly_ext
name = "External Airlock Assembly"
icon_state = "door_as_ext1"
airlock_type = /obj/machinery/door/airlock/external
anchored = 1
density = 1
state = 1
glass = 0
base_icon_state = "ext"
base_name = "External Airlock"
airlock_type = "/external"
glass = -1
door_assembly_fre
name = "Freezer Airlock Assembly"
icon_state = "door_as_fre1"
airlock_type = /obj/machinery/door/airlock/freezer
anchored = 1
density = 1
state = 1
glass = 0
base_icon_state = "fre"
base_name = "Freezer Airlock"
airlock_type = "/freezer"
glass = -1
door_assembly_hatch
name = "Airtight Hatch Assembly"
icon_state = "door_as_hatch1"
airlock_type = /obj/machinery/door/airlock/hatch
anchored = 1
density = 1
state = 1
glass = 0
base_icon_state = "hatch"
base_name = "Airtight Hatch"
airlock_type = "/hatch"
glass = -1
door_assembly_mhatch
name = "Maintenance Hatch Assembly"
icon_state = "door_as_mhatch1"
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
anchored = 1
density = 1
state = 1
glass = 0
door_assembly_glass
name = "Glass Airlock Assembly"
icon_state = "door_as_g1"
airlock_type = /obj/machinery/door/airlock/glass
anchored = 1
density = 1
state = 1
mineral = "glass"
door_assembly_gold
name = "Gold Airlock Assembly"
icon_state = "door_as_gold1"
airlock_type = /obj/machinery/door/airlock/gold
anchored = 1
density = 1
state = 1
mineral = "gold"
door_assembly_silver
name = "Silver Airlock Assembly"
icon_state = "door_as_silver1"
airlock_type = /obj/machinery/door/airlock/silver
anchored = 1
density = 1
state = 1
mineral = "silver"
door_assembly_diamond
name = "Diamond Airlock Assembly"
icon_state = "door_as_diamond1"
airlock_type = /obj/machinery/door/airlock/diamond
anchored = 1
density = 1
state = 1
mineral = "diamond"
door_assembly_uranium
name = "Uranium Airlock Assembly"
icon_state = "door_as_uranium1"
airlock_type = /obj/machinery/door/airlock/uranium
anchored = 1
density = 1
state = 1
mineral = "uranium"
door_assembly_plasma
name = "Plasma Airlock Assembly"
icon_state = "door_as_plasma1"
airlock_type = /obj/machinery/door/airlock/plasma
anchored = 1
density = 1
state = 1
mineral = "plasma"
door_assembly_clown
name = "Bananium Airlock Assembly"
icon_state = "door_as_clown1"
airlock_type = /obj/machinery/door/airlock/clown
anchored = 1
density = 1
state = 1
mineral = "clown"
door_assembly_sandstone
name = "Sandstone Airlock Assembly"
icon_state = "door_as_sandstone1"
airlock_type = /obj/machinery/door/airlock/sandstone
anchored = 1
density = 1
state = 1
mineral = "sandstone"
door_assembly_sandstone
name = "Sandstone Airlock Assembly"
icon_state = "door_as_sandstone1"
airlock_type = /obj/machinery/door/airlock/sandstone
anchored = 1
density = 1
state = 1
mineral = "sandstone"
base_icon_state = "mhatch"
base_name = "Maintenance Hatch"
airlock_type = "/maintenance_hatch"
glass = -1
door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
name = "High Tech Security Assembly"
icon_state = "door_as_highsec1"
airlock_type = /obj/machinery/door/airlock/highsecurity
anchored = 1
density = 1
state = 1
glass = 0
base_icon_state = "highsec"
base_name = "High Security Airlock"
airlock_type = "/highsecurity"
glass = -1
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
@@ -287,46 +109,47 @@ obj/structure/door_assembly
created_name = t
return
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!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.")
if (WT.remove_fuel(0, user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(get_turf(src), 4)
if (mineral)
if (mineral == "glass")
new /obj/item/stack/sheet/rglass(get_turf(src))
else
var/M = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new M(get_turf(src))
new M(get_turf(src))
del(src)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You welded the [glass] plating off!"
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
new M(src.loc, 2)
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You welded the glass panel out!"
new /obj/item/stack/sheet/rglass(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(src.loc, 4)
del (src)
else
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
user << "\blue You need more welding fuel."
return
else if(istype(W, /obj/item/weapon/wrench) && !anchored )
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
if(anchored)
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
else
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
if(do_after(user, 40))
if(!src) return
user << "\blue You secured the airlock assembly!"
src.name = "Secured Airlock Assembly"
src.anchored = 1
else if(istype(W, /obj/item/weapon/wrench) && anchored )
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
if(do_after(user, 40))
if(!src) return
user << "\blue You unsecured the airlock assembly!"
src.name = "Airlock Assembly"
src.anchored = 0
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
anchored = !anchored
else if(istype(W, /obj/item/weapon/cable_coil) && state == 0 && anchored )
var/obj/item/weapon/cable_coil/coil = W
@@ -336,7 +159,6 @@ obj/structure/door_assembly
coil.use(1)
src.state = 1
user << "\blue You wire the Airlock!"
src.name = "Wired Airlock Assembly"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -345,9 +167,8 @@ obj/structure/door_assembly
if(do_after(user, 40))
if(!src) return
user << "\blue You cut the airlock wires.!"
new/obj/item/weapon/cable_coil(get_turf(user), 1)
new/obj/item/weapon/cable_coil(src.loc, 1)
src.state = 0
src.name = "Secured Airlock Assembly"
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
@@ -364,8 +185,6 @@ obj/structure/door_assembly
else
W.loc = src.loc
//del(W)
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
@@ -382,32 +201,28 @@ obj/structure/door_assembly
ae = electronics
electronics = null
ae.loc = src.loc
else if(istype(W, /obj/item/stack/sheet) && !mineral)
var/obj/item/stack/sheet/G = W
if(G)
if(G.amount>=1)
if(G.type == /obj/item/stack/sheet/rglass)
else if(istype(W, /obj/item/stack/sheet) && !glass)
var/obj/item/stack/sheet/S = W
if (S)
if (S.amount>=1)
if(istype(S, /obj/item/stack/sheet/rglass))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed reinforced glass windows into the airlock assembly!"
G.use(1)
src.mineral = "glass"
src.name = "Near finished Window Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/glass
src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end.
else if(istype(G, /obj/item/stack/sheet/mineral))
var/M = G.sheettype
if(G.amount>=2)
S.use(1)
glass = 1
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
var/M = S.sheettype
if(S.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed [M] plating into the airlock assembly!"
G.use(2)
src.mineral = "[M]"
src.name = "Near finished [M] Airlock Assembly"
src.airlock_type = text2path ("/obj/machinery/door/airlock/[M]")
src.base_icon_state = "door_as_[M]"
S.use(2)
glass = "[M]"
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "\blue Now finishing the airlock."
@@ -415,20 +230,40 @@ obj/structure/door_assembly
if(do_after(user, 40))
if(!src) return
user << "\blue You finish the airlock!"
var/obj/machinery/door/airlock/door
if (mineral)
airlock_type = text2path("/obj/machinery/door/airlock/[mineral]")
door = new src.airlock_type( src.loc )
//door.req_access = src.req_access
var/path
if(istext(glass))
path = text2path("/obj/machinery/door/airlock/[glass]")
else if (glass == 1)
path = text2path("/obj/machinery/door/airlock[glass_type]")
else
path = text2path("/obj/machinery/door/airlock[airlock_type]")
var/obj/machinery/door/airlock/door = new path(src.loc)
door.assembly_type = type
door.electronics = src.electronics
door.req_access = src.electronics.conf_access
if(src.electronics.one_access)
door.req_access = null
door.req_one_access = src.electronics.conf_access
else
door.req_access = src.electronics.conf_access
if(created_name)
door.name = created_name
else
door.name = "[istext(glass) ? "[glass] airlock" : base_name]"
src.electronics.loc = door
del(src)
else
..()
icon_state = "[base_icon_state][state]"
//This updates the icon_state. They are named as "door_as1_eng" where the 1 in that example
//represents what state it's in. So the most generic algorithm for the correct updating of
//this is simply to change the number.
update_state()
/obj/structure/door_assembly/proc/update_state()
icon_state = "door_as_[glass == 1 ? "g" : ""][istext(glass) ? glass : base_icon_state][state]"
name = ""
switch (state)
if(0)
if (anchored)
name = "Secured "
if(1)
name = "Wired "
if(2)
name = "Near Finished "
name += "[glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly"
@@ -13,6 +13,12 @@
icon_state = "bed"
var/mob/living/buckled_mob
/obj/structure/stool/psychbed
name = "psych bed"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
var/mob/living/buckled_mob
/obj/structure/stool/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
@@ -107,17 +107,17 @@ obj/structure/windoor_assembly/Del()
src.name = "Windoor Assembly"
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
var/obj/item/stack/sheet/plasteel/P = W
if(P.amount < 2)
user << "\red You need more plasteel to do this."
else if(istype(W, /obj/item/stack/rods) && !secure)
var/obj/item/stack/rods/R = W
if(R.amount < 4)
user << "\red You need more rods to do this."
return
user << "\blue You start to reinforce the windoor with plasteel."
user << "\blue You start to reinforce the windoor with rods."
if(do_after(user,40))
if(!src) return
P.use(2)
R.use(4)
user << "\blue You reinforce the windoor."
src.secure = "secure_"
if(src.anchored)
@@ -145,7 +145,7 @@ obj/structure/windoor_assembly/Del()
if("02")
//Removing wire from the assembly. Step 5 undone.
if(istype(W, /obj/item/weapon/wirecutters))
if(istype(W, /obj/item/weapon/wirecutters) && !src.electronics)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
@@ -156,12 +156,12 @@ obj/structure/windoor_assembly/Del()
new/obj/item/weapon/cable_coil(get_turf(user), 1)
src.state = "01"
if(src.secure)
src.name = "Secure Wired Windoor Assembly"
src.name = "Secure Anchored Windoor Assembly"
else
src.name = "Wired Windoor Assembly"
src.name = "Anchored Windoor Assembly"
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics))
else if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
@@ -177,22 +177,20 @@ obj/structure/windoor_assembly/Del()
W.loc = src.loc
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(istype(W, /obj/item/weapon/screwdriver))
else if(istype(W, /obj/item/weapon/screwdriver) && src.electronics)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
if(do_after(user, 40))
if(!src) return
if(!src || !src.electronics) return
user << "\blue You've removed the airlock electronics!"
src.name = "Wired Windoor Assembly"
var/obj/item/weapon/airlock_electronics/ae
if (!electronics)
ae = new/obj/item/weapon/airlock_electronics( src.loc )
if(src.secure)
src.name = "Secure Wired Windoor Assembly"
else
ae = electronics
electronics = null
ae.loc = src.loc
src.name = "Wired Windoor Assembly"
var/obj/item/weapon/airlock_electronics/ae = electronics
electronics = null
ae.loc = src.loc
//Crowbar to complete the assembly, Step 7 complete.
else if(istype(W, /obj/item/weapon/crowbar))
@@ -221,7 +219,11 @@ obj/structure/windoor_assembly/Del()
windoor.dir = src.dir
windoor.density = 0
windoor.req_access = src.electronics.conf_access
if(src.electronics.one_access)
windoor.req_access = null
windoor.req_one_access = src.electronics.conf_access
else
windoor.req_access = src.electronics.conf_access
windoor.electronics = src.electronics
src.electronics.loc = windoor
else
@@ -235,7 +237,11 @@ obj/structure/windoor_assembly/Del()
windoor.dir = src.dir
windoor.density = 0
windoor.req_access = src.electronics.conf_access
if(src.electronics.one_access)
windoor.req_access = null
windoor.req_one_access = src.electronics.conf_access
else
windoor.req_access = src.electronics.conf_access
windoor.electronics = src.electronics
src.electronics.loc = windoor