Merge github.com:Baystation12/Baystation12

Conflicts:
	html/changelog.html
This commit is contained in:
cib
2012-05-19 19:42:30 +02:00
153 changed files with 15174 additions and 13698 deletions
+7 -9
View File
@@ -1,19 +1,17 @@
/obj/structure/closet/secure_closet/cargotech
name = "Cargo Technician's Locker"
req_access = list(access_cargo)
//icon_state = "secureeng1"
//icon_closed = "secureeng"
//icon_locked = "secureeng1"
//icon_opened = "toolclosetopen"
//icon_broken = "secureengbroken"
//icon_off = "secureengoff"
//Needs proper sprites
icon_state = "securecargo1"
icon_closed = "securecargo"
icon_locked = "securecargo1"
icon_opened = "securecargoopen"
icon_broken = "securecargobroken"
icon_off = "securecargooff"
New()
..()
sleep(2)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/under/rank/cargotech(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/gloves/black(src)
@@ -16,7 +16,8 @@
new /obj/item/clothing/under/rank/hydroponics(src)
new /obj/item/clothing/suit/storage/apron(src)
new /obj/item/clothing/under/rank/hydroponics(src)
new /obj/item/clothing/head/helmet/greenbandana(src)
new /obj/item/device/analyzer/plant_analyzer(src)
new /obj/item/clothing/head/helmet/greenbandana(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
return
@@ -72,6 +72,20 @@
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")))
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")))
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)
new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
return
+1 -1
View File
@@ -26,7 +26,7 @@
..()
spawn(4)
contents = list()
new /obj/item/weapon/storage/backpack/satchel( src )
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
new /obj/item/device/radio/headset( src )
return
+8 -8
View File
@@ -31,12 +31,12 @@
/obj/structure/closet/secure_closet/hop
name = "Head of Personnel"
req_access = list(access_hop)
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
icon_state = "hopsecure1"
icon_closed = "hopsecure"
icon_locked = "hopsecure1"
icon_opened = "hopsecureopen"
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
New()
..()
@@ -144,9 +144,9 @@
new /obj/item/device/pda/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/weapon/flashbang(src)
new /obj/item/weapon/pepperspray(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/pepperspray(src)
new /obj/item/weapon/flashbang(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
return
+16 -4
View File
@@ -110,6 +110,9 @@
default_cartridge = /obj/item/weapon/cartridge/quartermaster
icon_state = "pda-q"
/obj/item/device/pda/shaftminer
icon_state = "pda-miner"
/obj/item/device/pda/syndicate
default_cartridge = /obj/item/weapon/cartridge/syndicate
icon_state = "pda-syn"
@@ -129,6 +132,11 @@
//default_cartridge = /obj/item/weapon/cartridge/botanist
icon_state = "pda-hydro"
/obj/item/device/pda/roboticist
icon_state = "pda-robot"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Turbo Edition!"
/obj/item/device/pda/librarian
icon_state = "pda-libb"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
@@ -500,11 +508,15 @@
U << browse(null, "window=pda")
return
if("Message")
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
var/t
if(!href_list["pAI_mess"])
t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
else
t = href_list["pAI_mess"]
if (!t)
return
if (!in_range(src, U) && loc != U)
if (!in_range(src, U) && loc != U && !href_list["pAI_mess"])
return
var/obj/item/device/pda/P = locate(href_list["target"])
@@ -697,7 +709,7 @@
honkamt--
playsound(loc, 'bikehorn.ogg', 30, 1)
if(U.machine == src)//Final safety.
if(U.machine == src && !href_list["pAI_mess"])//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.machine = null
+15 -1
View File
@@ -72,12 +72,18 @@ obj/structure/door_assembly
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/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"
door_assembly_atmo
name = "Atmospherics Airlock Assembly"
icon_state = "door_as_atmo1"
@@ -90,12 +96,18 @@ obj/structure/door_assembly
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/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"
door_assembly_med
name = "Medical Airlock Assembly"
icon_state = "door_as_med1"
@@ -243,6 +255,8 @@ obj/structure/door_assembly
del(src)
else
W.loc = src.loc
//del(W)
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
playsound(src.loc, 'Crowbar.ogg', 100, 1)
var/turf/T = get_turf(user)
@@ -266,7 +280,7 @@ obj/structure/door_assembly
if(do_after(user, 40))
if(G)
if(G.amount>=1)
user << "\blue You installed glass windows into the airlock assembly!"
user << "\blue You installed glass windows the airlock assembly!"
G.use(1)
src.glass = 1
src.name = "Near finished Window Airlock Assembly"
+10 -8
View File
@@ -411,15 +411,16 @@ steam.start() -- spawns the effect
var/obj/R = new /obj()
R.reagents = new/datum/reagents(500)
R.reagents.my_atom = R
reagents.trans_to(R, reagents.total_volume/divisor)
for(var/atom/A in view(1, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
if(reagents)
reagents.trans_to(R, reagents.total_volume/divisor)
for(var/atom/A in view(1, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
R.reagents.reaction(A)
del(R)
else if(R && R.reagents)
R.reagents.reaction(A)
del(R)
else
R.reagents.reaction(A)
del(R)
return
/obj/effect/effect/chem_smoke/HasEntered(mob/living/carbon/M as mob )
@@ -1033,7 +1034,8 @@ steam.start() -- spawns the effect
user << "\blue You hit the metal foam to no effect."
CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group) return 0
if(!istype(mover))
return 0
return !density
+32 -3
View File
@@ -63,7 +63,10 @@
O.place = "handcuff"
M.requests += O
spawn( 0 )
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'cablecuff.ogg', 30, 1, -2)
else
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
O.process()
return
else
@@ -77,7 +80,10 @@
O.place = "handcuff"
M.requests += O
spawn( 0 )
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'cablecuff.ogg', 30, 1, -2)
else
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
O.process()
return
return
@@ -117,6 +123,7 @@
if (!safety)
if (src.reagents.total_volume < 1)
usr << "\red the [src] is empty."
return
if (world.time < src.last_use + 20)
@@ -128,6 +135,28 @@
var/direction = get_dir(src,target)
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
@@ -372,7 +401,7 @@
if(M:brain_op_stage == 4.0)
for(var/mob/O in viewers(M, null))
if(O == (user || M))
if(O == user || O == M)
continue
if(M == user)
O.show_message(text("\red [user] inserts [src] into his head!"), 1)
+25 -3
View File
@@ -38,7 +38,7 @@
/obj/item/weapon/camera_test
name = "camera"
icon = 'items.dmi'
desc = "A one use - polaroid camera. 10 photos left."
desc = "A polaroid camera. It has 30 photos left."
icon_state = "camera"
item_state = "electropack"
w_class = 2.0
@@ -47,6 +47,7 @@
throwforce = 5
throw_speed = 4
throw_range = 10
var/pictures_max = 30
var/pictures_left = 30
var/can_use = 1
@@ -60,6 +61,13 @@
var/icon/img //Big photo image
var/scribble //Scribble on the back.
/obj/item/weapon/camera_film
name = "film cartridge"
icon = 'items.dmi'
desc = "A camera film cartridge. Insert it into a camera to reload it."
icon_state = "film"
item_state = "electropack"
w_class = 1.0
/obj/item/weapon/photo/attack_self(var/mob/user as mob)
..()
@@ -145,9 +153,11 @@
if (can_use)
can_use = 0
icon_state = "camera_off"
usr << "\red You turn the camera off."
else
can_use = 1
icon_state = "camera"
usr << "\blue You turn the camera on."
/obj/item/weapon/camera_test/proc/get_mobs(turf/the_turf as turf)
var/mob_detail
@@ -206,7 +216,7 @@
playsound(src.loc, pick('polaroid1.ogg','polaroid2.ogg'), 75, 1, -3)
pictures_left--
src.desc = "A one use - polaroid camera. [pictures_left] photos left."
src.desc = "A polaroid camera. It has [pictures_left] photos left."
user << "\blue [pictures_left] photos left."
can_use = 0
icon_state = "camera_off"
@@ -214,4 +224,16 @@
can_use = 1
icon_state = "camera"
/obj/item/weapon/camera_test/attackby(A as obj, mob/user as mob)
if (istype(A, /obj/item/weapon/camera_film))
if (src.pictures_left >= pictures_max)
user << "\blue It's already full!"
return 1
else
del(A)
src.pictures_left = src.pictures_max
src.desc = "A polaroid camera. It has [pictures_left] photos left."
user << text("\blue You reload the camera film!",)
user.update_clothing()
return 1
return
@@ -107,6 +107,12 @@ FINGERPRINT CARD
else
..()
/obj/item/weapon/card/id/proc/checkaccess(p,var/mob/user)
if(p == pin)
user << "\green Access granted"
return 1
user << "\red Access denied"
return 0
// FINGERPRINT HOLDER
@@ -97,6 +97,10 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
usr << "All the leaves have fallen off the nettle from violent whacking."
del(src)
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
potency = newValue
force = round((5+potency/5), 1)
// Deathnettle
@@ -137,6 +141,10 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
usr << "All the leaves have fallen off the deathnettle from violent whacking."
del(src)
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
potency = newValue
force = round((5+potency/2.5), 1)
//Crafting
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
+2 -2
View File
@@ -164,10 +164,10 @@ KNIFE
playsound(M, 'trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
var/mob/living/carbon/human/H = M // Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head") //hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
@@ -1,4 +1,6 @@
/obj/item/robot_parts/l_arm/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
var/limbloc = null
if(!istype(M))
return ..()
@@ -8,230 +10,59 @@
if(!istype(M, /mob/living/carbon/human))
return ..()
if(user.zone_sel.selecting == "l_arm")
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
if(!S.attachable)
user << "\red The wound is not ready for a replacement!"
return 0
if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm)))
limbloc = "l_hand"
else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm)))
limbloc = "r_hand"
else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg)))
limbloc = "r_foot"
else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg)))
limbloc = "l_foot"
else
user << "\red That doesn't fit there!"
return ..()
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
if(!S.attachable)
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.", \
"\red [user] begins to attach \the [src] where your [S.display_name] used to be.")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach \the [src] where your [S.display_name] used to be.")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach a robotic limb where [H]'s [S.display_name] used to be with [src].", \
"\red [user] begins to attach a robotic limb where [S.display_name] used to be with [src].")
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach a robotic limb where your [S.display_name] used to be with [src].")
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.broken = 0
S.attachable = 0
S.destroyed = 0
S.robot = 1
var/datum/organ/external/T = H.organs[limbloc]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
del(src)
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
S.broken = 0
S.attachable = 0
S.destroyed = 0
S.robot = 1
var/datum/organ/external/T = H.organs["l_hand"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
return 1
else
user << "\red That doesn't fit there!."
return ..()
/obj/item/robot_parts/r_arm/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
return ..()
if(user.zone_sel.selecting == "r_arm")
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
if(!S.attachable)
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach a robotic limb where [H]'s [S.display_name] used to be with [src].", \
"\red [user] begins to attach a robotic limb where [S.display_name] used to be with [src].")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach a robotic limb where your [S.display_name] used to be with [src].")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.broken = 0
S.attachable = 0
S.destroyed = 0
S.robot = 1
var/datum/organ/external/T = H.organs["r_hand"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
return 1
else
user << "\red That doesn't fit there!."
return ..()
/obj/item/robot_parts/l_leg/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
return ..()
if(user.zone_sel.selecting == "l_leg")
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
if(!S.attachable)
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach a robotic limb where [H]'s [S.display_name] used to be with [src].", \
"\red [user] begins to attach a robotic limb where [S.display_name] used to be with [src].")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach a robotic limb where your [S.display_name] used to be with [src].")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.broken = 0
S.attachable = 0
S.destroyed = 0
S.robot = 1
var/datum/organ/external/T = H.organs["l_foot"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
return 1
else
user << "\red That doesn't fit there!."
return ..()
/obj/item/robot_parts/r_leg/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
return ..()
if(user.zone_sel.selecting == "r_leg")
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.destroyed)
if(!S.attachable)
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach a robotic limb where [H]'s [S.display_name] used to be with [src].", \
"\red [user] begins to attach a robotic limb where [S.display_name] used to be with [src].")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach a robotic limb where your [S.display_name] used to be with [src].")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.broken = 0
S.attachable = 0
S.destroyed = 0
S.robot = 1
var/datum/organ/external/T = H.organs["r_foot"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
return 1
else
user << "\red That doesn't fit there!."
return ..()
return 1
@@ -16,6 +16,14 @@ RACK PARTS
new /obj/item/stack/sheet/metal( src.loc )
//SN src = null
del(src)
if (istype(W, /obj/item/stack/rods))
if (W:amount >= 4)
new /obj/item/weapon/table_parts/reinforced( user.loc )
user << "\blue You reinforce the [name]."
W:use(4)
del(src)
else if (W:amount < 4)
user << "\red You need at least four rods to do this."
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
var/obj/structure/table/T = new /obj/structure/table( user.loc )
@@ -29,8 +37,6 @@ RACK PARTS
new /obj/item/stack/sheet/wood( src.loc )
//SN src = null
del(src)
else
..()
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
@@ -40,9 +46,9 @@ RACK PARTS
// REINFORCED TABLE PARTS
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( src.loc )
new /obj/item/stack/sheet/metal( src.loc )
new /obj/item/stack/rods( src.loc )
//SN src = null
del(src)
+12 -1
View File
@@ -323,4 +323,15 @@ WELDINGTOOOL
New()
if(prob(50))
icon_state = "cutters-y"
icon_state = "cutters-y"
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
M.visible_message("You cut \the [M]'s restraints with \the [src]!",\
"\The [usr] cuts \the [M]'s restraints with \the [src]!",\
"You hear cable being cut.")
M.handcuffed = null
M.update_clothing()
return
else
..()
+16 -1
View File
@@ -6,7 +6,6 @@
var/code = "electronic"
origin_tech = "bluespace=1"
/obj/item/device/radio/beacon/hear_talk()
return
@@ -32,3 +31,19 @@
proc/digest_delay()
spawn(600)
del(src)
// SINGULO BEACON SPAWNER
/obj/item/device/radio/beacon/syndicate
name = "suspicious beacon"
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
origin_tech = "bluespace=1;syndicate=7"
/obj/item/device/radio/beacon/syndicate/attack_self(mob/user as mob)
if(user)
user << "\blue Locked In"
new /obj/machinery/singularity_beacon/syndicate( user.loc )
playsound(src, 'pop.ogg', 100, 1, 1)
del(src)
return
-1
View File
@@ -103,7 +103,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/reinforced, 2), \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, one_per_turf = 1), \
)
+27
View File
@@ -118,6 +118,8 @@
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull
if(src.dir == NORTH)
src.layer = FLY_LAYER
..()
@@ -151,6 +153,18 @@
icon_state = "down"
anchored = 0
/obj/item/roller
name = "roller bed"
desc = "A collapsed roller bed that can be carried around."
icon = 'rollerbed.dmi'
icon_state = "folded"
w_class = 4.0 // Can't be put in backpacks. Oh well.
attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
del(src)
//obj/structure/stool/bed/roller/Move()
/obj/structure/stool/bed/Move()
..()
@@ -181,7 +195,20 @@
buckled_mob.pixel_y = 0
buckled_mob.anchored = 0
buckled_mob.buckled = null
buckled_mob = null
density = 0
icon_state = "down"
..()
return
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
if(buckled_mob) return 0
visible_message("[usr] collapses \the [src.name]")
new/obj/item/roller(get_turf(src))
spawn(0)
del(src)
return
+1
View File
@@ -149,6 +149,7 @@
"/obj/item/weapon/melee/baton",
"/obj/item/weapon/melee/classic_baton",
"/obj/item/weapon/camera_test",
"/obj/item/weapon/camera_film",
"/obj/item/weapon/cigpacket",
"/obj/item/weapon/zippo",
"/obj/item/device/taperecorder",
+32 -12
View File
@@ -63,7 +63,7 @@
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
return
if(src.contents.len >= 2)
user << "You have nowhere to place that"
user << "\red There's nowhere to place that!"
return
user.u_equip(W)
W.loc = src
@@ -84,42 +84,62 @@
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
view_inv(user)
orient2hud(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
if (src == user.l_hand)
src.orient_objs(3, 5, 3, 3)
src.orient_objs(3, 4, 3, 3)
else if (src == user.r_hand)
src.orient_objs(1, 5, 1, 3)
src.orient_objs(1, 4, 1, 3)
else if (istype(user,/mob/living/carbon/human) && src == user:wear_suit)
src.orient_objs(1, 3, 3, 3)
src.orient_objs(1, 3, 2, 3)
else
src.orient_objs(4, 4, 4, 2)
src.orient_objs(4, 3, 4, 2)
return
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
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+1, my)
src.closer.screen_loc = "[mx+1],[my]"
return
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
for(var/obj/item/weapon/mousetrap/MT in src)
if(MT.armed)
for(var/mob/O in viewers(user, null))
if(O == user)
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
else
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
MT.loc = user.loc
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/*/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
+2 -18
View File
@@ -29,6 +29,7 @@
icon_opened = "trashcartopen"
icon_closed = "trashcart"
/*these aren't needed anymore
/obj/structure/closet/crate/hat
desc = "A crate filled with Valuable Collector's Hats!."
name = "Hat Crate"
@@ -39,15 +40,6 @@
icon_closed = "crate"
/obj/structure/closet/crate/contraband
name = "Contraband crate"
desc = "A random assortment of items manufactured by providers NOT listed under Nanotrasen's whitelist."
icon = 'storage.dmi'
icon_state = "crate"
density = 1
icon_opened = "crateopen"
icon_closed = "crate"
/obj/structure/closet/crate/poster
name = "Poster crate"
desc = "A random assortment of posters manufactured by providers NOT listed under Nanotrasen's whitelist."
icon = 'storage.dmi'
@@ -55,15 +47,7 @@
density = 1
icon_opened = "crateopen"
icon_closed = "crate"
/obj/structure/closet/crate/cigarettes
name = "DromedaryCo cigarettes crate"
desc = "A crate of cigarettes manufactured by the notorious DromedaryCo company."
icon = 'storage.dmi'
icon_state = "crate"
density = 1
icon_opened = "crateopen"
icon_closed = "crate"
*/
/obj/structure/closet/crate/medical
desc = "A medical crate."
+27 -2
View File
@@ -207,6 +207,19 @@
/obj/item/weapon/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == src && !H.get_active_hand())
H.put_in_hand(src)
H.l_store = null
return
if(H.r_store == src && !H.get_active_hand())
H.put_in_hand(src)
H.r_store = null
return
src.orient2hud(user)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
@@ -216,7 +229,6 @@
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
@@ -316,7 +328,7 @@
/obj/item/weapon/storage/box/syndicate/New()
..()
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "freedom" = 1)))
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1)))
if ("bloodyspai")
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
@@ -352,6 +364,19 @@
U.imp = new /obj/item/weapon/implant/uplink(U)
return
if ("hacker")
new /obj/item/weapon/aiModule/syndicate(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/device/encryptionkey/binary(src)
return
if ("lordsingulo")
new /obj/item/device/radio/beacon/syndicate(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
new /obj/item/weapon/card/emag(src)
return
/obj/item/weapon/storage/dice/New()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
+41 -1
View File
@@ -149,7 +149,47 @@ TABLE AND RACK OBJECT INTERATIONS
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
if(ishuman(G.affecting))
G.affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed on a table by [G.assailant.name] ([G.assailant.ckey])</font>")
G.assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Smashed [G.affecting.name] ([G.affecting.ckey]) on a table.</font>")
log_admin("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
message_admins("ATTACK: [G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.")
log_attack("<font color='red'>[G.assailant] ([G.assailant.ckey]) smashed [G.affecting] ([G.affecting.ckey]) on a table.</font>")
var/mob/living/carbon/human/H = G.affecting
var/datum/organ/external/affecting = H.get_organ("head")
if(prob(25))
add_blood(G.affecting)
affecting.take_damage(rand(10,15), 0)
H.Weaken(2)
if(prob(20)) // One chance in 20 to DENT THE TABLE
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src]!",\
"\red You smash \the [H]'s head on \the [src]!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
+256
View File
@@ -0,0 +1,256 @@
//todo: flushing, flushing heads, showers actually cleaning people
/obj/structure/toilet
name = "toilet"
desc = "The HT-451, a torque rotation-based, waste disposal unit for small matter. This one seems remarkably clean."
icon = 'watercloset.dmi'
icon_state = "toilet0"
density = 0
anchored = 1
var/open = 0
/obj/structure/toilet/New()
open = round(rand(0, 1))
update_icon()
/obj/structure/toilet/attack_hand()
open = !open
update_icon()
/obj/structure/toilet/update_icon()
icon_state = "toilet[open]"
/obj/structure/urinal
name = "urinal"
desc = "The HU-452, an experimental urinal."
icon = 'watercloset.dmi'
icon_state = "urinal"
density = 0
anchored = 1
/obj/structure/shower
name = "shower"
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
icon = 'watercloset.dmi'
icon_state = "shower"
density = 0
anchored = 1
var/on = 0
var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~
//add heat controls? when emagged, you can freeze to death in it?
/obj/effect/mist
name = "mist"
icon = 'watercloset.dmi'
icon_state = "mist"
layer = MOB_LAYER + 1
mouse_opacity = 0
/obj/structure/shower/attack_hand(mob/M as mob)
on = !on
update_icon()
if(on && M.loc == loc)
wash(M)
/obj/structure/shower/attackby(mob/M as mob)
attack_hand(M)
/obj/structure/shower/update_icon()
overlays = null
if(mymist)
del(mymist)
if(on)
overlays += image('watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
if(!ismist)
spawn(50)
if(src && on)
ismist = 1
mymist = new /obj/effect/mist(loc)
else
ismist = 1
mymist = new /obj/effect/mist(loc)
else if(ismist)
ismist = 1
mymist = new /obj/effect/mist(loc)
spawn(250)
if(src && !on)
del(mymist)
ismist = 0
/obj/structure/shower/HasEntered(atom/movable/O as obj|mob)
..()
wash(O)
//Yes, showers are super powerful as far as washing goes.
/obj/structure/shower/proc/wash(atom/movable/O as obj|mob)
..()
if(!on) return
O.clean_blood()
if(istype(O, /mob/living/carbon))
var/mob/living/carbon/monkey = O //it's not necessarily a monkey, but >accurate varnames
if(monkey.r_hand)
monkey.r_hand.clean_blood()
if(monkey.l_hand)
monkey.l_hand.clean_blood()
if(monkey.wear_mask)
monkey.wear_mask.clean_blood()
if(istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/washer = O
if(washer.head)
washer.head.clean_blood()
if(washer.w_uniform)
washer.w_uniform.clean_blood()
if(washer.wear_suit)
washer.wear_suit.clean_blood()
if(washer.shoes)
washer.shoes.clean_blood()
if(washer.gloves)
washer.gloves.clean_blood()
if(washer.head)
washer.head.clean_blood()
if(loc)
var/turf/tile = get_turf(loc)
loc.clean_blood()
for(var/obj/effect/rune/R in tile)
del(R)
for(var/obj/effect/decal/cleanable/R in tile)
del(R)
for(var/obj/effect/overlay/R in tile)
del(R)
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
icon = 'watercloset.dmi'
icon_state = "rubberducky"
item_state = "rubberducky"
/obj/structure/sink
name = "sink"
icon = 'watercloset.dmi'
icon_state = "sink"
desc = "A sink used for washing one's hands and face."
anchored = 1
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/M as mob)
if(isrobot(M) || isAI(M))
return
if(busy)
M << "\red Someone's already washing here."
return
var/turf/location = M.loc
if(!isturf(location)) return
usr << "\blue You start washing your hands."
busy = 1
sleep(40)
busy = 0
if(M.loc != location) return //Person has moved away from the sink
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/washer = C
if(washer.gloves) //if they have gloves
washer.gloves.clean_blood() //clean the gloves
else //and if they don't,
washer.clean_blood() //wash their hands (a mob being bloody means they are 'red handed')
else
C.clean_blood() //other things that can't wear gloves should just wash the mob.
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [M] washes their hands using \the [src]."))
/obj/structure/sink/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(busy)
user << "\red Someone's already washing here."
return
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
O:reagents.add_reagent("water", 70)
user.visible_message( \
"\blue [user] fills the [O] using \the [src].", \
"\blue You fill the [O] using \the [src].")
return
if (istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks))
O:reagents.add_reagent("water", 10)
user.visible_message( \
"\blue [user] fills the [O] using \the [src].", \
"\blue You fill the [O] using \the [src].")
return
else if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
if (B.charges > 0 && B.status == 1)
flick("baton_active", src)
user.Stun(10)
user.stuttering = 10
user.Weaken(10)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 20
else
B.charges--
user.visible_message( \
"[user] was stunned by his wet [O].", \
"\red You have wet \the [O], it shocks you!")
return
var/turf/location = user.loc
if(!isturf(location)) return
var/obj/item/I = O
if(!I || !istype(I,/obj/item)) return
usr << "\blue You start washing \the [I]."
busy = 1
sleep(40)
busy = 0
if(user.loc != location) return //User has moved
if(!I) return //Item's been destroyed while washing
if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands
O.clean_blood()
user.visible_message( \
"\blue [user] washes \a [I] using \the [src].", \
"\blue You wash \a [I] using \the [src].")
/obj/structure/sink/kitchen
name = "kitchen sink"
icon_state = "sink_alt"
/obj/structure/sink/puddle //splishy splashy ^_^
name = "puddle"
icon_state = "puddle"
/obj/structure/sink/puddle/attack_hand(mob/M as mob)
icon_state = "puddle-splash"
..()
icon_state = "puddle"
/obj/structure/sink/puddle/attackby(var/obj/item/O as obj, var/mob/user as mob)
icon_state = "puddle-splash"
..()
icon_state = "puddle"
+37 -42
View File
@@ -79,6 +79,7 @@
src.health = max(0, src.health - tforce)
if (src.health <= 7 && !reinf)
src.anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
if (src.health <= 0)
new /obj/item/weapon/shard( src.loc )
@@ -201,22 +202,12 @@
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." )
else if(reinf && state == 0)
anchored = !anchored
for(var/obj/structure/window/w in range(src,1))
if (w.anchored)
w.relativewindow()
src.relativewindow()
update_nearby_icons()
playsound(src.loc, 'Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")
else if(!reinf)
src.anchored = !( src.anchored )
for(var/obj/structure/window/w in range(src,1))
if (w.anchored)
w.relativewindow()
src.relativewindow()
update_nearby_icons()
playsound(src.loc, 'Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window.")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <=1)
@@ -232,12 +223,7 @@
playsound(src.loc, 'Glasshit.ogg', 75, 1)
if (src.health <= 7)
src.anchored = 0
for(var/obj/structure/window/w in range(src,1))
if (w.anchored)
w.relativewindow()
src.relativewindow()
update_nearby_icons()
step(src, get_dir(user, src))
if (src.health <= 0)
if (src.dir == SOUTHWEST)
@@ -328,10 +314,7 @@
icon_state = "window"
update_nearby_tiles(need_rebuild=1)
relativewindow()
for(var/obj/structure/window/w in range(src,1))
if (w.anchored)
w.relativewindow()
update_nearby_icons()
return
@@ -339,10 +322,11 @@
density = 0
update_nearby_tiles()
for(var/obj/structure/window/w in range(src,1))
w.relativewindow()
playsound(src, "shatter", 70, 1)
update_nearby_icons()
..()
/obj/structure/window/Move()
@@ -355,6 +339,7 @@
return
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
@@ -378,30 +363,40 @@
return 1
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
return (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST)
if(dir in list(5,6,9,10))
return 1
return 0
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
src.update_icon()
for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon()
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/proc/relativewindow()
/obj/structure/window/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
if (!is_fulltile())
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if (src.anchored)
for(var/obj/structure/window/W in orange(src,1))
if (W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if (abs(src.x-W.x)-abs(src.y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if (istype(src,/obj/structure/window/basic))
src.icon_state = "window[junction]"
else if (istype(src,/obj/structure/window/reinforced))
if (istype(src,/obj/structure/window/reinforced/tinted))
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if (!is_fulltile())
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if (src.anchored)
for(var/obj/structure/window/W in orange(src,1))
if (W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if (abs(src.x-W.x)-abs(src.y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if (opacity)
src.icon_state = "twindow[junction]"
else
src.icon_state = "rwindow[junction]"
return
if (reinf)
src.icon_state = "rwindow[junction]"
else
src.icon_state = "window[junction]"
return