mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Merge remote-tracking branch 'polaris/master' into pixel_projectiles
This commit is contained in:
@@ -515,7 +515,7 @@
|
||||
var/atom/L = loc
|
||||
if(!L)
|
||||
return null
|
||||
return L.AllowDrop() ? L : get_turf(L)
|
||||
return L.AllowDrop() ? L : L.drop_location()
|
||||
|
||||
/atom/proc/AllowDrop()
|
||||
return FALSE
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
I.loc = src
|
||||
src.disk = I
|
||||
user << "You insert [I]."
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -428,7 +428,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
@@ -465,7 +465,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1 //lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
irradiating = 2
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*2) // sleep for 2 seconds
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
/turf/unsimulated/wall/supermatter/New()
|
||||
..()
|
||||
processing_turfs.Add(src)
|
||||
START_PROCESSING(SSturfs, src)
|
||||
next_check = world.time+5 SECONDS
|
||||
|
||||
/turf/unsimulated/wall/supermatter/Destroy()
|
||||
processing_turfs.Remove(src)
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
..()
|
||||
|
||||
/turf/unsimulated/wall/supermatter/process()
|
||||
@@ -57,7 +57,7 @@
|
||||
T.ChangeTurf(type)
|
||||
|
||||
if((spawned & (NORTH|SOUTH|EAST|WEST)) == (NORTH|SOUTH|EAST|WEST))
|
||||
processing_turfs -= src
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
return
|
||||
|
||||
/turf/unsimulated/wall/supermatter/attack_generic(mob/user as mob)
|
||||
|
||||
@@ -176,12 +176,12 @@ var/global/list/additional_antag_types = list()
|
||||
|
||||
/datum/game_mode/proc/refresh_event_modifiers()
|
||||
if(event_delay_mod_moderate || event_delay_mod_major)
|
||||
event_manager.report_at_round_end = 1
|
||||
SSevents.report_at_round_end = TRUE
|
||||
if(event_delay_mod_moderate)
|
||||
var/datum/event_container/EModerate = event_manager.event_containers[EVENT_LEVEL_MODERATE]
|
||||
var/datum/event_container/EModerate = SSevents.event_containers[EVENT_LEVEL_MODERATE]
|
||||
EModerate.delay_modifier = event_delay_mod_moderate
|
||||
if(event_delay_mod_moderate)
|
||||
var/datum/event_container/EMajor = event_manager.event_containers[EVENT_LEVEL_MAJOR]
|
||||
var/datum/event_container/EMajor = SSevents.event_containers[EVENT_LEVEL_MAJOR]
|
||||
EMajor.delay_modifier = event_delay_mod_major
|
||||
|
||||
/datum/game_mode/proc/pre_setup()
|
||||
|
||||
@@ -437,7 +437,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
|
||||
//Ask the event manager to print round end information
|
||||
event_manager.RoundEnd()
|
||||
SSevents.RoundEnd()
|
||||
|
||||
//Print a list of antagonists to the server log
|
||||
var/list/total_antagonists = list()
|
||||
|
||||
@@ -331,7 +331,8 @@ var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) -
|
||||
|
||||
|
||||
if(href_list["refund_functions"])
|
||||
if(H.z != 2)
|
||||
var/turf/T = get_turf(H)
|
||||
if(T.z in using_map.player_levels)
|
||||
H << "<span class='danger'>You can only refund at your base, it's too late now!</span>"
|
||||
return
|
||||
var/obj/item/weapon/technomancer_core/core = null
|
||||
@@ -347,7 +348,8 @@ var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) -
|
||||
attack_self(H)
|
||||
|
||||
/obj/item/weapon/technomancer_catalog/attackby(var/atom/movable/AM, var/mob/user)
|
||||
if(user.z != 2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.z in using_map.player_levels)
|
||||
to_chat(user, "<span class='danger'>You can only refund at your base, it's too late now!</span>")
|
||||
return
|
||||
for(var/datum/technomancer/equipment/E in equipment_instances + assistance_instances)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
break
|
||||
data["stasis"] = stasis_level_name
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
data["occupant"] = occupantData
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
if(!(locked && !remote_connection) || remote_access || issilicon(user))
|
||||
populate_controls(data)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state)
|
||||
ui.set_initial_data(data)
|
||||
@@ -964,7 +964,7 @@ FIRE ALARM
|
||||
else if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
last_process = world.timeofday
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
|
||||
@@ -117,7 +117,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
|
||||
data["sensors"] = sensors_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 525, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -174,7 +174,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 660, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -416,7 +416,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
else
|
||||
data["device_info"] = null
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -261,7 +261,7 @@ update_flag
|
||||
|
||||
..()
|
||||
|
||||
GLOB.nanomanager.update_uis(src) // Update all NanoUIs attached to src
|
||||
SSnanoui.update_uis(src) // Update all NanoUIs attached to src
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -289,7 +289,7 @@ update_flag
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
data["table"] = table
|
||||
data["victim"] = victim_ui
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "operating.tmpl", src.name, 380, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -69,4 +69,4 @@
|
||||
usr.set_machine(src)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -139,7 +139,7 @@
|
||||
data["enemyHP"] = enemy_hp
|
||||
data["gameOver"] = gameover
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "arcade_battle.tmpl", src.name, 400, 300)
|
||||
ui.set_initial_data(data)
|
||||
@@ -201,7 +201,7 @@
|
||||
emagged = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/proc/arcade_action()
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/list/minor_air_alarms = list()
|
||||
data["priority_alarms"] = major_alarms
|
||||
data["minor_alarms"] = minor_alarms
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
switch_to_camera(user, current_camera)
|
||||
data["map_levels"] = using_map.get_map_levels(src.z)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/obj/machinery/computer/security/process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
cache_id = camera_repository.camera_cache_id
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
id_card.forceMove(src)
|
||||
modify = id_card
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
data["regions"] = regions
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700)
|
||||
ui.set_initial_data(data)
|
||||
@@ -235,7 +235,7 @@
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("account")
|
||||
if (is_authenticated())
|
||||
@@ -243,7 +243,7 @@
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
modify.associated_account_number = account_num
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
@@ -253,7 +253,7 @@
|
||||
printing = 1
|
||||
spawn(50)
|
||||
printing = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if (mode)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
data["diskette"] = diskette
|
||||
data["temp"] = temp
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@
|
||||
temp = ""
|
||||
scantemp = ""
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
|
||||
@@ -500,8 +500,8 @@
|
||||
|
||||
//delay events in case of an autotransfer
|
||||
if (isnull(user))
|
||||
event_manager.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
|
||||
event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000)
|
||||
SSevents.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
|
||||
SSevents.delay_events(EVENT_LEVEL_MAJOR, 9000)
|
||||
|
||||
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
|
||||
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if(!giver && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
giver = I
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else if(giver)
|
||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||
return
|
||||
@@ -150,7 +150,7 @@
|
||||
data["log"] = internal_log
|
||||
data["uid"] = uid
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520)
|
||||
ui.set_initial_data(data)
|
||||
@@ -242,4 +242,4 @@
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
@@ -19,7 +19,7 @@
|
||||
data["is_ai"] = issilicon(user)
|
||||
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
data["contraband"] = can_order_contraband || (authorization & SUP_CONTRABAND)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -48,7 +48,7 @@
|
||||
L.loc = src
|
||||
vendmode = 2
|
||||
to_chat(user, "<span class='notice'>You slot your [L.name] into \The [src.name]</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
data["power"] = power
|
||||
data["total"] = total()
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425)
|
||||
ui.set_initial_data(data)
|
||||
@@ -136,7 +136,7 @@
|
||||
vendmode = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/lapvend/proc/vend()
|
||||
if(cardreader > 0)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
@@ -205,7 +205,7 @@
|
||||
var/mob/M = grab.affecting
|
||||
qdel(grab)
|
||||
put_mob(M)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(var/mob/target, var/mob/user) //Allows borgs to put people into cryo without external assistance
|
||||
|
||||
@@ -695,7 +695,7 @@ About the new airlock wires panel:
|
||||
|
||||
data["commands"] = commands
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls", 450, 350, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"secure" = program.memory["secure"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -89,7 +89,7 @@
|
||||
"processing" = program.memory["processing"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -153,7 +153,7 @@
|
||||
"processing" = program.memory["processing"]
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"override_enabled" = docking_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"airlocks" = airlocks,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290)
|
||||
@@ -73,7 +73,7 @@
|
||||
"override_enabled" = airlock_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"door_lock" = docking_program.memory["door_status"]["lock"],
|
||||
)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
@@ -167,7 +167,7 @@
|
||||
log_game(msg)
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
// Proc: get_exonet_node()
|
||||
|
||||
@@ -184,7 +184,7 @@ datum/track/New(var/title_name, var/audio)
|
||||
data["tracks"] = nano_tracks
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -271,7 +271,7 @@ var/list/turret_icons
|
||||
settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all)
|
||||
data["settings"] = settings
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -127,7 +127,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
data["msgVerified"] = msgVerified
|
||||
data["announceAuth"] = announceAuth
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
data["settings"] = settings
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
var/has_logs = 0 //defaults to 0, set to anything else for vendor to have logs
|
||||
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
/obj/machinery/vending/Initialize()
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
spawn(4)
|
||||
if(product_slogans)
|
||||
@@ -86,10 +86,6 @@
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/**
|
||||
* Build produdct_records from the products lists
|
||||
*
|
||||
@@ -173,7 +169,7 @@
|
||||
vend(currently_vending, usr)
|
||||
return
|
||||
else if(handled)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return // don't smack that machine with your 2 thalers
|
||||
|
||||
if(I || istype(W, /obj/item/weapon/spacecash))
|
||||
@@ -187,7 +183,7 @@
|
||||
if(panel_open)
|
||||
overlays += image(icon, "[initial(icon_state)]-panel")
|
||||
|
||||
GLOB.nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
|
||||
if(panel_open)
|
||||
@@ -199,7 +195,7 @@
|
||||
coin = W
|
||||
categories |= CAT_COIN
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
@@ -403,7 +399,7 @@
|
||||
else
|
||||
data["panel"] = 0
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vending_machine.tmpl", name, 440, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -463,7 +459,7 @@
|
||||
shut_up = !shut_up
|
||||
|
||||
add_fingerprint(usr)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user)
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
@@ -474,7 +470,7 @@
|
||||
vend_ready = 0 //One thing at a time!!
|
||||
status_message = "Vending..."
|
||||
status_error = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if(R.category & CAT_COIN)
|
||||
if(!coin)
|
||||
@@ -516,7 +512,7 @@
|
||||
status_error = 0
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -572,7 +568,7 @@
|
||||
if(has_logs)
|
||||
do_logging(R, user)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -177,12 +177,11 @@
|
||||
var/spray_amount = 5 //units of liquid per particle. 5 is enough to wet the floor - it's a big fire extinguisher, so should be fine
|
||||
var/max_water = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/New()
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/Initialize()
|
||||
. = ..()
|
||||
reagents = new/datum/reagents(max_water)
|
||||
reagents.my_atom = src
|
||||
reagents.add_reagent("water", max_water)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3) return
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Exosuit Fabricator UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Prosthetics Fab UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
list("impedrezene" = 15) = 2,
|
||||
list("zombiepowder" = 10) = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/New()
|
||||
..()
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/Initialize()
|
||||
. = ..()
|
||||
if(is_open_container())
|
||||
flags ^= OPENCONTAINER
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(mode in no_auto_update)
|
||||
auto_update = 0
|
||||
@@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
@@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
@@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
P.new_message_from_pda(src, t)
|
||||
GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
else
|
||||
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
|
||||
|
||||
@@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(L)
|
||||
if(reception_message)
|
||||
L << reception_message
|
||||
GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
/obj/item/device/pda/proc/new_news(var/message)
|
||||
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
|
||||
@@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(can_use(usr))
|
||||
mode = 0
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
@@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
@@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
pai = C
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
else if(istype(C, /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/O = locate() in src
|
||||
if(O)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
// The value element is the actual data, and can take any form necessary for the template
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
@@ -261,7 +261,7 @@
|
||||
notehtml = note
|
||||
|
||||
if(href_list["switch_template"])
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
if(ui)
|
||||
ui.add_template("Body", href_list["switch_template"])
|
||||
|
||||
@@ -276,5 +276,5 @@
|
||||
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
|
||||
cartridge.Topic(href, href_list)
|
||||
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
cartridge.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You slot \the [cartridge] into \the [src].</span>")
|
||||
modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB)
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
// Proc: attack_self()
|
||||
|
||||
@@ -119,7 +119,7 @@ var/global/list/default_medbay_channels = list(
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
@@ -230,7 +230,7 @@ var/global/list/default_medbay_channels = list(
|
||||
return 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
@@ -714,7 +714,7 @@ var/global/list/default_medbay_channels = list(
|
||||
. = 1
|
||||
|
||||
if(.)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
if(!on)
|
||||
@@ -743,7 +743,7 @@ var/global/list/default_medbay_channels = list(
|
||||
data["has_subspace"] = 1
|
||||
data["subspace"] = subspace_transmission
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
|
||||
|
||||
update_icon()
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
@@ -58,7 +58,7 @@
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = user
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
data["valveOpen"] = valve_open ? 1 : 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
|
||||
next_offer_time = world.time + offer_time
|
||||
update_nano_data()
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -110,7 +110,7 @@
|
||||
data += nanoui_data
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui) // No auto-refresh
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
|
||||
data["menu"] = 0
|
||||
@@ -138,7 +138,7 @@
|
||||
UI.buy(src, usr)
|
||||
else if(href_list["lock"])
|
||||
toggle()
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
|
||||
@@ -91,8 +91,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/brand
|
||||
blood_sprite_state = null //Can't bloody these
|
||||
|
||||
/obj/item/clothing/mask/smokable/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/smokable/Initialize()
|
||||
. = ..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
if(smoketime && !max_smoketime)
|
||||
@@ -177,7 +177,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
T.visible_message(flavor_text)
|
||||
update_icon()
|
||||
set_light(2, 0.25, "#E38F46")
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -280,8 +280,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>"
|
||||
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>"
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/New()
|
||||
..()
|
||||
/obj/item/clothing/mask/smokable/cigarette/Initialize()
|
||||
. = ..()
|
||||
if(nicotine_amt)
|
||||
reagents.add_reagent("nicotine", nicotine_amt)
|
||||
|
||||
@@ -363,8 +363,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
slot_flags = SLOT_EARS
|
||||
throwforce = 1
|
||||
|
||||
/obj/item/weapon/cigbutt/New()
|
||||
..()
|
||||
/obj/item/weapon/cigbutt/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
transform = turn(transform,rand(0,360))
|
||||
@@ -541,7 +541,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
set_light(2)
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
icon_state = "[base_state]"
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/weapon/soap/New()
|
||||
..()
|
||||
/obj/item/weapon/soap/Initialize()
|
||||
. = ..()
|
||||
create_reagents(5)
|
||||
wet()
|
||||
|
||||
|
||||
/obj/item/weapon/soap/proc/wet()
|
||||
reagents.add_reagent("cleaner", 5)
|
||||
|
||||
|
||||
@@ -34,22 +34,20 @@
|
||||
spray_particles = 3
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
/obj/item/weapon/extinguisher/Initialize()
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
user << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
|
||||
return
|
||||
to_chat(user, text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume))
|
||||
|
||||
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
|
||||
safety = !safety
|
||||
src.icon_state = "[sprite_name][!safety]"
|
||||
src.desc = "The safety is [safety ? "on" : "off"]."
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
icon_state = "[sprite_name][!safety]"
|
||||
desc = "The safety is [safety ? "on" : "off"]."
|
||||
to_chat(user, "The safety is [safety ? "on" : "off"].")
|
||||
|
||||
/obj/item/weapon/extinguisher/proc/propel_object(var/obj/O, mob/user, movementdirection)
|
||||
if(O.anchored) return
|
||||
|
||||
@@ -16,177 +16,177 @@
|
||||
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
var/affected_area = 3
|
||||
|
||||
New()
|
||||
create_reagents(1000)
|
||||
/obj/item/weapon/grenade/chem_grenade/Initialize()
|
||||
. = ..()
|
||||
create_reagents(1000)
|
||||
|
||||
Destroy()
|
||||
QDEL_NULL(detonator)
|
||||
QDEL_LIST_NULL(beakers)
|
||||
return ..()
|
||||
/obj/item/weapon/grenade/chem_grenade/Destroy()
|
||||
QDEL_NULL(detonator)
|
||||
QDEL_LIST_NULL(beakers)
|
||||
return ..()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user as mob)
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
// detonator.loc=src.loc
|
||||
detonator.detached()
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
det_time = null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
for(var/obj/B in beakers)
|
||||
if(istype(B))
|
||||
beakers -= B
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
|
||||
detonator.detached()
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
det_time = null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
for(var/obj/B in beakers)
|
||||
if(istype(B))
|
||||
beakers -= B
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
|
||||
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
|
||||
var/obj/item/device/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
|
||||
return
|
||||
if(!det.secured)
|
||||
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
|
||||
return
|
||||
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
|
||||
var/obj/item/device/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
|
||||
return
|
||||
if(!det.secured)
|
||||
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
|
||||
return
|
||||
path = 1
|
||||
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(W.is_screwdriver() && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
if(istimer(detonator.a_left))
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
name = "grenade"
|
||||
else
|
||||
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
|
||||
name = "fake grenade"
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
|
||||
detonate()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
playsound(src.loc, W.usesound, 50, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
stage = 1
|
||||
active = 0
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
|
||||
return
|
||||
else
|
||||
if(W.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
|
||||
..(user)
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob)
|
||||
if(active) return
|
||||
|
||||
if(detonator)
|
||||
if(!isigniter(detonator.a_left))
|
||||
detonator.a_left.activate()
|
||||
active = 1
|
||||
if(!isigniter(detonator.a_right))
|
||||
detonator.a_right.activate()
|
||||
active = 1
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
|
||||
if(user)
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src.name]")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/proc/primed(var/primed = 1)
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + (primed?"_primed":"_active")
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/detonate()
|
||||
if(!stage || stage<2) return
|
||||
|
||||
var/has_reagents = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
if(G.reagents.total_volume) has_reagents = 1
|
||||
|
||||
active = 0
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
spawn(0) //Otherwise det_time is erroneously set to 0 after this
|
||||
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(W.is_screwdriver() && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
name = "grenade"
|
||||
else
|
||||
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
|
||||
name = "fake grenade"
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
|
||||
detonate()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
playsound(src.loc, W.usesound, 50, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
stage = 1
|
||||
active = 0
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
|
||||
return
|
||||
else
|
||||
if(W.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
|
||||
activate(mob/user as mob)
|
||||
if(active) return
|
||||
|
||||
if(detonator)
|
||||
if(!isigniter(detonator.a_left))
|
||||
detonator.a_left.activate()
|
||||
active = 1
|
||||
if(!isigniter(detonator.a_right))
|
||||
detonator.a_right.activate()
|
||||
active = 1
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
|
||||
if(user)
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src.name]")
|
||||
|
||||
return
|
||||
|
||||
proc/primed(var/primed = 1)
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + (primed?"_primed":"_active")
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
|
||||
detonate()
|
||||
if(!stage || stage<2) return
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
var/has_reagents = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
if(G.reagents.total_volume) has_reagents = 1
|
||||
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, get_turf(src))
|
||||
steam.attach(src)
|
||||
steam.start()
|
||||
|
||||
active = 0
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
spawn(0) //Otherwise det_time is erroneously set to 0 after this
|
||||
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_left
|
||||
det_time = 10*T.time
|
||||
if(istimer(detonator.a_right))
|
||||
var/obj/item/device/assembly/timer/T = detonator.a_right
|
||||
det_time = 10*T.time
|
||||
return
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.touch(A)
|
||||
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
C.drop_from_inventory(src)
|
||||
C.throw_mode_off()
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, get_turf(src))
|
||||
steam.attach(src)
|
||||
steam.start()
|
||||
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.touch(A)
|
||||
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
C.drop_from_inventory(src)
|
||||
C.throw_mode_off()
|
||||
|
||||
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
|
||||
spawn(50) //To make sure all reagents can work
|
||||
qdel(src) //correctly before deleting the grenade.
|
||||
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
|
||||
spawn(50) //To make sure all reagents can work
|
||||
qdel(src) //correctly before deleting the grenade.
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/large
|
||||
@@ -203,20 +203,20 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/metalfoam/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("aluminum", 30)
|
||||
B2.reagents.add_reagent("foaming_agent", 10)
|
||||
B2.reagents.add_reagent("pacid", 10)
|
||||
B1.reagents.add_reagent("aluminum", 30)
|
||||
B2.reagents.add_reagent("foaming_agent", 10)
|
||||
B2.reagents.add_reagent("pacid", 10)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/incendiary
|
||||
name = "incendiary grenade"
|
||||
@@ -224,22 +224,22 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/incendiary/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("aluminum", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B2.reagents.add_reagent("phoron", 15)
|
||||
B2.reagents.add_reagent("sacid", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B1.reagents.add_reagent("aluminum", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B2.reagents.add_reagent("phoron", 15)
|
||||
B2.reagents.add_reagent("sacid", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/antiweed
|
||||
name = "weedkiller grenade"
|
||||
@@ -247,21 +247,21 @@
|
||||
path = 1
|
||||
stage = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/antiweed/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("plantbgone", 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
B1.reagents.add_reagent("plantbgone", 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = "grenade"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = "grenade"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner
|
||||
name = "cleaner grenade"
|
||||
@@ -269,20 +269,20 @@
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("fluorosurfactant", 40)
|
||||
B2.reagents.add_reagent("water", 40)
|
||||
B2.reagents.add_reagent("cleaner", 10)
|
||||
B1.reagents.add_reagent("fluorosurfactant", 40)
|
||||
B2.reagents.add_reagent("water", 40)
|
||||
B2.reagents.add_reagent("cleaner", 10)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/teargas
|
||||
name = "tear gas grenade"
|
||||
@@ -290,19 +290,19 @@
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
|
||||
/obj/item/weapon/grenade/chem_grenade/teargas/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent("phosphorus", 40)
|
||||
B1.reagents.add_reagent("potassium", 40)
|
||||
B1.reagents.add_reagent("condensedcapsaicin", 40)
|
||||
B2.reagents.add_reagent("sugar", 40)
|
||||
B2.reagents.add_reagent("condensedcapsaicin", 80)
|
||||
B1.reagents.add_reagent("phosphorus", 40)
|
||||
B1.reagents.add_reagent("potassium", 40)
|
||||
B1.reagents.add_reagent("condensedcapsaicin", 40)
|
||||
B2.reagents.add_reagent("sugar", 40)
|
||||
B2.reagents.add_reagent("condensedcapsaicin", 80)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
@@ -26,7 +26,6 @@
|
||||
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
|
||||
to_chat(M, "<span class='danger'>BANG</span>") // Called during the loop that bangs people in lockers/containers and when banging
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
data["electronic_warfare"] = electronic_warfare
|
||||
data["entries"] = entries
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -185,7 +185,7 @@
|
||||
. = 1
|
||||
|
||||
// Always update the UI, or buttons will spin indefinitely
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/var/global/list/id_card_states
|
||||
/proc/id_card_states()
|
||||
|
||||
@@ -264,7 +264,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
data["maskConnected"] = 1
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel.
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weapon/weldingtool/New()
|
||||
/obj/item/weapon/weldingtool/Initialize()
|
||||
. = ..()
|
||||
// var/random_fuel = min(rand(10,20),max_fuel)
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
||||
reagents = R
|
||||
@@ -48,7 +49,6 @@
|
||||
update_icon()
|
||||
if(always_process)
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/weldingtool/Destroy()
|
||||
if(welding || always_process)
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
var/obj/item/weapon/nozzle = null //Attached welder, or other spray device.
|
||||
var/nozzle_attached = 0
|
||||
|
||||
/obj/item/weapon/weldpack/New()
|
||||
/obj/item/weapon/weldpack/Initialize()
|
||||
. = ..()
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel) //Lotsa refills
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
@@ -4,27 +4,27 @@
|
||||
icon = 'icons/misc/mark.dmi'
|
||||
icon_state = "rup"
|
||||
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
|
||||
var/drop_get_turf = TRUE
|
||||
|
||||
// creates a new object and deletes itself
|
||||
/obj/random/New()
|
||||
..()
|
||||
spawn()
|
||||
if(istype(src.loc, /obj/structure/loot_pile)) //Spawning from a lootpile is weird, need to wait until we're out of it to do our work.
|
||||
while(istype(src.loc, /obj/structure/loot_pile))
|
||||
sleep(1)
|
||||
if (!prob(spawn_nothing_percentage))
|
||||
spawn_item()
|
||||
qdel(src)
|
||||
/obj/random/Initialize()
|
||||
. = ..()
|
||||
if (!prob(spawn_nothing_percentage))
|
||||
spawn_item()
|
||||
qdel(src)
|
||||
|
||||
// this function should return a specific item to spawn
|
||||
/obj/random/proc/item_to_spawn()
|
||||
return 0
|
||||
|
||||
/obj/random/drop_location()
|
||||
return drop_get_turf? get_turf(src) : ..()
|
||||
|
||||
// creates the random item
|
||||
/obj/random/proc/spawn_item()
|
||||
var/build_path = item_to_spawn()
|
||||
|
||||
var/atom/A = new build_path(src.loc)
|
||||
var/atom/A = new build_path(drop_location())
|
||||
if(pixel_x || pixel_y)
|
||||
A.pixel_x = pixel_x
|
||||
A.pixel_y = pixel_y
|
||||
|
||||
@@ -102,7 +102,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
|
||||
data["signs"] = signs ? "[signs] sign\s" : null
|
||||
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = SSnanoui.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)
|
||||
|
||||
@@ -39,11 +39,10 @@
|
||||
if(!isnull(rmaterialtype))
|
||||
reinf_material = get_material_by_name(rmaterialtype)
|
||||
update_material()
|
||||
|
||||
processing_turfs |= src
|
||||
START_PROCESSING(SSturfs, src)
|
||||
|
||||
/turf/simulated/wall/Destroy()
|
||||
processing_turfs -= src
|
||||
STOP_PROCESSING(SSturfs, src)
|
||||
dismantle_wall(null,null,1)
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user