This commit is contained in:
LetterJay
2017-05-05 10:21:53 -05:00
parent d0e6790993
commit 1bb43eb7ae
8 changed files with 0 additions and 312 deletions
@@ -1,9 +0,0 @@
diff a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm (rejected hunks)
@@ -725,7 +725,6 @@ var/datum/controller/subsystem/garbage_collector/SSgarbage
SearchVar(multiverse)
SearchVar(announcement_systems)
SearchVar(doppler_arrays)
- SearchVar(HOLOPAD_MODE)
SearchVar(holopads)
SearchVar(news_network)
SearchVar(allCasters)
-25
View File
@@ -1,25 +0,0 @@
diff a/code/datums/antagonists/datum_cult.dm b/code/datums/antagonists/datum_cult.dm (rejected hunks)
@@ -5,13 +5,20 @@
qdel(communion)
return ..()
+/datum/antagonist/cult/can_be_owned(datum/mind/new_owner)
+ . = ..()
+ if(.)
+ . = is_convertable_to_cult(new_owner.current)
+
/datum/antagonist/cult/on_gain()
. = ..()
- if(!owner)
- return
+ SSticker.mode.cult += owner
+ SSticker.mode.update_cult_icons_added(owner)
+ if(istype(SSticker.mode, /datum/game_mode/cult))
+ var/datum/game_mode/cult/C = SSticker.mode
+ C.memorize_cult_objectives(owner)
if(jobban_isbanned(owner.current, ROLE_CULTIST))
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner.current, ROLE_CULTIST, ROLE_CULTIST), 0)
- SSticker.mode.update_cult_icons_added(owner)
owner.current.log_message("<font color=#960000>Has been converted to the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
/datum/antagonist/cult/apply_innate_effects(mob/living/mob_override)
-226
View File
@@ -1,226 +0,0 @@
diff a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm (rejected hunks)
@@ -26,16 +26,12 @@ Possible to do for anyone motivated enough:
#define HOLOPAD_PASSIVE_POWER_USAGE 1
#define HOLOGRAM_POWER_USAGE 2
-#define RANGE_BASED 4
-#define AREA_BASED 6
-
-var/const/HOLOPAD_MODE = RANGE_BASED
var/list/holopads = list()
/obj/machinery/holopad
- name = "\improper AI holopad"
- desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
+ name = "Holopad"
+ desc = "It's a floor-mounted device for projecting holographic images."
icon_state = "holopad0"
layer = LOW_OBJ_LAYER
flags = HEAR
@@ -48,10 +44,13 @@ var/list/holopads = list()
obj_integrity = 300
max_integrity = 300
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0)
- var/list/masters = list()//List of AIs that use the holopad
+ var/list/masters = list()//List of living mobs that use the holopad
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
var/temp = ""
+ var/list/holo_calls //array of /datum/holocalls
+ var/datum/holocall/outgoing_call //do not modify the datums only check and call the public procs
+ var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
/obj/machinery/holopad/Initialize()
..()
@@ -94,20 +101,60 @@ var/list/holopads = list()
return
return ..()
+/obj/machinery/holopad/proc/CheckCallClose()
+ for(var/I in holo_calls)
+ var/datum/holocall/HC = I
+ if(usr == HC.eye)
+ HC.Disconnect(HC.calling_holopad) //disconnect via clicking the called holopad
+ return TRUE
+ return FALSE
+
+/obj/machinery/holopad/Click(location,control,params)
+ if(!CheckCallClose())
+ return ..()
+
/obj/machinery/holopad/AltClick(mob/living/carbon/human/user)
- interact(user)
+ if(!CheckCallClose())
+ interact(user)
/obj/machinery/holopad/interact(mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
- if(user.stat || stat & (NOPOWER|BROKEN))
+ if(user.incapacitated() || !is_operational())
+ return
+
+ if(outgoing_call) //someone is making a call, leave them be
return
+
user.set_machine(src)
var/dat
if(temp)
dat = temp
else
- dat = "<A href='?src=\ref[src];AIrequest=1'>request an AI's presence.</A>"
+ dat = "<a href='?src=\ref[src];AIrequest=1'>Request an AI's presence.</a><br>"
+ dat += "<a href='?src=\ref[src];Holocall=1'>Call another holopad.</a><br>"
+
+ if(LAZYLEN(holo_calls))
+ dat += "=====================================================<br>"
+
+ var/one_answered_call = FALSE
+ var/one_unanswered_call = FALSE
+ for(var/I in holo_calls)
+ var/datum/holocall/HC = I
+ if(HC.connected_holopad != src)
+ dat += "<a href='?src=\ref[src];connectcall=\ref[HC]'>Answer call from [get_area(HC.calling_holopad)].</a><br>"
+ one_unanswered_call = TRUE
+ else
+ one_answered_call = TRUE
+
+ if(one_answered_call && one_unanswered_call)
+ dat += "=====================================================<br>"
+ //we loop twice for formatting
+ for(var/I in holo_calls)
+ var/datum/holocall/HC = I
+ if(HC.connected_holopad == src)
+ dat += "<a href='?src=\ref[src];disconnectcall=\ref[HC]'>Disconnect call from [HC.user].</a><br>"
+
var/datum/browser/popup = new(user, "holopad", name, 300, 130)
popup.set_content(dat)
@@ -115,7 +162,10 @@ var/list/holopads = list()
popup.open()
/obj/machinery/holopad/Topic(href, href_list)
- if(..())
+ if(..() || isAI(usr))
+ return
+ add_fingerprint(usr)
+ if(!is_operational())
return
if (href_list["AIrequest"])
if(last_request + 200 < world.time)
@@ -194,59 +317,81 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
for(var/mob/living/silicon/ai/master in masters)
if(masters[master] && speaker != master)
master.relay_speech(message, speaker, message_langs, raw_message, radio_freq, spans)
+
+ for(var/I in holo_calls)
+ var/datum/holocall/HC = I
+ if(HC.connected_holopad == src && speaker != HC.hologram)
+ HC.user.Hear(message, speaker, message_langs, raw_message, radio_freq, spans)
+
+ if(outgoing_call && speaker == outgoing_call.user)
+ outgoing_call.hologram.say(raw_message)
+
+/obj/machinery/holopad/proc/SetLightsAndPower()
+ var/total_users = masters.len + LAZYLEN(holo_calls)
+ use_power = HOLOPAD_PASSIVE_POWER_USAGE + HOLOGRAM_POWER_USAGE * total_users
+ if(total_users)
+ set_light(2)
+ icon_state = "holopad1"
+ else
+ set_light(0)
+ icon_state = "holopad0"
-/obj/machinery/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc)
- var/obj/effect/overlay/holo_pad_hologram/h = new(T)//Spawn a blank effect at the location.
- h.icon = A.holo_icon
- h.mouse_opacity = 0//So you can't click on it.
- h.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
- h.anchored = 1//So space wind cannot drag it.
- h.name = "[A.name] (Hologram)"//If someone decides to right click.
- h.set_light(2) //hologram lighting
- set_holo(A, h)
- return TRUE
-
-/obj/machinery/holopad/proc/set_holo(mob/living/silicon/ai/A, var/obj/effect/overlay/holo_pad_hologram/h)
- masters[A] = h
- set_light(2) // pad lighting
- icon_state = "holopad1"
- A.current = src
- use_power += HOLOGRAM_POWER_USAGE
+/obj/machinery/holopad/proc/set_holo(mob/living/user, var/obj/effect/overlay/holo_pad_hologram/h)
+ masters[user] = h
+ var/mob/living/silicon/ai/AI = user
+ if(istype(AI))
+ AI.current = src
+ SetLightsAndPower()
return TRUE
-/obj/machinery/holopad/proc/clear_holo(mob/living/silicon/ai/user)
+/obj/machinery/holopad/proc/clear_holo(mob/living/user)
qdel(masters[user]) // Get rid of user's hologram
unset_holo(user)
return TRUE
-/obj/machinery/holopad/proc/unset_holo(mob/living/silicon/ai/user)
- if(user.current == src)
- user.current = null
+/obj/machinery/holopad/proc/unset_holo(mob/living/user)
+ var/mob/living/silicon/ai/AI = user
+ if(istype(AI) && AI.current == src)
+ AI.current = null
masters -= user // Discard AI from the list of those who use holopad
- use_power = max(HOLOPAD_PASSIVE_POWER_USAGE, use_power - HOLOGRAM_POWER_USAGE)//Reduce power usage
- if (!masters.len) // If no users left
- set_light(0) // pad lighting (hologram lighting will be handled automatically since its owner was deleted)
- icon_state = "holopad0"
- use_power = HOLOPAD_PASSIVE_POWER_USAGE
+ SetLightsAndPower()
return TRUE
-/obj/machinery/holopad/proc/move_hologram(mob/living/silicon/ai/user)
+/obj/machinery/holopad/proc/move_hologram(mob/living/user, turf/new_turf)
if(masters[user])
- step_to(masters[user], user.eyeobj)
var/obj/effect/overlay/holo_pad_hologram/H = masters[user]
- H.loc = get_turf(user.eyeobj)
+ step_to(H, new_turf)
+ H.loc = new_turf
+ var/area/holo_area = get_area(src)
+ var/area/eye_area = new_turf.loc
+
+ if(!(eye_area in holo_area.related))
+ clear_holo(user)
return TRUE
+/obj/effect/overlay/holo_pad_hologram
+ var/mob/living/Impersonation
+ var/datum/holocall/HC
+
+/obj/effect/overlay/holo_pad_hologram/Destroy()
+ Impersonation = null
+ if(HC)
+ HC.Disconnect(HC.calling_holopad)
+ return ..()
+
/obj/effect/overlay/holo_pad_hologram/Process_Spacemove(movement_dir = 0)
return 1
+/obj/effect/overlay/holo_pad_hologram/examine(mob/user)
+ if(Impersonation)
+ return Impersonation.examine(user)
+ return ..()
+
/obj/item/weapon/circuitboard/machine/holopad
name = "AI Holopad (Machine Board)"
build_path = /obj/machinery/holopad
origin_tech = "programming=1"
req_components = list(/obj/item/weapon/stock_parts/capacitor = 1)
-#undef RANGE_BASED
-#undef AREA_BASED
#undef HOLOPAD_PASSIVE_POWER_USAGE
-#undef HOLOGRAM_POWER_USAGE
+#undef HOLOGRAM_POWER_USAGE
\ No newline at end of file
-10
View File
@@ -1,10 +0,0 @@
diff a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm (rejected hunks)
@@ -8,7 +8,7 @@
if(href_list["ahelp"])
if(!check_rights(R_ADMIN))
return
-
+
var/ahelp_ref = href_list["ahelp"]
var/datum/admin_help/AH = locate(ahelp_ref)
if(AH)
-10
View File
@@ -1,10 +0,0 @@
diff a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm (rejected hunks)
@@ -19,7 +19,7 @@
if (!msg)
return
- var/static/nicknames = world.file2list("strings/admin_nicknames.txt")
+ var/static/nicknames = world.file2list("config/admin_nicknames.txt")
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
@@ -1,10 +0,0 @@
diff a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm (rejected hunks)
@@ -32,7 +32,7 @@
dna.species.spec_death(gibbed, src)
- if(SSticker && SSticker.mode)
+ if(SSticker.HasRoundStarted())
SSblackbox.ReportDeath(src)
if(mind && mind.devilinfo)
INVOKE_ASYNC(mind.devilinfo, /datum/devilinfo.proc/beginResurrectionCheck, src)
-13
View File
@@ -1,13 +0,0 @@
diff a/code/modules/power/generator.dm b/code/modules/power/generator.dm (rejected hunks)
@@ -64,9 +64,8 @@
else
cut_overlays()
- var/L = min(round(lastgenlev/100000),11)
-
- if(L != 0)
+ var/L = min(round(lastgenlev/100000),11)
+ if(L != 0)
add_overlay(image('icons/obj/power.dmi', "teg-op[L]"))
add_overlay("teg-oc[lastcirc]")