Merge remote-tracking branch 'citadel/master' into actual_ghost_newscasters
This commit is contained in:
@@ -721,7 +721,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
|
||||
/obj/item/pda/proc/remove_id(mob/user)
|
||||
if(issilicon(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(hasSiliconAccessInArea(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
do_remove_id(user)
|
||||
|
||||
@@ -916,7 +916,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
remove_pen()
|
||||
|
||||
/obj/item/pda/proc/toggle_light()
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(fon)
|
||||
fon = FALSE
|
||||
@@ -928,7 +928,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
/obj/item/pda/proc/remove_pen()
|
||||
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
if(inserted_item)
|
||||
|
||||
@@ -609,7 +609,7 @@ Code:
|
||||
/obj/item/cartridge/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
#define HIJACK_APC_MAX_AMOUNT 5
|
||||
|
||||
/obj/item/implant/hijack
|
||||
name = "hijack implant"
|
||||
desc = "Allows you to control the machinery in a room by hacking into the APC."
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate, /datum/action/item_action/removeAPCs, /datum/action/item_action/accessAPCs, /datum/action/item_action/stealthmodetoggle)
|
||||
activated = 1
|
||||
var/toggled = FALSE
|
||||
icon_state = "hijack"
|
||||
var/eye_color
|
||||
var/stealthmode = FALSE
|
||||
var/stealthcooldown = 0
|
||||
var/hijacking = FALSE
|
||||
|
||||
/obj/item/implant/hijack/activate()
|
||||
. = ..()
|
||||
toggled = !toggled
|
||||
imp_in.click_intercept = toggled ? src : null
|
||||
imp_in.siliconaccesstoggle = toggled ? TRUE : FALSE
|
||||
to_chat(imp_in,"<span class='notice'>You turn [toggled ? "on" : "off"] [src]'s silicon interactions.</span>")
|
||||
toggle_eyes()
|
||||
|
||||
/obj/item/implant/hijack/proc/toggle_eyes()
|
||||
if (!ishuman(imp_in))
|
||||
return
|
||||
var/on = toggled && !stealthmode
|
||||
var/mob/living/carbon/human/H = imp_in
|
||||
H.eye_color = on ? "ff0" : eye_color
|
||||
H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
H.update_body()
|
||||
|
||||
/obj/item/implant/hijack/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
if(..())
|
||||
ADD_TRAIT(target, TRAIT_HIJACKER, "implant")
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
eye_color = H.eye_color
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/removed(mob/target, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
REMOVE_TRAIT(target, TRAIT_HIJACKER, "implant")
|
||||
for (var/area/area in imp_in.siliconaccessareas)
|
||||
imp_in.toggleSiliconAccessArea(area)
|
||||
var/obj/machinery/power/apc/apc = area.get_apc()
|
||||
if (apc)
|
||||
apc.hijacker = null
|
||||
apc.set_hijacked_lighting()
|
||||
apc.update_icon()
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.eye_color = eye_color
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/proc/InterceptClickOn(mob/living/user,params,atom/object)
|
||||
if (isitem(object) || !toggled || user.incapacitated())
|
||||
return
|
||||
if (stealthmode == FALSE && istype(object,/obj/machinery/power/apc) && !user.CanReach(object))
|
||||
if (hijack_remotely(object))
|
||||
return
|
||||
if (stealthmode && !user.CanReach(object))
|
||||
return
|
||||
if (!object.hasSiliconAccessInArea(imp_in))
|
||||
return
|
||||
var/list/modifiers = params2list(params)
|
||||
imp_in.face_atom(object)
|
||||
if (modifiers["shift"] && modifiers["ctrl"])
|
||||
object.AICtrlShiftClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["shift"])
|
||||
object.AIShiftClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["ctrl"])
|
||||
object.AICtrlClick(imp_in)
|
||||
return TRUE
|
||||
if (modifiers["alt"])
|
||||
object.AIAltClick(imp_in)
|
||||
return TRUE
|
||||
if (user.get_active_held_item())
|
||||
return
|
||||
if (user.CanReach(object))
|
||||
object.attack_robot(imp_in)
|
||||
else
|
||||
object.attack_ai(imp_in)
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/hijack/proc/hijack_remotely(obj/machinery/power/apc/apc)
|
||||
if (apc.hijacker || hijacking)
|
||||
return FALSE //can't remotely hijack an already hijacked APC
|
||||
hijacking = TRUE
|
||||
to_chat(imp_in, "<span class='notice'>Establishing remote connection with APC.</span>")
|
||||
if (!do_after(imp_in, 4 SECONDS,target=apc))
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
hijacking = FALSE
|
||||
return TRUE
|
||||
if (LAZYLEN(imp_in.siliconaccessareas) >= HIJACK_APC_MAX_AMOUNT)
|
||||
to_chat(src,"<span class='warning'>You are connected to too many APCs! Too many more will fry your brain.</span>")
|
||||
hijacking = FALSE
|
||||
return TRUE
|
||||
imp_in.light_power = 2
|
||||
imp_in.light_range = 2
|
||||
imp_in.light_color = COLOR_YELLOW
|
||||
imp_in.update_light()
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] starts glowing a with a hollow yellow light!</span>")
|
||||
to_chat(imp_in, "<span class='notice'>Beginning hijack of APC.</span>")
|
||||
if (do_after(imp_in, 21 SECONDS,target=apc))
|
||||
apc.hijacker = imp_in
|
||||
stealthmode = FALSE
|
||||
apc.set_hijacked_lighting()
|
||||
imp_in.toggleSiliconAccessArea(apc.area)
|
||||
apc.update_icon()
|
||||
stealthcooldown = world.time + 1 MINUTES + 30 SECONDS
|
||||
toggle_eyes()
|
||||
else
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
hijacking = FALSE
|
||||
imp_in.light_power = 0
|
||||
imp_in.light_range = 0
|
||||
imp_in.light_color = COLOR_YELLOW
|
||||
imp_in.update_light()
|
||||
return TRUE
|
||||
@@ -74,4 +74,8 @@
|
||||
|
||||
/obj/item/implanter/stealth
|
||||
name = "implanter (stealth)"
|
||||
imp_type = /obj/item/implant/stealth
|
||||
imp_type = /obj/item/implant/stealth
|
||||
|
||||
/obj/item/implanter/hijack
|
||||
name = "implanter (hijack)"
|
||||
imp_type = /obj/item/implant/hijack
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Glass stack types
|
||||
* Contains:
|
||||
* Glass sheets
|
||||
* Plasma glass
|
||||
* Reinforced glass sheets
|
||||
* Reinforced plasma glass
|
||||
* Titanium glass
|
||||
* Plastitanium glass
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
|
||||
@@ -373,4 +377,8 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
throwforce = 11
|
||||
icon_state = "plasmalarge"
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
icon_prefix = "plasma"
|
||||
icon_prefix = "plasma"
|
||||
|
||||
/obj/item/shard/plasma/alien
|
||||
name = "alien shard"
|
||||
desc = "A nasty looking shard of advanced alloy glass."
|
||||
@@ -401,6 +401,8 @@ GLOBAL_LIST_INIT(abductor_recipes, list ( \
|
||||
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 2, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien bar stool", /obj/item/chair/stool/bar/alien, 1, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien stool", /obj/item/chair/stool/alien, 1, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = TRUE
|
||||
ui_interact(M)
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr) || hasSiliconAccessInArea(usr))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = TRUE
|
||||
|
||||
@@ -370,6 +370,43 @@
|
||||
item_state = "stool_bar"
|
||||
origin_type = /obj/structure/chair/stool/bar
|
||||
|
||||
//////////////////////////
|
||||
//Alien(Disco) Stools!////
|
||||
//////////////////////////
|
||||
|
||||
/obj/structure/chair/stool/alien
|
||||
name = "alien stool"
|
||||
desc = "A hard stool made of advanced alien alloy."
|
||||
icon_state = "stoolalien"
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
item_chair = /obj/item/chair/stool/alien
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/abductor
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/chair/stool/bar/alien
|
||||
name = "bronze bar stool"
|
||||
desc = "A hard bar stool made of advanced alien alloy."
|
||||
icon_state = "baralien"
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
item_chair = /obj/item/chair/stool/bar/alien
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/abductor
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/item/chair/stool/alien
|
||||
name = "stool"
|
||||
icon_state = "stoolalien_toppled"
|
||||
item_state = "stoolalien"
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
origin_type = /obj/structure/chair/stool/alien
|
||||
break_chance = 0 //It's too sturdy.
|
||||
|
||||
/obj/item/chair/stool/bar/alien
|
||||
name = "bar stool"
|
||||
icon_state = "baralien_toppled"
|
||||
item_state = "baralien"
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
origin_type = /obj/structure/chair/stool/bar/alien
|
||||
|
||||
//////////////////////////
|
||||
//Brass & Bronze stools!//
|
||||
//////////////////////////
|
||||
|
||||
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
|
||||
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
beeper = !beeper
|
||||
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "on" : "off"].</span>")
|
||||
|
||||
Reference in New Issue
Block a user