mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge remote-tracking branch 'upstream/master' into diagonal-movement
This commit is contained in:
@@ -224,6 +224,8 @@ var/list/admin_verbs_snpc = list(
|
||||
var/list/admin_verbs_ticket = list(
|
||||
/client/proc/openAdminTicketUI,
|
||||
/client/proc/toggleticketlogs,
|
||||
/client/proc/openMentorTicketUI,
|
||||
/client/proc/toggleMentorTicketLogs,
|
||||
/client/proc/resolveAllAdminTickets,
|
||||
/client/proc/resolveAllMentorTickets
|
||||
)
|
||||
@@ -926,10 +928,10 @@ var/list/admin_verbs_ticket = list(
|
||||
to_chat(usr, "You now will get admin log messages.")
|
||||
|
||||
/client/proc/toggleMentorTicketLogs()
|
||||
set name = "Toggle Mentor Ticket Messgaes"
|
||||
set name = "Toggle Mentor Ticket Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!check_rights(R_MENTOR))
|
||||
if(!check_rights(R_MENTOR|R_ADMIN))
|
||||
return
|
||||
|
||||
prefs.toggles ^= CHAT_NO_MENTORTICKETLOGS
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set name = "Open Mentor Ticket Interface"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder || !check_rights(R_MENTOR))
|
||||
if(!holder || !check_rights(R_MENTOR|R_ADMIN))
|
||||
return
|
||||
|
||||
SSmentor_tickets.showUI(usr)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
cameras() // Sets up both cameras and last alarm area.
|
||||
set_source_data(source, duration, severity)
|
||||
|
||||
/datum/alarm/proc/process()
|
||||
/datum/alarm/process()
|
||||
// Has origin gone missing?
|
||||
if(!origin && !end_time)
|
||||
end_time = world.time + ALARM_RESET_DELAY
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/list/datum/alarm/alarms_assoc = new // Associative list of alarms, to efficiently acquire them based on origin.
|
||||
var/list/listeners = new // A list of all objects interested in alarm changes.
|
||||
|
||||
/datum/alarm_handler/proc/process()
|
||||
/datum/alarm_handler/process()
|
||||
for(var/datum/alarm/A in alarms)
|
||||
A.process()
|
||||
check_alarm_cleared(A)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/assembly/process()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/assembly/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
/obj/item/assembly/health/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured && scanning)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
scanning = FALSE
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
@@ -66,9 +66,9 @@
|
||||
return FALSE
|
||||
scanning = !scanning
|
||||
if(scanning)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
/obj/item/assembly/health/interact(mob/user)//TODO: Change this to the wires thingy
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
/obj/item/assembly/infra/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
on = FALSE
|
||||
if(first)
|
||||
qdel(first)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
/obj/item/assembly/prox_sensor/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
scanning = 0
|
||||
timing = 0
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
/obj/item/assembly/timer/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
timing = FALSE
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ var/global/automation_types = subtypesof(/datum/automation)
|
||||
/datum/automation/proc/OnRemove()
|
||||
return
|
||||
|
||||
/datum/automation/proc/process()
|
||||
/datum/automation/process()
|
||||
return
|
||||
|
||||
/datum/automation/proc/Evaluate()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/list/squad
|
||||
|
||||
/obj/effect/spawner/snpc_squad/New()
|
||||
processing_objects += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
squad = squads[squad_type]
|
||||
if(!squad)
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/effect/spawner/snpc_squad/Destroy()
|
||||
squad = null
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/spawner/snpc_squad/process()
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
owner = o
|
||||
if(args.len >= 3)
|
||||
params = args.Copy(3)
|
||||
processing_objects += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
trigger()
|
||||
|
||||
/obj/effect/portal_sensor/Destroy()
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal_sensor/Crossed(A)
|
||||
|
||||
@@ -17,7 +17,7 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
|
||||
next_message = world.time + rand(delay_min, delay_max)
|
||||
process()
|
||||
|
||||
/datum/lore/atc_controller/proc/process()
|
||||
/datum/lore/atc_controller/process()
|
||||
if(world.time >= next_message)
|
||||
if(squelched)
|
||||
next_message = world.time + backoff_delay
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
/obj/item/clothing/head/cakehat/process()
|
||||
if(!onfire)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
var/turf/location = src.loc
|
||||
@@ -113,7 +113,7 @@
|
||||
src.force = 3
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "cake1"
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
src.force = null
|
||||
src.damtype = "brute"
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
else
|
||||
new_camera(user)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/proc/activate()
|
||||
if(!activating && !activated && !teleporting)
|
||||
@@ -143,7 +143,7 @@
|
||||
to_chat(user, "\[ <span style='color: #00ff00;'>ok</span> \] Starting ui display driver")
|
||||
to_chat(user, "\[ <span style='color: #00ff00;'>ok</span> \] Initializing chronowalk4-view")
|
||||
new_camera(user)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
activated = 1
|
||||
else
|
||||
to_chat(user, "\[ <span style='color: #ff0000;'>fail</span> \] Mounting /dev/helmet")
|
||||
|
||||
@@ -633,7 +633,7 @@
|
||||
owner.visible_message("<span class='danger'>[owner]'s shields deflect [attack_text] in a shower of sparks!</span>")
|
||||
current_charges--
|
||||
recharge_cooldown = world.time + recharge_delay
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(current_charges <= 0)
|
||||
owner.visible_message("[owner]'s shield overloads!")
|
||||
shield_state = "broken"
|
||||
@@ -643,7 +643,7 @@
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/process()
|
||||
@@ -652,7 +652,7 @@
|
||||
playsound(loc, 'sound/magic/charge.ogg', 50, 1)
|
||||
if(current_charges == max_charges)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
shield_state = "[shield_on]"
|
||||
if(istype(loc, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/C = loc
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
@@ -166,7 +166,7 @@
|
||||
if(istype(M))
|
||||
M.unEquip(piece)
|
||||
qdel(piece)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(wires)
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
@@ -186,10 +186,10 @@
|
||||
|
||||
/obj/item/clothing/suit/corgisuit/super_hero/en/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/corgisuit/super_hero/en/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/corgisuit/super_hero/en/process()
|
||||
@@ -883,7 +883,7 @@
|
||||
/obj/item/clothing/suit/advanced_protective_suit/Destroy()
|
||||
if(on)
|
||||
on = 0
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/advanced_protective_suit/ui_action_click()
|
||||
@@ -893,7 +893,7 @@
|
||||
else
|
||||
on = 1
|
||||
to_chat(usr, "You turn the suit's special processes on.")
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/advanced_protective_suit/IsReflect()
|
||||
@@ -912,7 +912,7 @@
|
||||
if(user.reagents.get_reagent_amount("syndicate_nanites") < 15)
|
||||
user.reagents.add_reagent("syndicate_nanites", 15)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
//Syndicate Chaplain Robe (WOLOLO!)
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe
|
||||
@@ -924,22 +924,22 @@
|
||||
if(linked_staff) //delink on destruction
|
||||
linked_staff.robes = null
|
||||
linked_staff = null
|
||||
processing_objects -= src //probably is cleared in a parent call already, but just in case we're gonna do it here
|
||||
STOP_PROCESSING(SSobj, src) //probably is cleared in a parent call already, but just in case we're gonna do it here
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/equipped(mob/living/carbon/human/H, slot)
|
||||
if(!istype(H) || slot != slot_wear_suit)
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
else
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/process()
|
||||
if(!linked_staff) //if we don't have a linked staff, the rest of this is useless
|
||||
return
|
||||
|
||||
if(!ishuman(loc)) //if we somehow try to process while not on a human, remove ourselves from processing and return
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
|
||||
@@ -574,7 +574,7 @@
|
||||
|
||||
/obj/item/clothing/accessory/petcollar/Destroy()
|
||||
QDEL_NULL(access_id)
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/petcollar/attack_self(mob/user as mob)
|
||||
@@ -617,10 +617,10 @@
|
||||
|
||||
/obj/item/clothing/accessory/petcollar/equipped(mob/living/simple_animal/user)
|
||||
if(istype(user))
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/accessory/petcollar/dropped(mob/living/simple_animal/user)
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/accessory/petcollar/process()
|
||||
var/mob/living/simple_animal/M = loc
|
||||
@@ -636,7 +636,7 @@
|
||||
else
|
||||
a.autosay("[M] has been vandalized in [t.name]!", "[M]'s Death Alarm")
|
||||
qdel(a)
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/proc/english_accessory_list(obj/item/clothing/under/U)
|
||||
if(!istype(U) || !U.accessories.len)
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
/obj/effect/countdown/proc/start()
|
||||
if(!started)
|
||||
GLOB.fast_processing += src
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
started = TRUE
|
||||
|
||||
/obj/effect/countdown/proc/stop()
|
||||
if(started)
|
||||
maptext = null
|
||||
GLOB.fast_processing -= src
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
started = FALSE
|
||||
|
||||
/obj/effect/countdown/proc/get_value()
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/effect/countdown/Destroy()
|
||||
attached_to = null
|
||||
GLOB.fast_processing -= src
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/countdown/ex_act(severity) //immune to explosions
|
||||
|
||||
@@ -760,10 +760,10 @@
|
||||
|
||||
/obj/item/clothing/head/pirate/fluff/stumpy/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/head/pirate/fluff/stumpy/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/pirate/fluff/stumpy/process()
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
//Do not override this proc, instead use the appropiate procs.
|
||||
//This proc will handle the calls to the appropiate procs.
|
||||
/datum/event/proc/process()
|
||||
/datum/event/process()
|
||||
if(!processing)
|
||||
return
|
||||
|
||||
@@ -137,12 +137,12 @@
|
||||
end()
|
||||
|
||||
endedAt = world.time
|
||||
event_manager.active_events -= src
|
||||
event_manager.event_complete(src)
|
||||
SSevents.active_events -= src
|
||||
SSevents.event_complete(src)
|
||||
|
||||
/datum/event/New(var/datum/event_meta/EM)
|
||||
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
|
||||
event_manager.active_events += src
|
||||
SSevents.active_events += src
|
||||
|
||||
if(!EM)
|
||||
EM = new /datum/event_meta(EVENT_LEVEL_MAJOR, "Unknown, Most likely admin called", src.type)
|
||||
|
||||
@@ -22,7 +22,7 @@ var/list/event_last_fired = list()
|
||||
|
||||
var/last_world_time = 0
|
||||
|
||||
/datum/event_container/proc/process()
|
||||
/datum/event_container/process()
|
||||
if(!next_event_time)
|
||||
set_event_delay()
|
||||
|
||||
|
||||
@@ -1,412 +0,0 @@
|
||||
/datum/event_manager
|
||||
var/window_x = 700
|
||||
var/window_y = 600
|
||||
var/report_at_round_end = 0
|
||||
var/table_options = " align='center'"
|
||||
var/head_options = " style='font-weight:bold;'"
|
||||
var/row_options1 = " width='85px'"
|
||||
var/row_options2 = " width='260px'"
|
||||
var/row_options3 = " width='150px'"
|
||||
var/datum/event_container/selected_event_container = null
|
||||
|
||||
var/list/datum/event/active_events = list()
|
||||
var/list/datum/event/finished_events = list()
|
||||
|
||||
var/list/datum/event/allEvents
|
||||
var/list/datum/event_container/event_containers = list(
|
||||
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
|
||||
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
|
||||
EVENT_LEVEL_MAJOR = new/datum/event_container/major
|
||||
)
|
||||
|
||||
var/datum/event_meta/new_event = new
|
||||
|
||||
/datum/event_manager/New()
|
||||
allEvents = subtypesof(/datum/event)
|
||||
|
||||
/datum/event_manager/proc/process()
|
||||
for(var/datum/event/E in event_manager.active_events)
|
||||
E.process()
|
||||
|
||||
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/list/datum/event_container/EC = event_containers[i]
|
||||
EC.process()
|
||||
|
||||
/datum/event_manager/proc/event_complete(var/datum/event/E)
|
||||
if(!E.event_meta) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
|
||||
log_debug("Event of '[E.type]' with missing meta-data has completed.")
|
||||
return
|
||||
|
||||
finished_events += E
|
||||
|
||||
var/theseverity
|
||||
|
||||
if(!E.severity)
|
||||
theseverity = EVENT_LEVEL_MODERATE
|
||||
|
||||
if(!E.severity == EVENT_LEVEL_MUNDANE && !E.severity == EVENT_LEVEL_MODERATE && !E.severity == EVENT_LEVEL_MAJOR)
|
||||
theseverity = EVENT_LEVEL_MODERATE //just to be careful
|
||||
|
||||
if(E.severity)
|
||||
theseverity = E.severity
|
||||
|
||||
// Add the event back to the list of available events
|
||||
var/datum/event_container/EC = event_containers[theseverity]
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].")
|
||||
|
||||
/datum/event_manager/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
EC.next_event_time += delay
|
||||
|
||||
/datum/event_manager/proc/Interact(var/mob/living/user)
|
||||
|
||||
var/html = GetInteractWindow()
|
||||
|
||||
var/datum/browser/popup = new(user, "event_manager", "Event Manager", window_x, window_y)
|
||||
popup.set_content(html)
|
||||
popup.open()
|
||||
|
||||
/datum/event_manager/proc/RoundEnd()
|
||||
if(!report_at_round_end)
|
||||
return
|
||||
|
||||
to_chat(world, "<br><br><br><font size=3><b>Random Events This Round:</b></font>")
|
||||
for(var/datum/event/E in active_events|finished_events)
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [station_time_timestamp("hh:mm:ss", E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [station_time_timestamp("hh:mm:ss", E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
|
||||
to_chat(world, message)
|
||||
|
||||
/datum/event_manager/proc/GetInteractWindow()
|
||||
var/html = "<A align='right' href='?src=[UID()];refresh=1'>Refresh</A>"
|
||||
|
||||
if(selected_event_container)
|
||||
var/event_time = max(0, selected_event_container.next_event_time - world.time)
|
||||
html += "<A align='right' href='?src=[UID()];back=1'>Back</A><br>"
|
||||
html += "Time till start: [round(event_time / 600, 0.1)]<br>"
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr[head_options]><td[row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
|
||||
for(var/datum/event_meta/EM in selected_event_container.available_events)
|
||||
html += "<tr>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];set_weight=\ref[EM]'>[EM.weight]</A></td>"
|
||||
html += "<td>[EM.min_weight]</td>"
|
||||
html += "<td>[EM.max_weight]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
|
||||
html += "<td><span class='alert'>[EM.get_weight(number_active_with_role())]</span></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Add Event</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr [head_options]><td[row_options2]>Name</td><td[row_options2]>Type</td><td[row_options1]>Weight</td><td[row_options1]>OneShot</td></tr>"
|
||||
html += "<tr>"
|
||||
html += "<td><A align='right' href='?src=[UID()];set_name=\ref[new_event]'>[new_event.name ? new_event.name : "Enter Event"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];set_type=\ref[new_event]'>[new_event.event_type ? new_event.event_type : "Select Type"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];set_weight=\ref[new_event]'>[new_event.weight ? new_event.weight : 0]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];toggle_oneshot=\ref[new_event]'>[new_event.one_shot]</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "<A align='right' href='?src=[UID()];add=\ref[selected_event_container]'>Add</A><br>"
|
||||
html += "</div>"
|
||||
else
|
||||
html += "<A align='right' href='?src=[UID()];toggle_report=1'>Round End Report: [report_at_round_end ? "On": "Off"]</A><br>"
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Event Start</h2>"
|
||||
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr[head_options]><td[row_options1]>Severity</td><td[row_options1]>Starts At</td><td[row_options1]>Starts In</td><td[row_options3]>Adjust Start</td><td[row_options1]>Pause</td><td[row_options1]>Interval Mod</td></tr>"
|
||||
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/next_event_at = max(0, EC.next_event_time - world.time)
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[station_time_timestamp("hh:mm:ss", max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=[UID()];dec_timer=2;event=\ref[EC]'>--</A>"
|
||||
html += "<A align='right' href='?src=[UID()];dec_timer=1;event=\ref[EC]'>-</A>"
|
||||
html += "<A align='right' href='?src=[UID()];inc_timer=1;event=\ref[EC]'>+</A>"
|
||||
html += "<A align='right' href='?src=[UID()];inc_timer=2;event=\ref[EC]'>++</A>"
|
||||
html += "</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=[UID()];pause=\ref[EC]'>[EC.delayed ? "Resume" : "Pause"]</A>"
|
||||
html += "</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=[UID()];interval=\ref[EC]'>[EC.delay_modifier]</A>"
|
||||
html += "</td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Next Event</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr[head_options]><td[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options3]>Event Rotation</td><td>Clear</td></tr>"
|
||||
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/datum/event_meta/EM = EC.next_event
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];select_event=\ref[EC]'>[EM ? EM.name : "Random"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];view_events=\ref[EC]'>View</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];clear=\ref[EC]'>Clear</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Running Events</h2>"
|
||||
html += "Estimated times, affected by master controller delays."
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr[head_options]><td[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options1]>Ends At</td><td[row_options1]>Ends In</td><td[row_options3]>Stop</td></tr>"
|
||||
for(var/datum/event/E in active_events)
|
||||
if(!E.event_meta)
|
||||
continue
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
var/ends_at = E.startedAt + (E.lastProcessAt() * 20) // A best estimate, based on how often the manager processes
|
||||
var/ends_in = max(0, round((ends_at - world.time) / 600, 0.1))
|
||||
var/no_end = E.noAutoEnd
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td>[no_end ? "N/A" : station_time_timestamp("hh:mm:ss", ends_at)]</td>"
|
||||
html += "<td>[no_end ? "N/A" : ends_in]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];stop=\ref[E]'>Stop</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
return html
|
||||
|
||||
/datum/event_manager/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["toggle_report"])
|
||||
report_at_round_end = !report_at_round_end
|
||||
admin_log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
|
||||
else if(href_list["dec_timer"])
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/decrease = (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
|
||||
EC.next_event_time -= decrease
|
||||
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
|
||||
else if(href_list["inc_timer"])
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/increase = (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
|
||||
EC.next_event_time += increase
|
||||
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
|
||||
else if(href_list["select_event"])
|
||||
var/datum/event_container/EC = locate(href_list["select_event"])
|
||||
var/datum/event_meta/EM = EC.SelectEvent()
|
||||
if(EM)
|
||||
admin_log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.")
|
||||
else if(href_list["pause"])
|
||||
var/datum/event_container/EC = locate(href_list["pause"])
|
||||
EC.delayed = !EC.delayed
|
||||
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
|
||||
else if(href_list["interval"])
|
||||
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
|
||||
if(delay && delay > 0)
|
||||
var/datum/event_container/EC = locate(href_list["interval"])
|
||||
EC.delay_modifier = delay
|
||||
admin_log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].")
|
||||
else if(href_list["stop"])
|
||||
if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event/E = locate(href_list["stop"])
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
admin_log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
E.kill()
|
||||
else if(href_list["view_events"])
|
||||
selected_event_container = locate(href_list["view_events"])
|
||||
else if(href_list["back"])
|
||||
selected_event_container = null
|
||||
else if(href_list["set_name"])
|
||||
var/name = input("Enter event name.", "Set Name") as text|null
|
||||
if(name)
|
||||
var/datum/event_meta/EM = locate(href_list["set_name"])
|
||||
EM.name = name
|
||||
else if(href_list["set_type"])
|
||||
var/type = input("Select event type.", "Select") as null|anything in allEvents
|
||||
if(type)
|
||||
var/datum/event_meta/EM = locate(href_list["set_type"])
|
||||
EM.event_type = type
|
||||
else if(href_list["set_weight"])
|
||||
var/weight = input("Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
|
||||
if(weight && weight > 0)
|
||||
var/datum/event_meta/EM = locate(href_list["set_weight"])
|
||||
EM.weight = weight
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
|
||||
else if(href_list["toggle_oneshot"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_oneshot"])
|
||||
EM.one_shot = !EM.one_shot
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["toggle_enabled"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_enabled"])
|
||||
EM.enabled = !EM.enabled
|
||||
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["remove"])
|
||||
if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event_meta/EM = locate(href_list["remove"])
|
||||
var/datum/event_container/EC = locate(href_list["EC"])
|
||||
EC.available_events -= EM
|
||||
admin_log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["add"])
|
||||
if(!new_event.name || !new_event.event_type)
|
||||
return
|
||||
if(alert("This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes")
|
||||
return
|
||||
new_event.severity = selected_event_container.severity
|
||||
selected_event_container.available_events += new_event
|
||||
admin_log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
|
||||
new_event = new
|
||||
else if(href_list["clear"])
|
||||
var/datum/event_container/EC = locate(href_list["clear"])
|
||||
if(EC.next_event)
|
||||
admin_log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
|
||||
EC.next_event = null
|
||||
|
||||
Interact(usr)
|
||||
|
||||
/client/proc/forceEvent(var/type in event_manager.allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
if(ispath(type))
|
||||
new type(new /datum/event_meta(EVENT_LEVEL_MAJOR))
|
||||
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
|
||||
|
||||
/client/proc/event_manager_panel()
|
||||
set name = "Event Manager Panel"
|
||||
set category = "Event"
|
||||
if(event_manager)
|
||||
event_manager.Interact(usr)
|
||||
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
|
||||
var/area/candidate = null
|
||||
|
||||
var/list/safe_areas = list(
|
||||
/area/turret_protected/ai,
|
||||
/area/turret_protected/ai_upload,
|
||||
/area/engine,
|
||||
/area/solar,
|
||||
/area/holodeck,
|
||||
/area/shuttle/arrival,
|
||||
/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/station,
|
||||
/area/shuttle/escape_pod2/station,
|
||||
/area/shuttle/escape_pod3/station,
|
||||
/area/shuttle/escape_pod5/station,
|
||||
/area/shuttle/specops/station,
|
||||
/area/shuttle/prison/station,
|
||||
/area/shuttle/administration/station
|
||||
)
|
||||
|
||||
//These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
|
||||
var/list/danger_areas = list(
|
||||
/area/engine/break_room,
|
||||
/area/engine/chiefs_office)
|
||||
|
||||
var/list/event_areas = list()
|
||||
|
||||
for(var/areapath in the_station_areas)
|
||||
event_areas += typesof(areapath)
|
||||
for(var/areapath in safe_areas)
|
||||
event_areas -= typesof(areapath)
|
||||
for(var/areapath in danger_areas)
|
||||
event_areas += typesof(areapath)
|
||||
|
||||
while(event_areas.len > 0)
|
||||
var/list/event_turfs = null
|
||||
candidate = locate(pick_n_take(event_areas))
|
||||
event_turfs = get_area_turfs(candidate)
|
||||
if(event_turfs.len > 0)
|
||||
break
|
||||
|
||||
return candidate
|
||||
|
||||
/datum/event/proc/num_players()
|
||||
var/players = 0
|
||||
for(var/mob/living/carbon/human/P in GLOB.player_list)
|
||||
if(P.client)
|
||||
players++
|
||||
return players
|
||||
|
||||
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
|
||||
// with a specific role.
|
||||
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
|
||||
/proc/number_active_with_role()
|
||||
var/list/active_with_role = list()
|
||||
active_with_role["Engineer"] = 0
|
||||
active_with_role["Medical"] = 0
|
||||
active_with_role["Security"] = 0
|
||||
active_with_role["Scientist"] = 0
|
||||
active_with_role["AI"] = 0
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Botanist"] = 0
|
||||
active_with_role["Any"] = GLOB.player_list.len
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
continue
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
|
||||
active_with_role["Engineer"]++
|
||||
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
|
||||
active_with_role["Engineer"]++
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
|
||||
active_with_role["Medical"]++
|
||||
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
|
||||
active_with_role["Medical"]++
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
|
||||
active_with_role["Security"]++
|
||||
if(M.mind.assigned_role in security_positions)
|
||||
active_with_role["Security"]++
|
||||
|
||||
if(M.mind.assigned_role in list("Research Director", "Scientist"))
|
||||
active_with_role["Scientist"]++
|
||||
|
||||
if(M.mind.assigned_role == "AI")
|
||||
active_with_role["AI"]++
|
||||
|
||||
if(M.mind.assigned_role == "Cyborg")
|
||||
active_with_role["Cyborg"]++
|
||||
|
||||
if(M.mind.assigned_role == "Janitor")
|
||||
active_with_role["Janitor"]++
|
||||
|
||||
if(M.mind.assigned_role == "Botanist")
|
||||
active_with_role["Botanist"]++
|
||||
|
||||
return active_with_role
|
||||
@@ -0,0 +1,120 @@
|
||||
|
||||
/client/proc/forceEvent(var/type in SSevents.allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
if(ispath(type))
|
||||
new type(new /datum/event_meta(EVENT_LEVEL_MAJOR))
|
||||
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
|
||||
|
||||
/client/proc/event_manager_panel()
|
||||
set name = "Event Manager Panel"
|
||||
set category = "Event"
|
||||
if(SSevents)
|
||||
SSevents.Interact(usr)
|
||||
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
|
||||
var/area/candidate = null
|
||||
|
||||
var/list/safe_areas = list(
|
||||
/area/turret_protected/ai,
|
||||
/area/turret_protected/ai_upload,
|
||||
/area/engine,
|
||||
/area/solar,
|
||||
/area/holodeck,
|
||||
/area/shuttle/arrival,
|
||||
/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/station,
|
||||
/area/shuttle/escape_pod2/station,
|
||||
/area/shuttle/escape_pod3/station,
|
||||
/area/shuttle/escape_pod5/station,
|
||||
/area/shuttle/specops/station,
|
||||
/area/shuttle/prison/station,
|
||||
/area/shuttle/administration/station
|
||||
)
|
||||
|
||||
//These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
|
||||
var/list/danger_areas = list(
|
||||
/area/engine/break_room,
|
||||
/area/engine/chiefs_office)
|
||||
|
||||
var/list/event_areas = list()
|
||||
|
||||
for(var/areapath in the_station_areas)
|
||||
event_areas += typesof(areapath)
|
||||
for(var/areapath in safe_areas)
|
||||
event_areas -= typesof(areapath)
|
||||
for(var/areapath in danger_areas)
|
||||
event_areas += typesof(areapath)
|
||||
|
||||
while(event_areas.len > 0)
|
||||
var/list/event_turfs = null
|
||||
candidate = locate(pick_n_take(event_areas))
|
||||
event_turfs = get_area_turfs(candidate)
|
||||
if(event_turfs.len > 0)
|
||||
break
|
||||
|
||||
return candidate
|
||||
|
||||
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
|
||||
// with a specific role.
|
||||
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
|
||||
/proc/number_active_with_role()
|
||||
var/list/active_with_role = list()
|
||||
active_with_role["Engineer"] = 0
|
||||
active_with_role["Medical"] = 0
|
||||
active_with_role["Security"] = 0
|
||||
active_with_role["Scientist"] = 0
|
||||
active_with_role["AI"] = 0
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Botanist"] = 0
|
||||
active_with_role["Any"] = GLOB.player_list.len
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
continue
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
|
||||
active_with_role["Engineer"]++
|
||||
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
|
||||
active_with_role["Engineer"]++
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
|
||||
active_with_role["Medical"]++
|
||||
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
|
||||
active_with_role["Medical"]++
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
|
||||
active_with_role["Security"]++
|
||||
if(M.mind.assigned_role in security_positions)
|
||||
active_with_role["Security"]++
|
||||
|
||||
if(M.mind.assigned_role in list("Research Director", "Scientist"))
|
||||
active_with_role["Scientist"]++
|
||||
|
||||
if(M.mind.assigned_role == "AI")
|
||||
active_with_role["AI"]++
|
||||
|
||||
if(M.mind.assigned_role == "Cyborg")
|
||||
active_with_role["Cyborg"]++
|
||||
|
||||
if(M.mind.assigned_role == "Janitor")
|
||||
active_with_role["Janitor"]++
|
||||
|
||||
if(M.mind.assigned_role == "Botanist")
|
||||
active_with_role["Botanist"]++
|
||||
|
||||
return active_with_role
|
||||
|
||||
/datum/event/proc/num_players()
|
||||
var/players = 0
|
||||
for(var/mob/living/carbon/human/P in GLOB.player_list)
|
||||
if(P.client)
|
||||
players++
|
||||
return players
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/event/falsealarm/announce()
|
||||
var/weight = pickweight(list(EVENT_LEVEL_MUNDANE = 60, EVENT_LEVEL_MODERATE = 30, EVENT_LEVEL_MAJOR = 10))
|
||||
var/datum/event_container/container = event_manager.event_containers[weight]
|
||||
var/datum/event_container/container = SSevents.event_containers[weight]
|
||||
var/datum/event/E = container.acquire_event()
|
||||
var/datum/event/Event = new E
|
||||
message_admins("False Alarm: [Event]")
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
/obj/structure/spacevine_controller/New(loc, list/muts, potency, production)
|
||||
color = "#ffffff"
|
||||
spawn_spacevine_piece(loc, , muts)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
init_subtypes(/datum/spacevine_mutation/, mutations_list)
|
||||
if(potency != null && potency > 0)
|
||||
// 1 mutativeness at 10 potency
|
||||
@@ -567,7 +567,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/spacevine_controller/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/datum/event/wizard/ghost //The spook is real
|
||||
|
||||
/datum/event/wizard/ghost/start()
|
||||
var/msg = "<span class='warning'>You suddenly feel extremely obvious...</span>"
|
||||
set_observer_default_invisibility(0, msg)
|
||||
@@ -138,7 +138,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
if(target.client)
|
||||
target.client.images |= flood_images
|
||||
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
|
||||
processing_objects += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/hallucination/fake_flood/process()
|
||||
if(next_expand <= world.time)
|
||||
@@ -162,7 +162,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
target.client.images |= flood_images
|
||||
|
||||
/obj/effect/hallucination/fake_flood/Destroy()
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
flood_turfs.Cut()
|
||||
if(target.client)
|
||||
target.client.images.Remove(flood_images)
|
||||
|
||||
@@ -345,9 +345,9 @@
|
||||
if(!istype(H)) return
|
||||
|
||||
H.celebrate()
|
||||
if(!holiday_master.holidays)
|
||||
holiday_master.holidays = list()
|
||||
holiday_master.holidays[H.name] = H
|
||||
if(!SSholiday.holidays)
|
||||
SSholiday.holidays = list()
|
||||
SSholiday.holidays[H.name] = H
|
||||
|
||||
//update our hub status
|
||||
world.update_status()
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
|
||||
/obj/structure/beebox/Initialize(mapload)
|
||||
. = ..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/structure/beebox/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/mob/living/simple_animal/hostile/poison/bees/B in bees)
|
||||
B.beehome = null
|
||||
bees.Cut()
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
burning = 1
|
||||
set_light(6, l_color = "#ED9200")
|
||||
Burn()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
@@ -186,7 +186,7 @@
|
||||
icon_state = "bonfire"
|
||||
burning = 0
|
||||
set_light(0)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/buckle_mob(mob/living/M, force = 0)
|
||||
if(..())
|
||||
|
||||
@@ -701,8 +701,7 @@
|
||||
H.nutrition -= 20
|
||||
H.adjustToxLoss(-3)
|
||||
var/turf/T = get_turf(H)
|
||||
T.add_vomit_floor(H)
|
||||
playsound(H, 'sound/effects/splat.ogg', 50, 1)
|
||||
T.add_vomit_floor()
|
||||
else
|
||||
visible_message("<span class='warning'>[src] flickers and fails, due to bluespace interference!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
/obj/item/melee/ghost_sword/New()
|
||||
..()
|
||||
spirits = list()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
|
||||
/obj/item/melee/ghost_sword/Destroy()
|
||||
for(var/mob/dead/observer/G in spirits)
|
||||
G.invisibility = initial(G.invisibility)
|
||||
spirits.Cut()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
..()
|
||||
if(isanimal(loc))
|
||||
holder_animal = loc
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/closet/stasis/Entered(atom/A)
|
||||
if(isliving(A) && holder_animal)
|
||||
@@ -450,7 +450,7 @@
|
||||
holder_animal.verbs -= /mob/living/verb/pulled
|
||||
|
||||
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/mob/living/L in src)
|
||||
L.disabilities &= ~MUTE
|
||||
L.status_flags &= ~GODMODE
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
var/list/image/ghost_darkness_images = list() //this is a list of images for things ghosts should still be able to see when they toggle darkness
|
||||
|
||||
GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
/mob/dead/observer
|
||||
name = "ghost"
|
||||
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
|
||||
@@ -29,6 +31,8 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
|
||||
var/ghost_orbit = GHOST_ORBIT_CIRCLE
|
||||
|
||||
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
|
||||
set_invisibility(GLOB.observer_default_invisibility)
|
||||
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
|
||||
see_in_dark = 100
|
||||
@@ -384,7 +388,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "AntagHud Toggled OFF")
|
||||
M.antagHUD = 0
|
||||
|
||||
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport to a location"
|
||||
@@ -397,6 +401,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
spawn(30)
|
||||
usr.verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
var/area/A = input("Area to jump to", "BOOYEA") as null|anything in ghostteleportlocs
|
||||
var/area/thearea = ghostteleportlocs[A]
|
||||
if(!thearea) return
|
||||
|
||||
@@ -410,13 +415,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
usr.forceMove(pick(L))
|
||||
following = null
|
||||
|
||||
/mob/dead/observer/verb/follow(input in getmobs())
|
||||
/mob/dead/observer/verb/follow()
|
||||
set category = "Ghost"
|
||||
set name = "Orbit" // "Haunt"
|
||||
set desc = "Follow and orbit a mob."
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
var/list/mobs = getpois(skip_mindless=1)
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
ManualFollow(target)
|
||||
|
||||
// This is the ghost's follow verb with an argument
|
||||
@@ -484,24 +490,29 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
update_following()
|
||||
return ..()
|
||||
|
||||
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
set desc = "Teleport to a mob"
|
||||
|
||||
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
|
||||
if(isobserver(usr)) //Make sure they're an observer!
|
||||
var/list/dest = list() //List of possible destinations (mobs)
|
||||
var/target = null //Chosen target.
|
||||
|
||||
if(!target)//Make sure we actually have a target
|
||||
dest += getpois(mobs_only=1) //Fill list, prompt user with list
|
||||
target = input("Please, select a mob!", "Jump to Mob", null, null) as null|anything in dest
|
||||
|
||||
if(!target) //Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = getmobs()[target] //Destination mob
|
||||
var/mob/M = dest[target] //Destination mob
|
||||
var/mob/A = src //Source mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
following = null
|
||||
A.forceMove(T)
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
|
||||
|
||||
/* Now a spell. See spells.dm
|
||||
@@ -742,6 +753,26 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/is_literate()
|
||||
return TRUE
|
||||
|
||||
/mob/dead/observer/proc/set_invisibility(value)
|
||||
invisibility = value
|
||||
if(!value)
|
||||
set_light(1, 2)
|
||||
else
|
||||
set_light(0, 0)
|
||||
|
||||
/mob/dead/observer/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(var_name == "invisibility")
|
||||
set_invisibility(invisibility) // updates light
|
||||
|
||||
/proc/set_observer_default_invisibility(amount, message=null)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
G.set_invisibility(amount)
|
||||
if(message)
|
||||
to_chat(G, message)
|
||||
GLOB.observer_default_invisibility = amount
|
||||
|
||||
/mob/dead/observer/proc/open_spawners_menu()
|
||||
set name = "Mob spawners menu"
|
||||
set desc = "See all currently available ghost spawners"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
. = src.say_dead(message)
|
||||
|
||||
|
||||
/mob/dead/observer/emote(var/act, var/type, var/message)
|
||||
/mob/dead/observer/emote(act, type, message, force)
|
||||
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!message)
|
||||
|
||||
@@ -2,15 +2,20 @@
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
/mob/proc/handle_emote_CD(cooldown = EMOTE_COOLDOWN)
|
||||
if(emote_cd == 2) return 1 // Cooldown emotes were disabled by an admin, prevent use
|
||||
if(src.emote_cd == 1) return 1 // Already on CD, prevent use
|
||||
if(emote_cd == 3) //Spam those emotes
|
||||
return FALSE
|
||||
if(emote_cd == 2) // Cooldown emotes were disabled by an admin, prevent use
|
||||
return TRUE
|
||||
if(emote_cd == 1) // Already on CD, prevent use
|
||||
return TRUE
|
||||
|
||||
src.emote_cd = 1 // Starting cooldown
|
||||
emote_cd = TRUE // Starting cooldown
|
||||
spawn(cooldown)
|
||||
if(emote_cd == 2) return 1 // Don't reset if cooldown emotes were disabled by an admin during the cooldown
|
||||
src.emote_cd = 0 // Cooldown complete, ready for more!
|
||||
if(emote_cd == 2)
|
||||
return TRUE // Don't reset if cooldown emotes were disabled by an admin during the cooldown
|
||||
emote_cd = FALSE // Cooldown complete, ready for more!
|
||||
return FALSE // Proceed with emote
|
||||
|
||||
return 0 // Proceed with emote
|
||||
//--FalseIncarnate
|
||||
|
||||
/mob/proc/handle_emote_param(var/target, var/not_self, var/vicinity, var/return_mob) //Only returns not null if the target param is valid.
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
/obj/item/holder/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/holder/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/holder/process()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/alien/humanoid/emote(act, m_type = 1, message = null, force)
|
||||
var/param = null
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
@@ -25,7 +25,7 @@
|
||||
if("flip")
|
||||
on_CD = handle_emote_CD()
|
||||
|
||||
if(on_CD)
|
||||
if(!force && on_CD == 1)
|
||||
return
|
||||
|
||||
switch(act)
|
||||
@@ -138,4 +138,4 @@
|
||||
playsound(src.loc, 'sound/voice/hiss1.ogg', 30, 1, 1)
|
||||
if(act == "gnarl")
|
||||
playsound(src.loc, 'sound/voice/hiss4.ogg', 30, 1, 1)
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/alien/larva/emote(act, m_type = 1, message = null, force)
|
||||
var/param = null
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
/obj/item/organ/internal/brain/necrotize(update_sprite = TRUE) //Brain also has special handling for when it necrotizes
|
||||
damage = max_damage
|
||||
status |= ORGAN_DEAD
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(dead_icon && !is_robotic())
|
||||
icon_state = dead_icon
|
||||
if(owner && vital)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/brain/emote(var/act,var/m_type=1,var/message = null)
|
||||
/mob/living/carbon/brain/emote(act,m_type = 1, message = null, force)
|
||||
if(!(container && istype(container, /obj/item/mmi)))//No MMI, no emotes
|
||||
return
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
to_chat(src, "alarm, alert, notice, flash,blink, whistle, beep, boop")
|
||||
|
||||
if(message && !stat)
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
@@ -109,7 +109,7 @@
|
||||
adjustBruteLoss(3)
|
||||
else
|
||||
if(T)
|
||||
T.add_vomit_floor(src)
|
||||
T.add_vomit_floor()
|
||||
nutrition -= lost_nutrition
|
||||
if(stun)
|
||||
adjustToxLoss(-3)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(can_die() && !gibbed && deathgasp_on_death)
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD
|
||||
emote("deathgasp", force = TRUE) //let the world KNOW WE ARE DEAD
|
||||
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null,var/force)
|
||||
/mob/living/carbon/human/emote(act, m_type = 1, message = null, force)
|
||||
|
||||
if((stat == DEAD) || (status_flags & FAKEDEATH))
|
||||
return // No screaming bodies
|
||||
@@ -13,22 +13,22 @@
|
||||
if(muzzled)
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
if(M.mute == MUZZLE_MUTE_NONE)
|
||||
muzzled = 0 //Not all muzzles block sound
|
||||
muzzled = FALSE //Not all muzzles block sound
|
||||
if(!can_speak())
|
||||
muzzled = 1
|
||||
muzzled = TRUE
|
||||
//var/m_type = 1
|
||||
|
||||
for(var/obj/item/implant/I in src)
|
||||
if(I.implanted)
|
||||
I.trigger(act, src)
|
||||
I.trigger(act, src, force)
|
||||
|
||||
var/miming = 0
|
||||
var/miming = FALSE
|
||||
if(mind)
|
||||
miming = mind.miming
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
//handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = FALSE
|
||||
act = lowertext(act)
|
||||
switch(act)
|
||||
//Cooldown-inducing emotes
|
||||
@@ -61,16 +61,16 @@
|
||||
else
|
||||
return
|
||||
if("squish", "squishes")
|
||||
var/found_slime_bodypart = 0
|
||||
var/found_slime_bodypart = FALSE
|
||||
|
||||
if(isslimeperson(src)) //Only Slime People can squish
|
||||
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm'
|
||||
found_slime_bodypart = 1
|
||||
found_slime_bodypart = TRUE
|
||||
else
|
||||
for(var/obj/item/organ/external/L in bodyparts) // if your limbs are squishy you can squish too!
|
||||
if(istype(L.dna.species, /datum/species/slime))
|
||||
on_CD = handle_emote_CD()
|
||||
found_slime_bodypart = 1
|
||||
found_slime_bodypart = TRUE
|
||||
break
|
||||
|
||||
if(!found_slime_bodypart) //Everyone else fails, skip the emote attempt
|
||||
@@ -118,9 +118,9 @@
|
||||
on_CD = handle_emote_CD()
|
||||
//Everything else, including typos of the above emotes
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
on_CD = FALSE //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
if(!force && on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
|
||||
switch(act)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/slime/emote(act, m_type = 1, message = null)
|
||||
/mob/living/carbon/slime/emote(act, m_type = 1, message = null, force)
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
//param = copytext(act, t1 + 1, length(act) + 1)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
SetLoseBreath(0)
|
||||
|
||||
if(!gibbed && deathgasp_on_death)
|
||||
emote("deathgasp")
|
||||
emote("deathgasp", force = TRUE)
|
||||
|
||||
if(mind && suiciding)
|
||||
mind.suicided = TRUE
|
||||
|
||||
@@ -275,7 +275,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
/mob/living/proc/GetVoice()
|
||||
return name
|
||||
|
||||
/mob/living/emote(var/act, var/type, var/message) //emote code is terrible, this is so that anything that isn't already snowflaked to shit can call the parent and handle emoting sanely
|
||||
/mob/living/emote(act, type, message, force) //emote code is terrible, this is so that anything that isn't already snowflaked to shit can call the parent and handle emoting sanely
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (Muted).</span>")
|
||||
@@ -284,7 +284,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(stat)
|
||||
return 0
|
||||
|
||||
if(..(act, type, message))
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(act && type && message) //parent call
|
||||
@@ -306,7 +306,8 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return 1
|
||||
|
||||
else //everything else failed, emote is probably invalid
|
||||
if(act == "help") return //except help, because help is handled individually
|
||||
if(act == "help")
|
||||
return //except help, because help is handled individually
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
|
||||
/mob/living/whisper(message as text)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/silicon/emote(var/act, var/m_type=1, var/message = null)
|
||||
/mob/living/silicon/emote(act, m_type=1, message = null, force)
|
||||
var/param = null
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
@@ -6,7 +6,7 @@
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
//handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
act = lowertext(act)
|
||||
switch(act)
|
||||
@@ -20,7 +20,7 @@
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
if(!force && on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
@@ -78,4 +78,4 @@
|
||||
if("help")
|
||||
to_chat(src, "yes, no, beep, ping, buzz, scream, buzz2")
|
||||
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/mob/living/silicon/pai/emote(var/act, var/m_type=1, var/message = null)
|
||||
..(act, m_type, message)
|
||||
@@ -57,12 +57,6 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
usr << browse(null, "window=findPai")
|
||||
|
||||
|
||||
if(candidate)
|
||||
if(candidate.key && usr.key && candidate.key != usr.key)
|
||||
message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
|
||||
log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
|
||||
return
|
||||
|
||||
if("signup" in href_list)
|
||||
var/mob/dead/observer/O = locate(href_list["signup"])
|
||||
if(!O)
|
||||
@@ -75,6 +69,11 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
recruitWindow(O)
|
||||
return
|
||||
|
||||
if(candidate)
|
||||
if(candidate.key && usr.key && candidate.key != usr.key)
|
||||
message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
|
||||
log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
|
||||
return
|
||||
|
||||
if(href_list["new"])
|
||||
var/option = href_list["option"]
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/mob/living/silicon/robot/death(gibbed)
|
||||
if(can_die())
|
||||
if(!gibbed && deathgasp_on_death)
|
||||
emote("deathgasp")
|
||||
emote("deathgasp", force = TRUE)
|
||||
|
||||
if(module)
|
||||
module.handle_death(gibbed)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/silicon/robot/emote(var/act, var/m_type=1, var/message = null)
|
||||
/mob/living/silicon/robot/emote(act, m_type=1, message = null, force)
|
||||
var/param = null
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
@@ -6,7 +6,7 @@
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
//proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
//handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
act = lowertext(act)
|
||||
switch(act)
|
||||
@@ -17,7 +17,7 @@
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
if(!force && on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
if("help")
|
||||
to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt")
|
||||
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/verb/powerwarn()
|
||||
set category = "Robot Commands"
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/emote(var/act, var/type, var/message)
|
||||
/mob/living/silicon/ai/emote(act, type, message, force)
|
||||
var/obj/machinery/hologram/holopad/T = current
|
||||
if(istype(T) && T.masters[src])//Is the AI using a holopad?
|
||||
src.holopad_emote(message)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(!register_alarms)
|
||||
return
|
||||
|
||||
var/list/register_to = list(atmosphere_alarm, burglar_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
var/list/register_to = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
|
||||
for(var/datum/alarm_handler/AH in register_to)
|
||||
AH.register(src, /mob/living/silicon/proc/receive_alarm)
|
||||
queued_alarms[AH] = list() // Makes sure alarms remain listed in consistent order
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/simple_animal/bot/emote(act, m_type=1, message = null)
|
||||
/mob/living/simple_animal/bot/emote(act, m_type = 1, message = null, force)
|
||||
var/param = null
|
||||
if(findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
@@ -9,7 +9,7 @@
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
//proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
//handle_emote_CD() located in [code\modules\mob\emote.dm]
|
||||
var/on_CD = 0
|
||||
act = lowertext(act)
|
||||
switch(act)
|
||||
@@ -22,7 +22,7 @@
|
||||
else
|
||||
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
|
||||
|
||||
if(on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
if(!force && on_CD == 1) // Check if we need to suppress the emote attempt.
|
||||
return // Suppress emote, you're still cooling off.
|
||||
//--FalseIncarnate
|
||||
|
||||
@@ -71,4 +71,4 @@
|
||||
|
||||
if("help")
|
||||
to_chat(src, "scream(s), yes, no, beep, buzz, ping")
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
|
||||
/mob/living/simple_animal/pet/cat/emote(act, m_type=1, message = null)
|
||||
/mob/living/simple_animal/pet/cat/emote(act, m_type = 1, message = null, force)
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -163,9 +163,9 @@
|
||||
else
|
||||
on_CD = 0
|
||||
|
||||
if(on_CD == 1)
|
||||
if(!force && on_CD == 1)
|
||||
return
|
||||
|
||||
|
||||
switch(act)
|
||||
if("meow")
|
||||
message = "<B>[src]</B> [pick(emote_hear)]!"
|
||||
@@ -225,9 +225,9 @@
|
||||
maxHealth = 50
|
||||
harm_intent_damage = 10
|
||||
butcher_results = list(
|
||||
/obj/item/organ/internal/brain = 1,
|
||||
/obj/item/organ/internal/heart = 1,
|
||||
/obj/item/reagent_containers/food/snacks/birthdaycakeslice = 3,
|
||||
/obj/item/organ/internal/brain = 1,
|
||||
/obj/item/organ/internal/heart = 1,
|
||||
/obj/item/reagent_containers/food/snacks/birthdaycakeslice = 3,
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab = 2
|
||||
)
|
||||
response_harm = "takes a bite out of"
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
name = "Definitely Not [real_name]"
|
||||
desc = "That's Definitely Not [real_name]"
|
||||
valid = 1
|
||||
|
||||
|
||||
if(/obj/item/clothing/head/beret/centcom/officer, /obj/item/clothing/head/beret/centcom/officer/navy)
|
||||
name = "Blueshield [real_name]"
|
||||
desc = "Will stand by you until the bitter end."
|
||||
@@ -407,7 +407,7 @@
|
||||
playsound(src, yelp_sound, 75, 1)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/corgi/emote(act, m_type=1, message = null)
|
||||
/mob/living/simple_animal/pet/corgi/emote(act, m_type = 1, message = null, force)
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -421,9 +421,9 @@
|
||||
else
|
||||
on_CD = 0
|
||||
|
||||
if(on_CD == 1)
|
||||
if(!force && on_CD == 1)
|
||||
return
|
||||
|
||||
|
||||
switch(act)
|
||||
if("bark")
|
||||
message = "<B>[src]</B> [pick(src.speak_emote)]!"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/datum/action/innate/diona/merge/Activate()
|
||||
var/mob/living/simple_animal/diona/user = owner
|
||||
user.merge()
|
||||
|
||||
|
||||
/datum/action/innate/diona/evolve
|
||||
name = "Evolve"
|
||||
icon_icon = 'icons/obj/cloning.dmi'
|
||||
@@ -109,7 +109,7 @@
|
||||
forceMove(M)
|
||||
else
|
||||
get_scooped(M)
|
||||
else
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/diona/proc/merge()
|
||||
@@ -151,7 +151,7 @@
|
||||
to_chat(loc, "You feel a pang of loss as [src] splits away from your biomass.")
|
||||
to_chat(src, "You wiggle out of the depths of [loc]'s biomass and plop to the ground.")
|
||||
forceMove(T)
|
||||
|
||||
|
||||
var/hasMobs = FALSE
|
||||
for(var/atom/A in D.contents)
|
||||
if(istype(A, /mob/) || istype(A, /obj/item/holder))
|
||||
@@ -163,9 +163,9 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/diona/proc/evolve()
|
||||
if(stat != CONSCIOUS)
|
||||
if(stat != CONSCIOUS)
|
||||
return FALSE
|
||||
|
||||
|
||||
if(donors.len < evolve_donors)
|
||||
to_chat(src, "<span class='warning'>You need more blood in order to ascend to a new state of consciousness...</span>")
|
||||
return FALSE
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
if(isdiona(loc) && !split()) //if it's merged with diona, needs to able to split before evolving
|
||||
return FALSE
|
||||
|
||||
|
||||
visible_message("<span class='danger'>[src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.</span>","<span class='danger'>You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.</span>")
|
||||
|
||||
var/mob/living/carbon/human/diona/adult = new(get_turf(loc))
|
||||
@@ -202,14 +202,14 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/diona/proc/steal_blood()
|
||||
if(stat != CONSCIOUS)
|
||||
/mob/living/simple_animal/diona/proc/steal_blood()
|
||||
if(stat != CONSCIOUS)
|
||||
return FALSE
|
||||
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/human/H in oview(1,src))
|
||||
if(Adjacent(H) && H.dna && !(NO_BLOOD in H.dna.species.species_traits))
|
||||
choices += H
|
||||
choices += H
|
||||
|
||||
if(!choices.len)
|
||||
to_chat(src, "<span class='warning'>No suitable blood donors nearby.</span>")
|
||||
@@ -260,7 +260,7 @@
|
||||
to_chat(src, "<span class='warning'>You don't have any hands!</span>")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/diona/emote(act, m_type=1, message = null)
|
||||
/mob/living/simple_animal/diona/emote(act, m_type = 1, message = null, force)
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
else
|
||||
on_CD = 0
|
||||
|
||||
if(on_CD == 1)
|
||||
if(!force && on_CD == 1)
|
||||
return
|
||||
|
||||
switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain.
|
||||
@@ -283,4 +283,4 @@
|
||||
if("help")
|
||||
to_chat(src, "scream, chirp")
|
||||
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
@@ -299,7 +299,7 @@ var/global/chicken_count = 0
|
||||
E.pixel_y = rand(-6,6)
|
||||
if(eggsFertile)
|
||||
if(chicken_count < MAX_CHICKENS && prob(25))
|
||||
processing_objects.Add(E)
|
||||
START_PROCESSING(SSobj, E)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/egg/var/amount_grown = 0
|
||||
/obj/item/reagent_containers/food/snacks/egg/process()
|
||||
@@ -308,10 +308,10 @@ var/global/chicken_count = 0
|
||||
if(amount_grown >= 100)
|
||||
visible_message("[src] hatches with a quiet cracking sound.")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/pig
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(client)
|
||||
client.time_died_as_mouse = world.time
|
||||
|
||||
/mob/living/simple_animal/mouse/emote(act, m_type=1, message = null)
|
||||
/mob/living/simple_animal/mouse/emote(act, m_type = 1, message = null, force)
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
else
|
||||
on_CD = 0
|
||||
|
||||
if(on_CD == 1)
|
||||
if(!force && on_CD == 1)
|
||||
return
|
||||
|
||||
switch(act)
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
adjustBruteLoss(20)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/emote(var/act, var/m_type=1, var/message = null)
|
||||
/mob/living/simple_animal/emote(act, m_type = 1, message = null, force)
|
||||
if(stat)
|
||||
return
|
||||
act = lowertext(act)
|
||||
@@ -269,7 +269,7 @@
|
||||
if("help")
|
||||
to_chat(src, "scream")
|
||||
|
||||
..(act, m_type, message)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
|
||||
@@ -1178,12 +1178,11 @@ var/list/slot_equipment_priority = list( \
|
||||
if(green)
|
||||
if(!no_text)
|
||||
visible_message("<span class='warning'>[src] vomits up some green goo!</span>","<span class='warning'>You vomit up some green goo!</span>")
|
||||
new /obj/effect/decal/cleanable/vomit/green(location)
|
||||
location.add_vomit_floor(FALSE, TRUE)
|
||||
else
|
||||
if(!no_text)
|
||||
visible_message("<span class='warning'>[src] pukes all over [p_them()]self!</span>","<span class='warning'>You puke all over yourself!</span>")
|
||||
location.add_vomit_floor(src, 1)
|
||||
playsound(location, 'sound/effects/splat.ogg', 50, 1)
|
||||
location.add_vomit_floor(TRUE)
|
||||
|
||||
/mob/proc/AddSpell(obj/effect/proc_holder/spell/S)
|
||||
mob_spell_list += S
|
||||
@@ -1301,6 +1300,7 @@ var/list/slot_equipment_priority = list( \
|
||||
.["Show player panel"] = "?_src_=vars;mob_player_panel=[UID()]"
|
||||
|
||||
.["Give Spell"] = "?_src_=vars;give_spell=[UID()]"
|
||||
.["Give Martial Art"] = "?_src_=vars;givemartialart=[UID()]"
|
||||
.["Give Disease"] = "?_src_=vars;give_disease=[UID()]"
|
||||
.["Toggle Godmode"] = "?_src_=vars;godmode=[UID()]"
|
||||
.["Toggle Build Mode"] = "?_src_=vars;build_mode=[UID()]"
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
return verb
|
||||
|
||||
|
||||
/mob/proc/emote(var/act, var/type, var/message)
|
||||
/mob/proc/emote(act, type, message, force)
|
||||
if(act == "me")
|
||||
return custom_emote(type, message)
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
var/current = prefix_locations[i] // ["Common", keypos]
|
||||
|
||||
// There are a few things that will make us want to ignore all other languages in - namely, HIVEMIND languages.
|
||||
var/datum/language/L = current[1]
|
||||
var/datum/language/L = current[1]
|
||||
if(L && L.flags & HIVEMIND)
|
||||
. = new /datum/multilingual_say_piece(L, trim(strip_prefixes(message)))
|
||||
break
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(!physical)
|
||||
physical = src
|
||||
..()
|
||||
processing_objects += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
all_components = list()
|
||||
idle_threads = list()
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
all_components.Remove(CH.device_type)
|
||||
qdel(CH)
|
||||
physical = null
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/New()
|
||||
..()
|
||||
alarm_handlers = list(atmosphere_alarm, fire_alarm, power_alarm)
|
||||
alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm)
|
||||
for(var/datum/alarm_handler/AH in alarm_handlers)
|
||||
AH.register(src, /datum/computer_file/program/alarm_monitor/proc/update_icon)
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
/datum/nano_module/alarm_monitor/all/New()
|
||||
..()
|
||||
alarm_handlers = list(atmosphere_alarm, burglar_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
|
||||
|
||||
/datum/nano_module/alarm_monitor/engineering/New()
|
||||
..()
|
||||
alarm_handlers = list(atmosphere_alarm, fire_alarm, power_alarm)
|
||||
alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm)
|
||||
|
||||
/datum/nano_module/alarm_monitor/security/New()
|
||||
..()
|
||||
alarm_handlers = list(burglar_alarm, camera_alarm, motion_alarm)
|
||||
alarm_handlers = list(SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.motion_alarm)
|
||||
|
||||
/datum/nano_module/alarm_monitor/proc/register(var/object, var/procName)
|
||||
for(var/datum/alarm_handler/AH in alarm_handlers)
|
||||
|
||||
@@ -506,7 +506,7 @@ nanoui is used to open and update nano browser uis
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/process(update = 0)
|
||||
/datum/nanoui/process(update = 0)
|
||||
if(!src_object || !user)
|
||||
close()
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/obj/item/paper/attack_self(mob/living/user as mob)
|
||||
user.examinate(src)
|
||||
if(rigged && (holiday_master.holidays && holiday_master.holidays[APRIL_FOOLS]))
|
||||
if(rigged && (SSholiday.holidays && SSholiday.holidays[APRIL_FOOLS]))
|
||||
if(spam_flag == 0)
|
||||
spam_flag = 1
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
@@ -621,11 +621,11 @@
|
||||
|
||||
/obj/item/paper/evilfax/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/paper/evilfax/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(mytarget && !used)
|
||||
var/mob/living/carbon/target = mytarget
|
||||
target.ForceContractDisease(new /datum/disease/transformation/corgi(0))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
papers.Remove(P)
|
||||
else
|
||||
P = new /obj/item/paper
|
||||
if(holiday_master.holidays && holiday_master.holidays[APRIL_FOOLS])
|
||||
if(SSholiday.holidays && SSholiday.holidays[APRIL_FOOLS])
|
||||
if(prob(30))
|
||||
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
|
||||
P.rigged = 1
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/start()
|
||||
..()
|
||||
processing_objects.Add(pda)
|
||||
START_PROCESSING(SSobj, pda)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/stop()
|
||||
..()
|
||||
disconnect("Program Terminated")
|
||||
processing_objects.Remove(pda)
|
||||
STOP_PROCESSING(SSobj, pda)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/scan_nearby()
|
||||
if(!SSmob_hunt || !connected)
|
||||
|
||||
@@ -1173,14 +1173,14 @@
|
||||
environ = autoset(environ, 1)
|
||||
autoflag = 3
|
||||
if(report_power_alarm)
|
||||
power_alarm.clearAlarm(loc, src)
|
||||
SSalarms.power_alarm.clearAlarm(loc, src)
|
||||
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
|
||||
if(autoflag != 2)
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
if(report_power_alarm)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 2
|
||||
else if(cell.charge < 750 && cell.charge > 10) // <15%, turn off lighting & equipment
|
||||
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
|
||||
@@ -1188,7 +1188,7 @@
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
if(report_power_alarm)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 1
|
||||
else if(cell.charge <= 0) // zero charge, turn all off
|
||||
if(autoflag != 0)
|
||||
@@ -1196,7 +1196,7 @@
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
if(report_power_alarm)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 0
|
||||
|
||||
// now trickle-charge the cell
|
||||
@@ -1254,7 +1254,7 @@
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
if(report_power_alarm)
|
||||
power_alarm.triggerAlarm(loc, src)
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
autoflag = 0
|
||||
|
||||
// update icon & area power if anything changed
|
||||
@@ -1353,6 +1353,11 @@
|
||||
L.broken(0, 1)
|
||||
stoplag()
|
||||
|
||||
/obj/machinery/power/apc/proc/null_charge()
|
||||
for(var/obj/machinery/light/L in area)
|
||||
L.broken(0, 1)
|
||||
stoplag()
|
||||
|
||||
/obj/machinery/power/apc/proc/setsubsystem(val)
|
||||
if(cell && cell.charge > 0)
|
||||
return (val==1) ? 0 : val
|
||||
|
||||
@@ -21,23 +21,23 @@
|
||||
|
||||
/obj/item/stock_parts/cell/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
charge = maxcharge
|
||||
if(ratingdesc)
|
||||
desc += " This one has a power rating of [DisplayPower(maxcharge)], and you should not swallow it."
|
||||
update_icon()
|
||||
|
||||
/obj/item/stock_parts/cell/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("self_recharge")
|
||||
if(var_value)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/stock_parts/cell/process()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
src.energy = starting_energy
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
GLOB.singularities += src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in GLOB.machines)
|
||||
@@ -44,7 +44,7 @@
|
||||
break
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
GLOB.singularities -= src
|
||||
target = null
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
icon_state = "smes"
|
||||
density = 1
|
||||
anchored = 1
|
||||
defer_process = 1
|
||||
|
||||
var/capacity = 5e6 // maximum charge
|
||||
var/charge = 0 // actual charge
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
/obj/item/gun/projectile/automatic/spikethrower/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/projectile/automatic/spikethrower/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/automatic/spikethrower/update_icon()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
power_supply.give(power_supply.maxcharge)
|
||||
update_ammo_types()
|
||||
if(selfcharge)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/proc/update_ammo_types()
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/item/gun/energy/Destroy()
|
||||
if(selfcharge)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process()
|
||||
@@ -167,9 +167,9 @@
|
||||
switch(var_name)
|
||||
if("selfcharge")
|
||||
if(var_value)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/gun/energy/proc/robocharge()
|
||||
|
||||
@@ -340,11 +340,11 @@
|
||||
/obj/item/gun/energy/temperature/New()
|
||||
..()
|
||||
update_icon()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/gun/energy/temperature/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/temperature/newshot()
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
if(can_charge)
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
/obj/item/gun/medbeam/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/medbeam/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/medbeam/handle_suicide()
|
||||
|
||||
@@ -16,7 +16,7 @@ var/const/INGEST = 2
|
||||
/datum/reagents/New(maximum = 100)
|
||||
maximum_volume = maximum
|
||||
if(!(flags & REAGENT_NOREACT))
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
if(!GLOB.chemical_reagents_list)
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
@@ -333,9 +333,9 @@ var/const/INGEST = 2
|
||||
od_chems.Add(R.id)
|
||||
return od_chems
|
||||
|
||||
/datum/reagents/proc/process()
|
||||
/datum/reagents/process()
|
||||
if(flags & REAGENT_NOREACT)
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
@@ -346,9 +346,9 @@ var/const/INGEST = 2
|
||||
// Order is important, process() can remove from processing if
|
||||
// the flag is present
|
||||
flags &= ~(REAGENT_NOREACT)
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
flags |= REAGENT_NOREACT
|
||||
|
||||
/*
|
||||
@@ -819,7 +819,7 @@ var/const/INGEST = 2
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
. = ..()
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_LIST(reagent_list)
|
||||
reagent_list = null
|
||||
QDEL_LIST(addiction_list)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
return
|
||||
if(M.mind && M.mind.changeling && M.mind.changeling.regenerating) //no messing with changeling's fake death
|
||||
return
|
||||
M.visible_message("<B>[M]</B> seizes up and falls limp, [M.p_their()] eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary.
|
||||
M.emote("deathgasp")
|
||||
M.status_flags |= FAKEDEATH
|
||||
M.update_stat("fakedeath reagent")
|
||||
M.med_hud_set_health()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
drink_desc = "Vitamins! Yay!"
|
||||
taste_message = "orange juice"
|
||||
|
||||
/datum/reagent/consumable/drink/orangejuicde/on_mob_life(mob/living/M)
|
||||
/datum/reagent/consumable/drink/orangejuice/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
if(prob(30))
|
||||
update_flags |= M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
@@ -89,7 +89,7 @@
|
||||
drink_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place."
|
||||
taste_message = "healthy dietary choices"
|
||||
|
||||
/datum/reagent/consumable/drink/doctors_delight/on_mob_life(mob/living/M)
|
||||
/datum/reagent/consumable/drink/doctor_delight/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
if(prob(20))
|
||||
update_flags |= M.adjustToxLoss(-1, FALSE)
|
||||
|
||||
@@ -905,8 +905,7 @@
|
||||
|
||||
/datum/reagent/vomit/reaction_turf(turf/T, volume)
|
||||
if(volume >= 5 && !isspaceturf(T))
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
|
||||
T.add_vomit_floor()
|
||||
|
||||
/datum/reagent/greenvomit
|
||||
name = "Green vomit"
|
||||
@@ -918,8 +917,7 @@
|
||||
|
||||
/datum/reagent/greenvomit/reaction_turf(turf/T, volume)
|
||||
if(volume >= 5 && !isspaceturf(T))
|
||||
new /obj/effect/decal/cleanable/vomit/green(T)
|
||||
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
|
||||
T.add_vomit_floor(FALSE, TRUE)
|
||||
|
||||
////Lavaland Flora Reagents////
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
/obj/item/reagent_containers/iv_bag/proc/begin_processing(mob/target)
|
||||
injection_target = target
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/iv_bag/proc/end_processing()
|
||||
injection_target = null
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/iv_bag/process()
|
||||
if(!injection_target)
|
||||
|
||||
@@ -90,22 +90,13 @@ var/ert_request_answered = FALSE
|
||||
return 0
|
||||
|
||||
var/index = 1
|
||||
var/ert_spawn_seconds = 120
|
||||
spawn(ert_spawn_seconds * 10) // to account for spawn() using deciseconds
|
||||
var/list/unspawnable_ert = list()
|
||||
for(var/mob/M in response_team_members)
|
||||
if(M)
|
||||
unspawnable_ert |= M
|
||||
if(unspawnable_ert.len)
|
||||
message_admins("ERT SPAWN: The following ERT members could not be spawned within [ert_spawn_seconds] seconds:")
|
||||
for(var/mob/M in unspawnable_ert)
|
||||
message_admins("- Unspawned ERT: [ADMIN_FULLMONTY(M)]")
|
||||
for(var/mob/M in response_team_members)
|
||||
if(index > emergencyresponseteamspawn.len)
|
||||
index = 1
|
||||
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
log_debug("Spawning as ERT: [M.ckey] ([M])")
|
||||
var/client/C = M.client
|
||||
var/mob/living/new_commando = C.create_response_team(emergencyresponseteamspawn[index])
|
||||
if(!M || !new_commando)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
if(src.empcounter > 0)
|
||||
src.empcounter--
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/spacepod/proc/update_icons()
|
||||
if(!pod_overlays)
|
||||
@@ -286,7 +286,7 @@
|
||||
deal_damage(80 / severity)
|
||||
if(empcounter < (40 / severity))
|
||||
empcounter = 40 / severity
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
change_meteor_chance(0.5)
|
||||
|
||||
/obj/machinery/satellite/meteor_shield/proc/change_meteor_chance(mod)
|
||||
for(var/datum/event_container/container in event_manager.event_containers)
|
||||
for(var/datum/event_container/container in SSevents.event_containers)
|
||||
for(var/datum/event_meta/M in container.available_events)
|
||||
if(M.event_type == /datum/event/meteor_wave)
|
||||
M.weight *= mod
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
/obj/item/organ/internal/body_egg/insert(var/mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
owner.status_flags |= XENO_HOST
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
owner.med_hud_set_status()
|
||||
spawn(0)
|
||||
AddInfectionImages(owner)
|
||||
|
||||
/obj/item/organ/internal/body_egg/remove(var/mob/living/carbon/M, special = 0)
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(owner)
|
||||
owner.status_flags &= ~(XENO_HOST)
|
||||
owner.med_hud_set_status()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(owner)
|
||||
remove(owner, 1)
|
||||
QDEL_LIST_ASSOC_VAL(autopsy_data)
|
||||
@@ -84,7 +84,7 @@
|
||||
/obj/item/organ/proc/necrotize(update_sprite = TRUE)
|
||||
damage = max_damage
|
||||
status |= ORGAN_DEAD
|
||||
processing_objects -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(dead_icon && !is_robotic())
|
||||
icon_state = dead_icon
|
||||
if(owner && vital)
|
||||
@@ -189,7 +189,7 @@
|
||||
else
|
||||
status = 0
|
||||
if(!owner)
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/organ/proc/is_damaged()
|
||||
return damage > 0
|
||||
@@ -295,7 +295,7 @@
|
||||
if(affected) affected.internal_organs -= src
|
||||
|
||||
loc = get_turf(owner)
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
|
||||
add_attack_logs(user, owner, "Removed vital organ ([src])", !!user ? ATKLOG_FEW : ATKLOG_ALL)
|
||||
|
||||
@@ -286,7 +286,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
owner.updatehealth("limb rejuvenate")
|
||||
update_icon()
|
||||
if(!owner)
|
||||
processing_objects |= src
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/****************************************************
|
||||
PROCESSING & UPDATING
|
||||
|
||||
@@ -193,10 +193,10 @@
|
||||
|
||||
/obj/item/organ/internal/shadowtumor/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/organ/internal/shadowtumor/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/shadowtumor/process()
|
||||
|
||||
@@ -137,10 +137,10 @@ var/list/GPS_list = list()
|
||||
for marking the area around the transition edges."
|
||||
var/list/turf/tagged
|
||||
|
||||
/obj/item/gps/visible_debug/New()
|
||||
/obj/item/gps/visible_debug/Initialize(mapload)
|
||||
. = ..()
|
||||
tagged = list()
|
||||
GLOB.fast_processing.Add(src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/gps/visible_debug/process()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -161,5 +161,5 @@ var/list/GPS_list = list()
|
||||
if(tagged)
|
||||
clear()
|
||||
tagged = null
|
||||
GLOB.fast_processing.Remove(src)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user