Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master' into DWI

This commit is contained in:
Aurorablade
2016-12-24 00:18:40 -05:00
192 changed files with 2244 additions and 1740 deletions
+2 -3
View File
@@ -61,8 +61,8 @@
M.adjust_fire_stacks(1)
M.IgniteMob()
/atom/movable/proc/unbuckle_mob()
if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr))
/atom/movable/proc/unbuckle_mob(force = FALSE)
if(buckled_mob && buckled_mob.buckled == src && (buckled_mob.can_unbuckle(usr) || force))
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
@@ -72,7 +72,6 @@
post_buckle_mob(.)
//Handle any extras after buckling/unbuckling
//Called on buckle_mob() and unbuckle_mob()
/atom/movable/proc/post_buckle_mob(mob/living/M)
+2 -1
View File
@@ -79,7 +79,8 @@
/obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
if(Proj.damage_type == BRUTE || Proj.damage_type == BURN)
health -= Proj.damage
..()
healthcheck()
+14
View File
@@ -97,3 +97,17 @@
icon = 'icons/effects/effects.dmi'
icon_state = "admin"
layer = 4.1
/obj/effect/overlay/wall_rot
name = "Wallrot"
desc = "Ick..."
icon = 'icons/effects/wallrot.dmi'
anchored = 1
density = 1
layer = 5
mouse_opacity = 0
/obj/effect/overlay/wall_rot/New()
..()
pixel_x += rand(-10, 10)
pixel_y += rand(-10, 10)
+9 -6
View File
@@ -41,6 +41,14 @@
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/device/aicard/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
var/mob/living/silicon/ai/AI = locate() in src
@@ -59,12 +67,7 @@
data["laws"] = laws
data["has_laws"] = laws.len
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/aicard/Topic(href, href_list, nowindow, state)
@@ -56,7 +56,7 @@
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
return null
@@ -64,7 +64,7 @@
if(T.z != current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.reset_view(null)
user.reset_perspective(null)
user.unset_machine()
return null
@@ -184,7 +184,7 @@
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -195,7 +195,7 @@
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_view(null)
usr.reset_perspective(null)
interact()
if("track" in href_list)
var/atom/A = locate(href_list["track"])
@@ -214,7 +214,7 @@
interact()
return
if("close" in href_list)
usr.reset_view(null)
usr.reset_perspective(null)
usr.unset_machine()
current = null
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
@@ -231,16 +231,16 @@
current = C
spawn(6)
if(src.check_eye(usr))
usr.reset_view(C)
usr.reset_perspective(C)
interact()
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
usr.unset_machine()
usr.reset_view(null)
usr.reset_perspective(null)
interact()
@@ -83,7 +83,7 @@
A.loc = active_dummy.loc
if(ismob(A))
var/mob/M = A
M.reset_view(null)
M.reset_perspective(null)
/obj/effect/dummy/chameleon
name = ""
@@ -33,6 +33,9 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/guitar/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/item/device/guitar/Topic(href, href_list)
song.Topic(href, href_list)
@@ -99,15 +99,17 @@
/obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/electropack/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["power"] = on
data["freq"] = format_frequency(frequency)
data["code"] = code
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
+16 -12
View File
@@ -108,6 +108,13 @@ var/global/list/default_medbay_channels = list(
return ui_interact(user)
/obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -126,12 +133,7 @@ var/global/list/default_medbay_channels = list(
if(syndie)
data["useSyndMode"] = 1
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/radio/proc/list_channels(var/mob/user)
@@ -749,6 +751,13 @@ var/global/list/default_medbay_channels = list(
. = ..()
/obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
ui.open()
ui.set_auto_update(1)
/obj/item/device/radio/borg/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["mic_status"] = broadcasting
@@ -769,12 +778,7 @@ var/global/list/default_medbay_channels = list(
data["has_subspace"] = 1
data["subspace"] = subspace_transmission
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/device/radio/proc/config(op)
if(radio_controller)
@@ -90,26 +90,26 @@
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
// this is the data which will be sent to the ui
/obj/item/device/transfer_valve/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["attachmentOne"] = tank_one ? tank_one.name : null
data["attachmentTwo"] = tank_two ? tank_two.name : null
data["valveAttachment"] = attached_device ? attached_device.name : null
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
return data
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
@@ -219,4 +219,4 @@
// this doesn't do anything but the timer etc. expects it to be here
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
/obj/item/device/transfer_valve/proc/c_state()
return
return
+12 -12
View File
@@ -187,8 +187,18 @@ var/list/world_uplinks = list()
/*
NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/title = "Remote Uplink"
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = state)
// open the new ui window
ui.open()
/obj/item/device/uplink/hidden/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
data["welcome"] = welcome
@@ -200,17 +210,7 @@ var/list/world_uplinks = list()
data["nano_items"] = nanoui_items
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
return data
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/hidden/interact(mob/user)
@@ -38,5 +38,8 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/violin/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/item/device/violin/Topic(href, href_list)
song.Topic(href, href_list)
+9 -7
View File
@@ -83,7 +83,14 @@ RCD
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rcd/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
data["mode"] = mode
data["door_type"] = door_type
data["menu"] = menu
@@ -100,12 +107,7 @@ RCD
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
if(..())
+1 -1
View File
@@ -58,4 +58,4 @@
if(l && !(l.status & ORGAN_DESTROYED))
l.status |= ORGAN_DESTROYED
if(r && !(r.status & ORGAN_DESTROYED))
r.status |= ORGAN_DESTROYED
r.status |= ORGAN_DESTROYED
@@ -55,9 +55,7 @@
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
M.reset_perspective(null)
qdel(src)
@@ -94,10 +94,7 @@
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
occupant.forceMove(loc)
if(injecting)
implant(src.occupant)
injecting = 0
@@ -113,11 +110,8 @@
if(src.occupant)
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
M.forceMove(src)
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
+17 -18
View File
@@ -80,11 +80,11 @@
/obj/item/weapon/tank/examine(mob/user)
if(!..(user, 0))
return
var/obj/icon = src
if(istype(loc, /obj/item/assembly))
icon = loc
if(!in_range(src, user))
if(icon == src)
to_chat(user, "<span class='notice'>It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.</span>")
@@ -141,14 +141,24 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/item/weapon/tank/ui_data(mob/user, datum/topic_state/state = default_state)
var/using_internal
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal==src)
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if(C.internal == src)
using_internal = 1
// this is the data which will be sent to the ui
var/data[0]
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
@@ -170,18 +180,7 @@
if(H.head && (H.head.flags & AIRTIGHT))
data["maskConnected"] = 1
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/item/weapon/tank/Topic(href, href_list)
if(..())
@@ -58,13 +58,11 @@
for(var/mob/M in src)
moveMob(M, loc)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
loc.Exited(M)
M.loc = destination
M.reset_perspective(destination)
if(isturf(loc))
loc.Entered(M, src, ignoreRest = 1)
else
@@ -122,10 +120,6 @@
if(M.buckled)
continue
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
moveMob(M, src)
itemcount++
@@ -428,3 +422,7 @@
..()
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
qdel(src)
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
@@ -18,10 +18,7 @@
if(L.buckled)
L.buckled = 0
L.anchored = 0
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
L.loc = src
L.forceMove(src)
L.disabilities += MUTE
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
@@ -76,12 +73,9 @@
O.loc = src.loc
for(var/mob/living/M in src)
M.loc = src.loc
M.forceMove(loc)
M.disabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/statue/open()
@@ -164,4 +158,4 @@ obj/structure/statue/angel
icon_state = "angelseen"
obj/structure/statue/corgi
icon_state = "corgi"
icon_state = "corgi"
+8
View File
@@ -154,6 +154,10 @@
src.attack_hand(CM)
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Morgue tray
*/
@@ -393,6 +397,10 @@
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
src.attack_hand(CM)
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
/*
* Crematorium tray
*/
+14 -9
View File
@@ -113,6 +113,16 @@
repeat = 0
/datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!instrumentObj)
return
ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, force_open)
if(!ui)
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
ui.open()
ui.set_auto_update(1)
/datum/song/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["lines"] = lines
@@ -125,15 +135,7 @@
data["minTempo"] = world.tick_lag
data["maxTempo"] = 600
if(!instrumentObj)
return
ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/datum/song/Topic(href, href_list)
if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || !usr.canmove || usr.restrained())
@@ -294,6 +296,9 @@
song.ui_interact(user, ui_key, ui, force_open)
/obj/structure/piano/ui_data(mob/user, datum/topic_state/state = default_state)
return song.ui_data(user, state)
/obj/structure/piano/Topic(href, href_list)
song.Topic(href, href_list)
@@ -147,7 +147,7 @@
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -161,7 +161,7 @@
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_view(null)
mob.reset_perspective(null)
else
station.open_animation()