mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge remote-tracking branch 'upstream/master' into sofa
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
var/tape_type = /obj/item/tape
|
||||
var/icon_base
|
||||
|
||||
var/list/image/hazard_overlays
|
||||
var/list/tape_roll_applications = list()
|
||||
|
||||
/obj/item/tape
|
||||
name = "tape"
|
||||
icon = 'icons/policetape.dmi'
|
||||
@@ -16,6 +19,24 @@
|
||||
density = 1
|
||||
var/icon_base
|
||||
|
||||
/obj/item/tape/New()
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/police
|
||||
name = "police tape"
|
||||
desc = "A roll of police tape used to block off crime scenes from the public."
|
||||
@@ -97,7 +118,10 @@
|
||||
usr << "\blue You finish placing the [src]." //Git Test
|
||||
|
||||
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
|
||||
if (proximity && istype(A, /obj/machinery/door/airlock))
|
||||
if (!proximity)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
var/turf/T = get_turf(A)
|
||||
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
||||
P.loc = locate(T.x,T.y,T.z)
|
||||
@@ -105,6 +129,23 @@
|
||||
P.layer = 3.2
|
||||
user << "\blue You finish placing the [src]."
|
||||
|
||||
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
|
||||
var/turf/F = A
|
||||
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
|
||||
var/icon/hazard_overlay = hazard_overlays["[direction]"]
|
||||
if(tape_roll_applications[F] == null)
|
||||
tape_roll_applications[F] = 0
|
||||
|
||||
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
|
||||
F.overlays -= hazard_overlay
|
||||
tape_roll_applications[F] &= ~direction
|
||||
else
|
||||
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
|
||||
F.overlays |= hazard_overlay
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/Bumped(M as mob)
|
||||
if(src.allowed(M))
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -25,6 +25,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
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), \
|
||||
new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
|
||||
), 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
var/nopick = 0
|
||||
New()
|
||||
ChangeSign(pick("magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thecavern", "cindikate", "theorchard", "lv426", "zocalo", "4theemprah", "ishimura", "tardis", "quarks", "tenforward", "thepranicngpony", "vault13", "solaris", "thehive", "cantina", "theouterspess", "milliways42", "thetimeofeve", "spaceasshole", "dwarffortress", "thebark", "thedrunkcarp", "theharmbaton", "thenest", "officerbeersky", "thesingulo"))
|
||||
return
|
||||
@@ -10,3 +11,18 @@
|
||||
//on = 0
|
||||
//brightness_on = 4 //uncomment these when the lighting fixes get in
|
||||
return
|
||||
|
||||
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
|
||||
if(nopick)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/card = I
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead bay", "The Cavern", "Cindi Kate", "The Orchard", "LV 426", "Zocalo", "4 The Emprah", "Ishimura", "Tardis", "Quarks", "Ten Forward", "The Pranicng Pony", "Vault 13", "Solaris", "The Hive", "Cantina", "The Outer Spess", "Milliways 42", "The Time Of Eve", "Space Asshole", "Dwarf Fortress", "The Bark", "The Drunk Carp", "The Harm Baton", "The Nest", "Officer Beersky", "The Singulo", "On")
|
||||
if(sign_type == null)
|
||||
return
|
||||
else
|
||||
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
|
||||
src.ChangeSign(sign_type)
|
||||
user << "You change the barsign."
|
||||
@@ -1,14 +1,17 @@
|
||||
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
|
||||
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
|
||||
|
||||
/obj/structure/curtain
|
||||
icon = 'icons/obj/curtain.dmi'
|
||||
name = "curtain"
|
||||
icon_state = "closed"
|
||||
layer = MOB_LAYER + 0.1
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
opacity = 1
|
||||
density = 0
|
||||
|
||||
/obj/structure/curtain/open
|
||||
icon_state = "open"
|
||||
layer = OBJ_LAYER
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
|
||||
@@ -27,10 +30,10 @@
|
||||
opacity = !opacity
|
||||
if(opacity)
|
||||
icon_state = "closed"
|
||||
layer = MOB_LAYER + 0.1
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
else
|
||||
icon_state = "open"
|
||||
layer = OBJ_LAYER
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
|
||||
/obj/structure/curtain/black
|
||||
name = "black curtain"
|
||||
@@ -45,3 +48,12 @@
|
||||
name = "shower curtain"
|
||||
color = "#ACD1E9"
|
||||
alpha = 200
|
||||
|
||||
/obj/structure/curtain/open/shower/engineering
|
||||
color = "#FFA500"
|
||||
|
||||
/obj/structure/curtain/open/shower/security
|
||||
color = "#AA0000"
|
||||
|
||||
#undef SHOWER_OPEN_LAYER
|
||||
#undef SHOWER_CLOSED_LAYER
|
||||
@@ -54,13 +54,20 @@
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) //Called after somebody buckled / unbuckled
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
|
||||
var/M = buckled_mob
|
||||
buckled_mob = null
|
||||
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
@@ -110,6 +117,7 @@
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -97,26 +97,53 @@
|
||||
/obj/structure/stool/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
armrest.layer = MOB_LAYER + 0.1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/afterbuckle()
|
||||
if(buckled_mob)
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/brown
|
||||
icon_state = "comfychair_brown"
|
||||
color = rgb(141,70,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
icon_state = "comfychair_beige"
|
||||
/obj/structure/stool/bed/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/teal
|
||||
icon_state = "comfychair_teal"
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/office
|
||||
anchored = 0
|
||||
movable = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
icon_state = "comfychair_black"
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
icon_state = "comfychair_lime"
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
|
||||
if (tank)
|
||||
tank.explode()
|
||||
if (istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/beakerbomb = src.loc.loc
|
||||
if(beakerbomb)
|
||||
beakerbomb.ignite()
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
|
||||
+137
-208
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/infra
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
@@ -10,173 +8,133 @@
|
||||
|
||||
bomb_name = "tripwire mine"
|
||||
|
||||
secured = 0
|
||||
|
||||
var/on = 0
|
||||
var/visible = 0
|
||||
var/obj/effect/beam/i_beam/first = null
|
||||
var/obj/effect/beam/i_beam/last = null
|
||||
|
||||
proc
|
||||
trigger_beam()
|
||||
|
||||
describe()
|
||||
return "The infrared trigger is [on?"on":"off"]."
|
||||
|
||||
activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
on = !on
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
on = 0
|
||||
if(first) del(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/device/assembly/infra/describe()
|
||||
return "The infrared trigger is [on?"on":"off"]."
|
||||
|
||||
/obj/item/device/assembly/infra/activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
on = !on
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
attached_overlays += "infrared_on"
|
||||
return 1
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
/obj/item/device/assembly/infra/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
on = 0
|
||||
if(first) qdel(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/device/assembly/infra/update_icon()
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
attached_overlays += "infrared_on"
|
||||
|
||||
process()//Old code
|
||||
if(!on)
|
||||
if(first)
|
||||
del(first)
|
||||
return
|
||||
if(first || !secured) return
|
||||
var/turf/T = null
|
||||
if(istype(loc,/turf))
|
||||
T = loc
|
||||
else if (holder)
|
||||
if (istype(holder.loc,/turf))
|
||||
T = holder.loc
|
||||
else if (holder.master && istype(holder.master.loc,/turf)) //for onetankbombs and other tertiary builds with assemblies
|
||||
T = holder.loc.loc
|
||||
else if(istype(loc,/obj/item/weapon/grenade) && istype(loc.loc,/turf))
|
||||
T = loc.loc
|
||||
if(T)
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(T)
|
||||
I.master = src
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
step(I, I.dir)
|
||||
if(I)
|
||||
I.density = 0
|
||||
first = I
|
||||
I.vis_spread(visible)
|
||||
spawn(0)
|
||||
if(I)
|
||||
//world << "infra: setting limit"
|
||||
I.limit = 8
|
||||
//world << "infra: processing beam \ref[I]"
|
||||
I.process()
|
||||
return
|
||||
return
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
|
||||
attack_hand()
|
||||
del(first)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Move()
|
||||
var/t = dir
|
||||
..()
|
||||
dir = t
|
||||
del(first)
|
||||
return
|
||||
|
||||
|
||||
holder_movement()
|
||||
if(!holder) return 0
|
||||
del(first)
|
||||
return 1
|
||||
|
||||
|
||||
trigger_beam()
|
||||
if((!secured)||(!on)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
visible_message("\icon[src] *beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return
|
||||
|
||||
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
if(holder)
|
||||
dat += "<BR>Beam direction: [dir2text(dir)] <A href='?src=\ref[src];rotate=-1'>Counter-clockwise</A> | <A href='?src=\ref[src];rotate=1'>Clockwise</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
/obj/item/device/assembly/infra/process()
|
||||
if(!on)
|
||||
if(first)
|
||||
qdel(first)
|
||||
return
|
||||
if(!secured)
|
||||
return
|
||||
if(first && last)
|
||||
last.process()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(T)
|
||||
I.master = src
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
first = I
|
||||
step(I, I.dir)
|
||||
if(first)
|
||||
I.density = 0
|
||||
I.vis_spread(visible)
|
||||
I.limit = 8
|
||||
I.process()
|
||||
|
||||
if(href_list["rotate"])
|
||||
switch(href_list["rotate"])
|
||||
if("-1")
|
||||
dir = turn(dir,90)
|
||||
update_icon()
|
||||
del(first)
|
||||
if("1")
|
||||
dir = turn(dir,-90)
|
||||
update_icon()
|
||||
del(first)
|
||||
/obj/item/device/assembly/infra/attack_hand()
|
||||
qdel(first)
|
||||
..()
|
||||
return
|
||||
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
/obj/item/device/assembly/infra/Move()
|
||||
var/t = dir
|
||||
..()
|
||||
dir = t
|
||||
qdel(first)
|
||||
return
|
||||
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
spawn(0)
|
||||
if(first)
|
||||
first.vis_spread(visible)
|
||||
/obj/item/device/assembly/infra/holder_movement()
|
||||
if(!holder) return 0
|
||||
// dir = holder.dir
|
||||
qdel(first)
|
||||
return 1
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
/obj/item/device/assembly/infra/proc/trigger_beam()
|
||||
if((!secured)||(!on)||(cooldown > 0))
|
||||
return 0
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return
|
||||
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
/obj/item/device/assembly/infra/interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/infra/Topic(href, href_list)
|
||||
..()
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
return
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
if(first)
|
||||
first.vis_spread(visible)
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/device/assembly/infra/verb/rotate()//This could likely be better
|
||||
set name = "Rotate Infrared Laser"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
|
||||
verb/rotate()//This could likely be better
|
||||
set name = "Rotate Infrared Laser"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
dir = turn(dir, 90)
|
||||
return
|
||||
dir = turn(dir, 90)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -187,41 +145,30 @@
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "ibeam"
|
||||
var/obj/effect/beam/i_beam/next = null
|
||||
var/obj/effect/beam/i_beam/previous = null
|
||||
var/obj/item/device/assembly/infra/master = null
|
||||
var/limit = null
|
||||
var/visible = 0.0
|
||||
var/left = null
|
||||
anchored = 1.0
|
||||
flags = 0
|
||||
|
||||
|
||||
/obj/effect/beam/i_beam/proc/hit()
|
||||
//world << "beam \ref[src]: hit"
|
||||
if(master)
|
||||
//world << "beam hit \ref[src]: calling master \ref[master].hit"
|
||||
master.trigger_beam()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/proc/vis_spread(v)
|
||||
//world << "i_beam \ref[src] : vis_spread"
|
||||
visible = v
|
||||
spawn(0)
|
||||
if(next)
|
||||
//world << "i_beam \ref[src] : is next [next.type] \ref[next], calling spread"
|
||||
next.vis_spread(v)
|
||||
return
|
||||
return
|
||||
if(next)
|
||||
next.vis_spread(v)
|
||||
|
||||
|
||||
/obj/effect/beam/i_beam/process()
|
||||
//world << "i_beam \ref[src] : process"
|
||||
|
||||
if((loc.density || !(master)))
|
||||
// world << "beam hit loc [loc] or no master [master], deleting"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
//world << "proccess: [src.left] left"
|
||||
|
||||
if(left > 0)
|
||||
left--
|
||||
if(left < 1)
|
||||
@@ -232,58 +179,40 @@
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
|
||||
//world << "now [src.left] left"
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
|
||||
I.master = master
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
//world << "created new beam \ref[I] at [I.x] [I.y] [I.z]"
|
||||
step(I, I.dir)
|
||||
|
||||
if(I)
|
||||
//world << "step worked, now at [I.x] [I.y] [I.z]"
|
||||
if(!(next))
|
||||
//world << "no next"
|
||||
if(!next && (limit > 0))
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
|
||||
I.master = master
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
I.previous = src
|
||||
next = I
|
||||
step(I, I.dir)
|
||||
if(next)
|
||||
I.density = 0
|
||||
//world << "spreading"
|
||||
I.vis_spread(visible)
|
||||
next = I
|
||||
spawn(0)
|
||||
//world << "limit = [limit] "
|
||||
if((I && limit > 0))
|
||||
I.limit = limit - 1
|
||||
//world << "calling next process"
|
||||
I.process()
|
||||
return
|
||||
else
|
||||
//world << "is a next: \ref[next], deleting beam \ref[I]"
|
||||
del(I)
|
||||
else
|
||||
//world << "step failed, deleting \ref[next]"
|
||||
del(next)
|
||||
spawn(10)
|
||||
process()
|
||||
return
|
||||
return
|
||||
I.limit = limit - 1
|
||||
master.last = I
|
||||
I.process()
|
||||
|
||||
/obj/effect/beam/i_beam/Bump()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Bumped()
|
||||
hit()
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
spawn(0)
|
||||
hit()
|
||||
return
|
||||
return
|
||||
hit()
|
||||
|
||||
/obj/effect/beam/i_beam/Destroy()
|
||||
del(next)
|
||||
..()
|
||||
return
|
||||
if(master.first == src)
|
||||
master.first = null
|
||||
if(next)
|
||||
qdel(next)
|
||||
next = null
|
||||
if(previous)
|
||||
previous.next = null
|
||||
master.last = previous
|
||||
..()
|
||||
@@ -53,6 +53,7 @@
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
affecting.take_damage(1, 0)
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
|
||||
@@ -324,10 +324,10 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
//Underwear
|
||||
if(underwear && species.flags & HAS_UNDERWEAR)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', underwear), ICON_OVERLAY)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
|
||||
if(undershirt && species.flags & HAS_UNDERWEAR)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', undershirt), ICON_OVERLAY)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "undershirt[undershirt]_s"), ICON_OVERLAY)
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
@@ -310,7 +310,11 @@
|
||||
pc.Blend(tiny_img,ICON_OVERLAY, 12, 19)
|
||||
|
||||
var/datum/picture/P = new()
|
||||
P.fields["name"] = "photo"
|
||||
if(istype(src,/obj/item/device/camera/digital))
|
||||
P.fields["name"] = input(user,"Name photo:","photo")
|
||||
P.name = P.fields["name"]//So the name is displayed on the print/delete list.
|
||||
else
|
||||
P.fields["name"] = "photo"
|
||||
P.fields["author"] = user
|
||||
P.fields["icon"] = ic
|
||||
P.fields["tiny"] = pc
|
||||
@@ -351,6 +355,82 @@
|
||||
|
||||
return p
|
||||
|
||||
/*****************
|
||||
* digital camera *
|
||||
******************/
|
||||
/obj/item/device/camera/digital
|
||||
name = "digital camera"
|
||||
desc = "A digital camera. A small screen shows there is space for 10 photos left."
|
||||
var/list/datum/picture/saved_pictures = list()
|
||||
pictures_left = 30
|
||||
var/max_storage = 10
|
||||
|
||||
/obj/item/device/camera/digital/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if(!on || !pictures_left || ismob(target.loc)) return
|
||||
captureimage(target, user, flag)
|
||||
|
||||
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
|
||||
|
||||
desc = "A digital camera. A small screen shows that there are currently [saved_pictures.len] pictures stored."
|
||||
icon_state = icon_off
|
||||
on = 0
|
||||
spawn(64)
|
||||
icon_state = icon_on
|
||||
on = 1
|
||||
|
||||
/obj/item/device/camera/digital/captureimage(atom/target, mob/user, flag)
|
||||
if(saved_pictures.len >= max_storage)
|
||||
user << "<span class='notice'>Maximum photo storage capacity reached.</span>"
|
||||
return
|
||||
user << "Picture saved."
|
||||
var/x_c = target.x - (size-1)/2
|
||||
var/y_c = target.y + (size-1)/2
|
||||
var/z_c = target.z
|
||||
var/list/turfs = list()
|
||||
var/mobs = ""
|
||||
for(var/i = 1; i <= size; i++)
|
||||
for(var/j = 1; j <= size; j++)
|
||||
var/turf/T = locate(x_c, y_c, z_c)
|
||||
if(can_capture_turf(T, user))
|
||||
turfs.Add(T)
|
||||
mobs += get_mobs(T)
|
||||
x_c++
|
||||
y_c--
|
||||
x_c = x_c - size
|
||||
|
||||
var/datum/picture/P = createpicture(target, user, turfs, mobs, flag)
|
||||
saved_pictures += P
|
||||
|
||||
/obj/item/device/camera/digital/verb/print_picture()
|
||||
set name = "Print picture"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(saved_pictures.len == 0)
|
||||
usr << "<span class='userdanger'>No images saved.</span>"
|
||||
return
|
||||
if(pictures_left == 0)
|
||||
usr << "<span class='userdanger'>There is no film left to print.</span>"
|
||||
return
|
||||
|
||||
var/datum/picture/P = null
|
||||
P = input("Select image to print:",P) as null|anything in saved_pictures
|
||||
if(P)
|
||||
printpicture(usr,P)
|
||||
pictures_left --
|
||||
|
||||
/obj/item/device/camera/digital/verb/delete_picture()
|
||||
set name = "Delete picture"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(saved_pictures.len == 0)
|
||||
usr << "<span class='userdanger'>No images saved</span>"
|
||||
return
|
||||
var/datum/picture/P = null
|
||||
P = input("Select image to delete:",P) as null|anything in saved_pictures
|
||||
if(P)
|
||||
saved_pictures -= P
|
||||
|
||||
/**************
|
||||
*video camera *
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// (Mixing)Glass.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
@@ -190,6 +190,7 @@
|
||||
item_state = "beaker"
|
||||
m_amt = 0
|
||||
g_amt = 500
|
||||
var/obj/item/device/assembly_holder/assembly = null
|
||||
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
@@ -228,6 +229,55 @@
|
||||
if (!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
|
||||
overlays += lid
|
||||
if(assembly)
|
||||
overlays += "assembly"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/verb/remove_assembly()
|
||||
set name = "Remove Assembly"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (assembly)
|
||||
usr << "<span class='notice'>You detach [assembly] from \the [src]</span>"
|
||||
usr.put_in_hands(assembly)
|
||||
assembly = null
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='notice'>There is no assembly to remove.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/ignite()
|
||||
if(reagents)
|
||||
reagents.chem_temp += 30
|
||||
reagents.handle_reactions()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W,/obj/item/device/assembly_holder))
|
||||
if (assembly)
|
||||
usr << "<span class='warning'>The [src] already has an assembly.</span>"
|
||||
return ..()
|
||||
assembly = W
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
overlays += "assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/HasProximity(atom/movable/AM)
|
||||
if(assembly)
|
||||
assembly.HasProximity(AM)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/Crossed(atom/movable/AM)
|
||||
if(assembly)
|
||||
assembly.Crossed(AM)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/on_found(mob/finder as mob) //for mousetraps
|
||||
if(assembly)
|
||||
assembly.on_found(finder)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/hear_talk(mob/living/M, msg)
|
||||
if(assembly)
|
||||
assembly.hear_talk(M, msg)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
|
||||
@@ -178,6 +178,14 @@
|
||||
build_path = /obj/item/device/assembly/prox_sensor
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/mousetrap
|
||||
name = "Mousetrap"
|
||||
id = "mousetrap"
|
||||
build_type = AUTOLATHE
|
||||
materials = list("$metal" = 800, "$glass" = 200)
|
||||
build_path = /obj/item/device/assembly/mousetrap
|
||||
category = list("initial", "Miscellaneous")
|
||||
|
||||
/datum/design/timer
|
||||
name = "Timer"
|
||||
id = "timer"
|
||||
|
||||
@@ -39,4 +39,14 @@
|
||||
build_type = PROTOLATHE | AUTOLATHE
|
||||
materials = list("$metal" = 30, "$glass" = 10)
|
||||
build_path = /obj/item/weapon/disk/tech_disk
|
||||
category = list("Miscellaneous")
|
||||
|
||||
/datum/design/digital_camera
|
||||
name = "Digital Camera"
|
||||
desc = "Produce an enhanced version of the standard issue camera."
|
||||
id = "digitalcamera"
|
||||
req_tech = list("programming" = 2, "materials" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 500, "$glass" = 300)
|
||||
build_path = /obj/item/device/camera/digital
|
||||
category = list("Miscellaneous")
|
||||
Reference in New Issue
Block a user