mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-19 11:02:31 +01:00
Merge remote-tracking branch 'upstream/dev' into 150722-TagPairs
Conflicts: code/game/gamemodes/changeling/modularchangling.dm
This commit is contained in:
@@ -236,20 +236,20 @@
|
||||
electronics = null
|
||||
|
||||
else if(istype(W, /obj/item/stack/material) && !glass)
|
||||
var/obj/item/stack/material/S = W
|
||||
var/obj/item/stack/S = W
|
||||
var/material_name = S.get_material_name()
|
||||
if (S)
|
||||
if (S.get_amount() >= 1)
|
||||
if(istype(S, /obj/item/stack/material/glass/reinforced))
|
||||
if(material_name == "rglass")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
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) && !glass)
|
||||
if (S.use(1))
|
||||
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/material) && S.default_type)
|
||||
var/M = S.default_type
|
||||
else if(material_name)
|
||||
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
|
||||
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
|
||||
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
|
||||
user << "You cannot make an airlock out of that material."
|
||||
return
|
||||
if(S.get_amount() >= 2)
|
||||
@@ -257,8 +257,8 @@
|
||||
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) && !glass)
|
||||
if (S.use(2))
|
||||
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
|
||||
glass = "[M]"
|
||||
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
|
||||
glass = material_name
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return -1 //pass through
|
||||
return PROJECTILE_CONTINUE //pass through
|
||||
|
||||
//Tasers and the like should not damage girders.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
@@ -108,11 +108,11 @@
|
||||
|
||||
else if(istype(W, /obj/item/stack/material))
|
||||
|
||||
var/obj/item/stack/material/S = W
|
||||
var/obj/item/stack/S = W
|
||||
if(S.get_amount() < 2)
|
||||
return ..()
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/material/M = S.get_material()
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
user << "There is not enough material here to reinforce the girder."
|
||||
return
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/material/M = S.get_material()
|
||||
if(!istype(M) || M.integrity < 50)
|
||||
user << "You cannot reinforce \the [src] with that; it is too soft."
|
||||
return
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
passthrough = 1
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
. = PROJECTILE_CONTINUE
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
|
||||
@@ -83,22 +83,23 @@
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
dat += "<a href='?src=\ref[src];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=\ref[src];mop=1'>[mymop.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=\ref[src];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=\ref[src];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=\ref[src];sign=1'>[signs] sign\s</a><br>"
|
||||
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/structure/janitorialcart/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
data["name"] = capitalize(name)
|
||||
data["bag"] = mybag ? capitalize(mybag.name) : null
|
||||
data["mop"] = mymop ? capitalize(mymop.name) : null
|
||||
data["spray"] = myspray ? capitalize(myspray.name) : null
|
||||
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
|
||||
data["signs"] = signs ? "[signs] sign\s" : null
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
@@ -106,36 +107,39 @@
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
if(href_list["garbage"])
|
||||
if(mybag)
|
||||
user.put_in_hands(mybag)
|
||||
user << "<span class='notice'>You take [mybag] from [src].</span>"
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
user << "<span class='notice'>You take [mymop] from [src].</span>"
|
||||
mymop = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
user << "<span class='notice'>You take [myspray] from [src].</span>"
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/weapon/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
|
||||
signs--
|
||||
else
|
||||
warning("[src] signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
if(href_list["take"])
|
||||
switch(href_list["take"])
|
||||
if("garbage")
|
||||
if(mybag)
|
||||
user.put_in_hands(mybag)
|
||||
user << "<span class='notice'>You take [mybag] from [src].</span>"
|
||||
mybag = null
|
||||
if("mop")
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
user << "<span class='notice'>You take [mymop] from [src].</span>"
|
||||
mymop = null
|
||||
if("spray")
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
user << "<span class='notice'>You take [myspray] from [src].</span>"
|
||||
myspray = null
|
||||
if("replacer")
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
|
||||
myreplacer = null
|
||||
if("sign")
|
||||
if(signs)
|
||||
var/obj/item/weapon/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
|
||||
signs--
|
||||
else
|
||||
warning("[src] signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror(TM)"
|
||||
AC.name = "SalonPro Nano-Mirror™"
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
|
||||
@@ -40,21 +40,21 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -67,7 +67,7 @@
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src
|
||||
A.forceMove(src)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
@@ -81,7 +81,7 @@
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "morguet"
|
||||
src.connected.set_dir(src.dir)
|
||||
else
|
||||
@@ -117,7 +117,7 @@
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "morguet"
|
||||
else
|
||||
qdel(src.connected)
|
||||
@@ -149,7 +149,7 @@
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src.connected
|
||||
A.forceMove(src.connected)
|
||||
//Foreach goto(26)
|
||||
src.connected.connected = null
|
||||
src.connected.update()
|
||||
@@ -166,7 +166,7 @@
|
||||
return
|
||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.loc = src.loc
|
||||
O.forceMove(src.loc)
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
@@ -210,21 +210,21 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -246,7 +246,7 @@
|
||||
if ((src.connected) && (src.locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src
|
||||
A.forceMove(src)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
@@ -260,7 +260,7 @@
|
||||
src.connected.connected = src
|
||||
src.icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "cremat"
|
||||
else
|
||||
//src.connected = null
|
||||
@@ -294,7 +294,7 @@
|
||||
src.connected.connected = src
|
||||
src.icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "cremat"
|
||||
else
|
||||
qdel(src.connected)
|
||||
@@ -366,11 +366,17 @@
|
||||
anchored = 1
|
||||
throwpass = 1
|
||||
|
||||
/obj/structure/c_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/c_tray/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src.connected
|
||||
A.forceMove(src.connected)
|
||||
//Foreach goto(26)
|
||||
src.connected.connected = null
|
||||
src.connected.update()
|
||||
@@ -387,7 +393,7 @@
|
||||
return
|
||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.loc = src.loc
|
||||
O.forceMove(src.loc)
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
@@ -406,7 +412,7 @@
|
||||
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.allowed(usr))
|
||||
if(src.allowed(user))
|
||||
for (var/obj/structure/crematorium/C in world)
|
||||
if (C.id == id)
|
||||
if (!C.cremating)
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
/obj/structure/simple_door/get_material()
|
||||
return material
|
||||
|
||||
/obj/structure/simple_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/get_material()
|
||||
return material
|
||||
|
||||
// Reuse the cache/code from stools, todo maybe unify.
|
||||
/obj/structure/bed/update_icon()
|
||||
// Prep icon.
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
// Ported from Haine and WrongEnd with much gratitude!
|
||||
/* ._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._. */
|
||||
/*-=-=-=-=-=-=-=-=-=-=-=-=-=WHAT-EVER=-=-=-=-=-=-=-=-=-=-=-=-=-*/
|
||||
/* '~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~' */
|
||||
|
||||
/obj/effect/wingrille_spawn
|
||||
name = "window grille spawner"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "wingrille"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
var/win_path = /obj/structure/window/basic
|
||||
var/activated
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_hand()
|
||||
attack_generic()
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_ghost()
|
||||
attack_generic()
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_generic()
|
||||
activate()
|
||||
|
||||
/obj/effect/wingrille_spawn/initialize()
|
||||
..()
|
||||
if(!win_path)
|
||||
return
|
||||
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
|
||||
activate()
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/activate()
|
||||
if(activated) return
|
||||
if (!locate(/obj/structure/grille) in get_turf(src))
|
||||
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
|
||||
handle_grille_spawn(G)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in cardinal)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
|
||||
if(!other)
|
||||
var/found_connection
|
||||
if(locate(/obj/structure/grille) in T)
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.type == win_path && W.dir == get_dir(T,src))
|
||||
found_connection = 1
|
||||
qdel(W)
|
||||
if(!found_connection)
|
||||
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
|
||||
new_win.set_dir(dir)
|
||||
handle_window_spawn(new_win)
|
||||
else
|
||||
neighbours |= other
|
||||
activated = 1
|
||||
for(var/obj/effect/wingrille_spawn/other in neighbours)
|
||||
if(!other.activated) other.activate()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
|
||||
return
|
||||
|
||||
// Currently unused, could be useful for pre-wired electrified windows.
|
||||
/obj/effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
|
||||
return
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced
|
||||
name = "reinforced window grille spawner"
|
||||
icon_state = "r-wingrille"
|
||||
win_path = /obj/structure/window/reinforced
|
||||
|
||||
/obj/effect/wingrille_spawn/phoron
|
||||
name = "phoron window grille spawner"
|
||||
icon_state = "p-wingrille"
|
||||
win_path = /obj/structure/window/phoronbasic
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced_phoron
|
||||
name = "reinforced phoron window grille spawner"
|
||||
icon_state = "pr-wingrille"
|
||||
win_path = /obj/structure/window/phoronreinforced
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced/polarized
|
||||
name = "polarized window grille spawner"
|
||||
color = "#444444"
|
||||
win_path = /obj/structure/window/reinforced/polarized
|
||||
var/id
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
|
||||
if(id)
|
||||
P.id = id
|
||||
Reference in New Issue
Block a user