Merge branch 'master' into QM-as-Head
This commit is contained in:
@@ -55,6 +55,9 @@
|
||||
/area/ruin/space/has_grav/powered/dinner_for_two
|
||||
name = "Dinner for Two"
|
||||
|
||||
/area/ruin/space/has_grav/powered/cat_man
|
||||
name = "Kitty Den"
|
||||
|
||||
/area/ruin/space/has_grav/powered/authorship
|
||||
name = "Authorship"
|
||||
|
||||
@@ -459,4 +462,8 @@
|
||||
|
||||
/area/ruin/space/has_grav/listeningstation
|
||||
name = "Listening Post"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/ruin/space/has_grav/powered/scp_294
|
||||
name = "Abandoned SCP-294 Containment"
|
||||
icon_state = "yellow"
|
||||
+15
-15
@@ -370,7 +370,7 @@
|
||||
SendSignal(COMSIG_ATOM_EMAG_ACT)
|
||||
|
||||
/atom/proc/rad_act(strength)
|
||||
SendSignal(COMSIG_ATOM_RAD_ACT)
|
||||
SendSignal(COMSIG_ATOM_RAD_ACT, strength)
|
||||
|
||||
/atom/proc/narsie_act()
|
||||
SendSignal(COMSIG_ATOM_NARSIE_ACT)
|
||||
@@ -534,39 +534,39 @@
|
||||
// Tool behavior procedure. Redirects to tool-specific procs by default.
|
||||
// You can override it to catch all tool interactions, for use in complex deconstruction procs.
|
||||
// Just don't forget to return ..() in the end.
|
||||
/atom/proc/tool_act(mob/living/user, obj/item/tool, tool_type)
|
||||
/atom/proc/tool_act(mob/living/user, obj/item/I, tool_type)
|
||||
switch(tool_type)
|
||||
if(TOOL_CROWBAR)
|
||||
return crowbar_act(user, tool)
|
||||
return crowbar_act(user, I)
|
||||
if(TOOL_MULTITOOL)
|
||||
return multitool_act(user, tool)
|
||||
return multitool_act(user, I)
|
||||
if(TOOL_SCREWDRIVER)
|
||||
return screwdriver_act(user, tool)
|
||||
return screwdriver_act(user, I)
|
||||
if(TOOL_WRENCH)
|
||||
return wrench_act(user, tool)
|
||||
return wrench_act(user, I)
|
||||
if(TOOL_WIRECUTTER)
|
||||
return wirecutter_act(user, tool)
|
||||
return wirecutter_act(user, I)
|
||||
if(TOOL_WELDER)
|
||||
return welder_act(user, tool)
|
||||
return welder_act(user, I)
|
||||
|
||||
// Tool-specific behavior procs. To be overridden in subtypes.
|
||||
/atom/proc/crowbar_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/crowbar_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/multitool_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/multitool_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/screwdriver_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/wrench_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/wrench_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/wirecutter_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/wirecutter_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/welder_act(mob/living/user, obj/item/tool)
|
||||
/atom/proc/welder_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/GenerateTag()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -172,7 +172,6 @@
|
||||
name = "Twisted Construction"
|
||||
desc = "<u>A sinister spell used to convert:</u><br>Plasteel into runed metal<br>25 metal into a construct shell<br>Cyborgs directly into constructs<br>Cyborg shells into construct shells<br>Airlocks into runed airlocks (harm intent)"
|
||||
button_icon_state = "transmute"
|
||||
charges = 50
|
||||
magic_path = "/obj/item/melee/blood_magic/construction"
|
||||
|
||||
/datum/action/innate/cult/blood_spell/equipment
|
||||
@@ -180,7 +179,6 @@
|
||||
desc = "A crucial spell that enables you to summon either a ritual dagger or combat gear including armored robes, the nar'sien bola, and an eldritch longsword."
|
||||
button_icon_state = "equip"
|
||||
magic_path = "/obj/item/melee/blood_magic/armor"
|
||||
charges = 1
|
||||
|
||||
/datum/action/innate/cult/blood_spell/equipment/Activate()
|
||||
var/choice = alert(owner,"Choose your equipment type",,"Combat Equipment","Ritual Dagger","Cancel")
|
||||
@@ -271,8 +269,8 @@
|
||||
qdel(src)
|
||||
|
||||
/datum/action/innate/cult/blood_spell/veiling
|
||||
name = "Conceal Runes"
|
||||
desc = "A multi-function spell that alternates between hiding and revealing nearby runes."
|
||||
name = "Conceal Presence"
|
||||
desc = "A multi-function spell that alternates between hiding and revealing nearby cult runes, structures, turf, and airlocks."
|
||||
invocation = "Kla'atu barada nikt'o!"
|
||||
button_icon_state = "gone"
|
||||
charges = 10
|
||||
@@ -291,6 +289,8 @@
|
||||
S.conceal()
|
||||
for(var/turf/open/floor/engine/cult/T in range(5,owner))
|
||||
T.realappearance.alpha = 0
|
||||
for(var/obj/machinery/door/airlock/cult/AL in range(5, owner))
|
||||
AL.conceal()
|
||||
revealing = TRUE
|
||||
name = "Reveal Runes"
|
||||
button_icon_state = "back"
|
||||
@@ -302,10 +302,12 @@
|
||||
SEND_SOUND(owner, sound('sound/magic/enter_blood.ogg',0,1,25))
|
||||
for(var/obj/effect/rune/R in range(7,owner)) //More range in case you weren't standing in exactly the same spot
|
||||
R.reveal()
|
||||
for(var/obj/structure/destructible/cult/S in range(7,owner))
|
||||
for(var/obj/structure/destructible/cult/S in range(6,owner))
|
||||
S.reveal()
|
||||
for(var/turf/open/floor/engine/cult/T in range(7,owner))
|
||||
for(var/turf/open/floor/engine/cult/T in range(6,owner))
|
||||
T.realappearance.alpha = initial(T.realappearance.alpha)
|
||||
for(var/obj/machinery/door/airlock/cult/AL in range(6, owner))
|
||||
AL.reveal()
|
||||
revealing = FALSE
|
||||
name = "Conceal Runes"
|
||||
button_icon_state = "gone"
|
||||
@@ -529,13 +531,13 @@
|
||||
var/turf/T = get_turf(target)
|
||||
if(istype(target, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/candidate = target
|
||||
if(candidate.use(25))
|
||||
uses-=25
|
||||
if(candidate.use(50))
|
||||
uses--
|
||||
to_chat(user, "<span class='warning'>A dark cloud eminates from your hand and swirls around the metal, twisting it into a construct shell!</span>")
|
||||
new /obj/structure/constructshell(T)
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more metal to produce a construct shell!</span>")
|
||||
to_chat(user, "<span class='warning'>You need 50 metal to produce a construct shell!</span>")
|
||||
else if(istype(target, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/candidate = target
|
||||
var/quantity = min(candidate.amount, uses)
|
||||
@@ -563,19 +565,19 @@
|
||||
if("Artificer")
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/builder, candidate, user, 0, T)
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
uses -= 50
|
||||
uses--
|
||||
candidate.mmi = null
|
||||
qdel(candidate)
|
||||
else
|
||||
candidate.color = prev_color
|
||||
else
|
||||
uses -= 50
|
||||
uses--
|
||||
to_chat(user, "<span class='warning'>A dark cloud eminates from you hand and swirls around [candidate] - twisting it into a construct shell!</span>")
|
||||
new /obj/structure/constructshell(T)
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
else if(istype(target,/obj/machinery/door/airlock))
|
||||
target.narsie_act()
|
||||
uses -= 50
|
||||
uses--
|
||||
user.visible_message("<span class='warning'>Black ribbons suddenly eminate from [user]'s hand and cling to the airlock - twisting and corrupting it!</span>")
|
||||
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
|
||||
else
|
||||
@@ -701,7 +703,7 @@
|
||||
if(B.bloodiness == 100) //Bonus for "pristine" bloodpools, also to prevent cheese with footprint spam
|
||||
temp += 30
|
||||
else
|
||||
temp += max((B.bloodiness**2)/800,0.5)
|
||||
temp += max((B.bloodiness**2)/800,1)
|
||||
new /obj/effect/temp_visual/cult/turf/floor(get_turf(B))
|
||||
qdel(B)
|
||||
for(var/obj/effect/decal/cleanable/trail_holder/TH in view(T, 2))
|
||||
|
||||
@@ -173,8 +173,8 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
|
||||
#undef METEOR_MEDAL
|
||||
|
||||
/obj/effect/meteor/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
/obj/effect/meteor/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_MINING)
|
||||
make_debris()
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
//CITADEL EDIT
|
||||
GLOBAL_LIST_EMPTY(objectives)
|
||||
//END EDIT
|
||||
|
||||
/datum/objective
|
||||
var/datum/mind/owner //The primary owner of the objective. !!SOMEWHAT DEPRECATED!! Prefer using 'team' for new code.
|
||||
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
|
||||
@@ -9,6 +13,7 @@
|
||||
var/martyr_compatible = 0 //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
|
||||
|
||||
/datum/objective/New(var/text)
|
||||
GLOB.objectives += src // CITADEL EDIT FOR CRYOPODS
|
||||
if(text)
|
||||
explanation_text = text
|
||||
|
||||
@@ -72,6 +77,8 @@
|
||||
possible_targets = all_possible_targets
|
||||
if(possible_targets.len > 0)
|
||||
target = pick(possible_targets)
|
||||
else
|
||||
target = null//we'd rather have no target than an invalid one // CITADEL EDIT
|
||||
update_explanation_text()
|
||||
return target
|
||||
|
||||
@@ -818,6 +825,3 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
/datum/objective/changeling_team_objective/impersonate_department/impersonate_heads
|
||||
explanation_text = "Have X or more heads of staff escape on the shuttle disguised as heads, while the real heads are dead"
|
||||
command_staff_only = TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,21 +80,19 @@
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(stat & BROKEN)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
|
||||
@@ -108,7 +108,7 @@ Class Procs:
|
||||
var/list/occupant_typecache //if set, turned into typecache in Initialize, other wise, defaults to mob/living typecache
|
||||
var/atom/movable/occupant = null
|
||||
var/interact_open = FALSE // Can the machine be interacted with when in maint/when the panel is open.
|
||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
||||
var/interact_offline = FALSE // Can the machine be interacted with while de-powered.
|
||||
var/speed_process = FALSE // Process as fast as possible?
|
||||
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
|
||||
|
||||
@@ -184,7 +184,7 @@ Class Procs:
|
||||
continue
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = am
|
||||
if(L.buckled)
|
||||
if(L.buckled || L.mob_size >= MOB_SIZE_LARGE)
|
||||
continue
|
||||
target = am
|
||||
|
||||
@@ -290,18 +290,17 @@ Class Procs:
|
||||
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
|
||||
return
|
||||
|
||||
/obj/machinery/proc/default_pry_open(obj/item/crowbar/C)
|
||||
. = !(state_open || panel_open || is_operational() || (flags_1 & NODECONSTRUCT_1)) && istype(C)
|
||||
/obj/machinery/proc/default_pry_open(obj/item/I)
|
||||
. = !(state_open || panel_open || is_operational() || (flags_1 & NODECONSTRUCT_1)) && I.tool_behaviour == TOOL_CROWBAR
|
||||
if(.)
|
||||
playsound(loc, C.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
visible_message("<span class='notice'>[usr] pries open \the [src].</span>", "<span class='notice'>You pry open \the [src].</span>")
|
||||
open_machine()
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(obj/item/crowbar/C, ignore_panel = 0)
|
||||
. = istype(C) && (panel_open || ignore_panel) && !(flags_1 & NODECONSTRUCT_1)
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(obj/item/I, ignore_panel = 0)
|
||||
. = (panel_open || ignore_panel) && !(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_CROWBAR
|
||||
if(.)
|
||||
playsound(loc, C.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/machinery/deconstruct(disassembled = TRUE)
|
||||
@@ -337,9 +336,9 @@ Class Procs:
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver/S)
|
||||
if(istype(S) && !(flags_1 & NODECONSTRUCT_1))
|
||||
playsound(loc, S.usesound, 50, 1)
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I)
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
I.play_tool_sound(src, 50)
|
||||
if(!panel_open)
|
||||
panel_open = TRUE
|
||||
icon_state = icon_state_open
|
||||
@@ -351,9 +350,9 @@ Class Procs:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/wrench/W)
|
||||
if(panel_open && istype(W))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
/obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/I)
|
||||
if(panel_open && I.tool_behaviour == TOOL_WRENCH)
|
||||
I.play_tool_sound(src, 50)
|
||||
setDir(turn(dir,-90))
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
return 1
|
||||
@@ -365,20 +364,20 @@ Class Procs:
|
||||
return FAILED_UNFASTEN
|
||||
return SUCCESSFUL_UNFASTEN
|
||||
|
||||
/obj/proc/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20) //try to unwrench an object in a WONDERFUL DYNAMIC WAY
|
||||
if(istype(W) && !(flags_1 & NODECONSTRUCT_1))
|
||||
/obj/proc/default_unfasten_wrench(mob/user, obj/item/I, time = 20) //try to unwrench an object in a WONDERFUL DYNAMIC WAY
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_WRENCH)
|
||||
var/can_be_unfasten = can_be_unfasten_wrench(user)
|
||||
if(!can_be_unfasten || can_be_unfasten == FAILED_UNFASTEN)
|
||||
return can_be_unfasten
|
||||
if(time)
|
||||
to_chat(user, "<span class='notice'>You begin [anchored ? "un" : ""]securing [src]...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
var/prev_anchored = anchored
|
||||
//as long as we're the same anchored state and we're either on a floor or are anchored, toggle our anchored state
|
||||
if(!time || do_after(user, time*W.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/unfasten_wrench_check, prev_anchored, user)))
|
||||
if(I.use_tool(src, user, time, extra_checks = CALLBACK(src, .proc/unfasten_wrench_check, prev_anchored, user)))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [src].</span>")
|
||||
anchored = !anchored
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
return SUCCESSFUL_UNFASTEN
|
||||
return FAILED_UNFASTEN
|
||||
return CANT_UNFASTEN
|
||||
@@ -479,7 +478,7 @@ Class Procs:
|
||||
/obj/machinery/tesla_act(power, explosive = FALSE)
|
||||
..()
|
||||
if(prob(85) && explosive)
|
||||
explosion(src.loc,1,2,4,flame_range = 2, adminlog = 0, smoke = 0)
|
||||
explosion(src.loc, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE)
|
||||
else if(prob(50))
|
||||
emp_act(EMP_LIGHT)
|
||||
else
|
||||
|
||||
@@ -61,7 +61,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
/obj/machinery/announcement_system/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
|
||||
update_icon()
|
||||
@@ -89,6 +89,10 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
message = CompileText(arrival, user, rank)
|
||||
else if(message_type == "NEWHEAD" && newheadToggle)
|
||||
message = CompileText(newhead, user, rank)
|
||||
//CITADEL EDIT for cryopods
|
||||
else if(message_type == "CRYOSTORAGE")
|
||||
message = CompileText("%PERSON, %RANK has been moved to cryo storage.", user, rank)
|
||||
//END EDIT
|
||||
else if(message_type == "ARRIVALS_BROKEN")
|
||||
message = "The arrivals shuttle has been damaged. Docking for repairs..."
|
||||
|
||||
@@ -101,6 +105,8 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
//config stuff
|
||||
|
||||
/obj/machinery/announcement_system/interact(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
@@ -115,6 +121,8 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/announcement_system/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
@@ -122,13 +130,13 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
if(href_list["ArrivalTopic"])
|
||||
var/NewMessage = stripped_input(usr, "Enter in the arrivals announcement configuration.", "Arrivals Announcement Config", arrival)
|
||||
if(!in_range(src, usr) && src.loc != usr && (!isAI(usr) && !IsAdminGhost(usr)))
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(NewMessage)
|
||||
arrival = NewMessage
|
||||
else if(href_list["NewheadTopic"])
|
||||
var/NewMessage = stripped_input(usr, "Enter in the departmental head announcement configuration.", "Head Departmental Announcement Config", newhead)
|
||||
if(!in_range(src, usr) && src.loc != usr && (!isAI(usr) && !IsAdminGhost(usr)))
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(NewMessage)
|
||||
newhead = NewMessage
|
||||
@@ -147,7 +155,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = attack_ai(user)
|
||||
|
||||
/obj/machinery/announcement_system/attack_ai(mob/user)
|
||||
if(!issilicon(user) && !IsAdminGhost(user))
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s firmware appears to be malfunctioning!</span>")
|
||||
|
||||
@@ -74,21 +74,21 @@
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] begins repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(src, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, TRUE, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(src, 'sound/items/welder2.ogg', 50, 1)
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max(obj_integrity, max_integrity)
|
||||
update_icon()
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] begins repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max(obj_integrity, max_integrity)
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
|
||||
@@ -89,18 +89,17 @@
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
|
||||
updateUsrDialog()
|
||||
return
|
||||
return TRUE
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
return TRUE
|
||||
|
||||
if(panel_open)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
default_deconstruction_crowbar(O)
|
||||
return TRUE
|
||||
else if(is_wire_tool(O))
|
||||
wires.interact(user)
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return TRUE
|
||||
|
||||
if(panel_open && is_wire_tool(O))
|
||||
wires.interact(user)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent == INTENT_HARM) //so we can hit the machine
|
||||
return ..()
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
|
||||
if(!device && !board && istype(W, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the button frame...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
W.play_tool_sound(src)
|
||||
if(W.use_tool(src, user, 40))
|
||||
to_chat(user, "<span class='notice'>You unsecure the button frame.</span>")
|
||||
transfer_fingerprints_to(new /obj/item/wallframe/button(get_turf(src)))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
@@ -367,19 +367,16 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/camera/proc/weld(obj/item/weldingtool/WT, mob/living/user)
|
||||
/obj/machinery/camera/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
if(busy)
|
||||
return FALSE
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
busy = TRUE
|
||||
if(do_after(user, 100*WT.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 100, volume=50))
|
||||
busy = FALSE
|
||||
if(!WT.isOn())
|
||||
return FALSE
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/obj/U = locate(/obj) in upgrades
|
||||
if(U)
|
||||
to_chat(user, "<span class='notice'>You unattach an upgrade from the assembly.</span>")
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
tool.play_tool_sound(src)
|
||||
U.forceMove(drop_location())
|
||||
upgrades -= U
|
||||
return TRUE
|
||||
@@ -90,7 +90,7 @@
|
||||
if(state != 3)
|
||||
return FALSE
|
||||
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
tool.play_tool_sound(src)
|
||||
var/input = stripped_input(user, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")
|
||||
if(!input)
|
||||
to_chat(user, "<span class='warning'>No input found, please hang up and try your call again!</span>")
|
||||
@@ -109,35 +109,32 @@
|
||||
C.c_tag = "[A.name] ([rand(1, 999)])"
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/wirecutter_act(mob/user, obj/item/tool)
|
||||
/obj/structure/camera_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != 3)
|
||||
return FALSE
|
||||
|
||||
new /obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
new /obj/item/stack/cable_coil(drop_location(), 2)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the circuits.</span>")
|
||||
state = 2
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/wrench_act(mob/user, obj/item/tool)
|
||||
/obj/structure/camera_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != 1)
|
||||
return FALSE
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unattach the assembly from its place.</span>")
|
||||
new /obj/item/wallframe/camera(get_turf(src))
|
||||
new /obj/item/wallframe/camera(drop_location())
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/WT, mob/living/user)
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return 0
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You start to weld \the [src]...</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 20*WT.toolspeed, target = src))
|
||||
if(WT.isOn())
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/camera_assembly/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -118,14 +118,14 @@
|
||||
|
||||
/proc/near_camera(mob/living/M)
|
||||
if (!isturf(M.loc))
|
||||
return 0
|
||||
return FALSE
|
||||
if(issilicon(M))
|
||||
var/mob/living/silicon/S = M
|
||||
if((!QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
if((QDELETED(S.builtInCamera) || !S.builtInCamera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
|
||||
return FALSE
|
||||
else if(!GLOB.cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/camera/attack_ai(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 60
|
||||
power_channel = EQUIP
|
||||
circuit = /obj/item/circuitboard/machine/cell_charger
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
var/charge_rate = 500
|
||||
|
||||
/obj/machinery/cell_charger/proc/updateicon()
|
||||
cut_overlays()
|
||||
@@ -28,7 +30,7 @@
|
||||
to_chat(user, "Current charge: [round(charging.percent(), 1)]%.")
|
||||
|
||||
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src] is broken!</span>")
|
||||
return
|
||||
@@ -52,17 +54,23 @@
|
||||
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
|
||||
chargelevel = -1
|
||||
updateicon()
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove the cell first!</span>")
|
||||
else
|
||||
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
if(!charging && default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "attach" : "detach"] [src] [anchored ? "to" : "from"] the ground</span>")
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cell_charger/deconstruct()
|
||||
if(charging)
|
||||
charging.forceMove(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cell_charger/Destroy()
|
||||
QDEL_NULL(charging)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cell_charger/proc/removecell()
|
||||
charging.update_icon()
|
||||
@@ -102,6 +110,10 @@
|
||||
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/cell_charger/RefreshParts()
|
||||
charge_rate = 500
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
charge_rate *= C.rating
|
||||
|
||||
/obj/machinery/cell_charger/process()
|
||||
if(!charging || !anchored || (stat & (BROKEN|NOPOWER)))
|
||||
@@ -109,8 +121,8 @@
|
||||
|
||||
if(charging.percent() >= 100)
|
||||
return
|
||||
|
||||
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
|
||||
charging.give(175) //inefficiency.
|
||||
use_power(charge_rate)
|
||||
charging.give(charge_rate) //this is 2558, efficient batteries exist
|
||||
|
||||
updateicon()
|
||||
|
||||
@@ -69,14 +69,13 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && circuit && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You start to disconnect the monitor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
/obj/machinery/computer/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(circuit && !(flags_1&NODECONSTRUCT_1))
|
||||
to_chat(user, "<span class='notice'>You start to disconnect the monitor...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
deconstruct(TRUE, user)
|
||||
else
|
||||
return ..()
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
/obj/machinery/computer/apc_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!usr || !usr.canUseTopic(src) || usr.incapacitated() || stat || QDELETED(src))
|
||||
if(!usr || !usr.canUseTopic(src) || stat || QDELETED(src))
|
||||
return
|
||||
if(href_list["authenticate"])
|
||||
var/obj/item/card/id/ID = usr.get_active_held_item()
|
||||
@@ -105,12 +105,6 @@
|
||||
authenticated = TRUE
|
||||
auth_id = "[ID.registered_name] ([ID.assignment])"
|
||||
log_activity("logged in")
|
||||
if(!authenticated) //Check for emags
|
||||
var/obj/item/card/emag/E = usr.get_active_held_item()
|
||||
if(E && istype(E) && usr.Adjacent(src))
|
||||
to_chat(usr, "<span class='warning'>You bypass [src]'s access requirements using your emag.</span>")
|
||||
authenticated = TRUE
|
||||
log_activity("logged in") //Auth ID doesn't change, hinting that it was illicit
|
||||
if(href_list["log_out"])
|
||||
log_activity("logged out")
|
||||
authenticated = FALSE
|
||||
@@ -193,12 +187,15 @@
|
||||
interact(usr) //Refresh the UI after a filter changes
|
||||
|
||||
/obj/machinery/computer/apc_control/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
user.visible_message("<span class='warning'>You emag [src], disabling precise logging and allowing you to clear logs.</span>")
|
||||
log_game("[key_name(user)] emagged [src] at [get_area(src)], disabling operator tracking.")
|
||||
if(!authenticated)
|
||||
to_chat(user, "<span class='warning'>You bypass [src]'s access requirements using your emag.</span>")
|
||||
authenticated = TRUE
|
||||
log_activity("logged in")
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
user.visible_message("<span class='warning'>You emag [src], disabling precise logging and allowing you to clear logs.</span>")
|
||||
log_game("[key_name(user)] emagged [src] at [get_area(src)], disabling operator tracking.")
|
||||
obj_flags |= EMAGGED
|
||||
playsound(src, "sparks", 50, 1)
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
|
||||
var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]"
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
/obj/item/toy/eightball = 2,
|
||||
/obj/item/toy/windupToolbox = 2,
|
||||
/obj/item/toy/clockwork_watch = 2,
|
||||
/obj/item/extendohand/acme = 1)
|
||||
/obj/item/toy/toy_dagger = 2,
|
||||
/obj/item/extendohand/acme = 1,
|
||||
/obj/item/hot_potato/harmless/toy = 1,
|
||||
/obj/item/card/emagfake = 1)
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
|
||||
@@ -8,24 +8,18 @@
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
return
|
||||
if(istype(P, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = P
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "<span class='warning'>[WT] must be on to complete this task!</span>")
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
|
||||
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (drop_location(), 5)
|
||||
M.add_fingerprint(user)
|
||||
@@ -33,9 +27,8 @@
|
||||
return
|
||||
if(1)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
anchored = FALSE
|
||||
state = 0
|
||||
@@ -54,13 +47,13 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
|
||||
state = 1
|
||||
icon_state = "0"
|
||||
@@ -70,54 +63,47 @@
|
||||
return
|
||||
if(2)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(C.get_amount() >= 5 && state == 2)
|
||||
C.use(5)
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the frame!</span>")
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
if(state != 2)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/stack/cable_coil/A = new (drop_location())
|
||||
A.amount = 5
|
||||
var/obj/item/stack/cable_coil/A = new (drop_location(), 5)
|
||||
A.add_fingerprint(user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = P
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to continue construction!</span>")
|
||||
if(!P.tool_start_check(user, amount=2))
|
||||
return
|
||||
else
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(P.use_tool(src, user, 20, amount=2))
|
||||
if(state != 3)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
return
|
||||
if(4)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
@@ -125,7 +111,7 @@
|
||||
G.add_fingerprint(user)
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/obj/B = new circuit.build_path (loc, circuit)
|
||||
B.dir = dir
|
||||
@@ -147,7 +133,7 @@
|
||||
|
||||
/obj/structure/frame/computer/AltClick(mob/user)
|
||||
..()
|
||||
if(!in_range(src, user) || !isliving(user) || user.incapacitated())
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
continue //how though?
|
||||
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"]))
|
||||
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
records -= R
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules(findfirstcloner)
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
if(!aicurrmsg || !answer || aicurrmsg.possible_answers.len < answer)
|
||||
aistate = STATE_MESSAGELIST
|
||||
aicurrmsg.answered = answer
|
||||
log_game("[key_name(usr)] answered [currmsg.title] comm message. Answer : [currmsg.answered]")
|
||||
log_game("[key_name(usr)] answered [aicurrmsg.title] comm message. Answer : [aicurrmsg.answered]")
|
||||
if(aicurrmsg.answer_callback)
|
||||
aicurrmsg.answer_callback.Invoke()
|
||||
aistate = STATE_VIEWMESSAGE
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/upload
|
||||
var/mob/living/silicon/current = null //The target of future law uploads
|
||||
icon_screen = "command"
|
||||
|
||||
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/aiModule))
|
||||
var/obj/item/aiModule/M = O
|
||||
if(src.stat & (NOPOWER|BROKEN|MAINT))
|
||||
return
|
||||
if(!current)
|
||||
to_chat(user, "<span class='caution'>You haven't selected anything to transmit laws to!</span>")
|
||||
return
|
||||
if(!can_upload_to(current))
|
||||
to_chat(user, "<span class='caution'>Upload failed!</span> Check to make sure [current.name] is functioning properly.")
|
||||
current = null
|
||||
return
|
||||
var/turf/currentloc = get_turf(current)
|
||||
if(currentloc && user.z != currentloc.z)
|
||||
to_chat(user, "<span class='caution'>Upload failed!</span> Unable to establish a connection to [current.name]. You're too far away!")
|
||||
current = null
|
||||
return
|
||||
M.install(current.laws, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/upload/proc/can_upload_to(mob/living/silicon/S)
|
||||
if(S.stat == DEAD || S.syndicate)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/upload/ai
|
||||
name = "\improper AI upload console"
|
||||
desc = "Used to upload laws to the AI."
|
||||
circuit = /obj/item/circuitboard/computer/aiupload
|
||||
|
||||
/obj/machinery/computer/upload/ai/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
src.current = select_active_ai(user)
|
||||
|
||||
if (!src.current)
|
||||
to_chat(user, "<span class='caution'>No active AIs detected!</span>")
|
||||
else
|
||||
to_chat(user, "[src.current.name] selected for law changes.")
|
||||
|
||||
/obj/machinery/computer/upload/ai/can_upload_to(mob/living/silicon/ai/A)
|
||||
if(!A || !isAI(A))
|
||||
return 0
|
||||
if(A.control_disabled)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/computer/upload/borg
|
||||
name = "cyborg upload console"
|
||||
desc = "Used to upload laws to Cyborgs."
|
||||
circuit = /obj/item/circuitboard/computer/borgupload
|
||||
|
||||
/obj/machinery/computer/upload/borg/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
src.current = select_active_free_borg(user)
|
||||
|
||||
if(!src.current)
|
||||
to_chat(user, "<span class='caution'>No active unslaved cyborgs detected!</span>")
|
||||
else
|
||||
to_chat(user, "[src.current.name] selected for law changes.")
|
||||
|
||||
/obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B)
|
||||
if(!B || !iscyborg(B))
|
||||
return 0
|
||||
if(B.scrambledcodes || B.emagged)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/computer/upload
|
||||
var/mob/living/silicon/current = null //The target of future law uploads
|
||||
icon_screen = "command"
|
||||
|
||||
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/aiModule))
|
||||
var/obj/item/aiModule/M = O
|
||||
if(src.stat & (NOPOWER|BROKEN|MAINT))
|
||||
return
|
||||
if(!current)
|
||||
to_chat(user, "<span class='caution'>You haven't selected anything to transmit laws to!</span>")
|
||||
return
|
||||
if(!can_upload_to(current))
|
||||
to_chat(user, "<span class='caution'>Upload failed!</span> Check to make sure [current.name] is functioning properly.")
|
||||
current = null
|
||||
return
|
||||
var/turf/currentloc = get_turf(current)
|
||||
if(currentloc && user.z != currentloc.z)
|
||||
to_chat(user, "<span class='caution'>Upload failed!</span> Unable to establish a connection to [current.name]. You're too far away!")
|
||||
current = null
|
||||
return
|
||||
M.install(current.laws, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/upload/proc/can_upload_to(mob/living/silicon/S)
|
||||
if(S.stat == DEAD)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/upload/ai
|
||||
name = "\improper AI upload console"
|
||||
desc = "Used to upload laws to the AI."
|
||||
circuit = /obj/item/circuitboard/computer/aiupload
|
||||
|
||||
/obj/machinery/computer/upload/ai/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
src.current = select_active_ai(user)
|
||||
|
||||
if (!src.current)
|
||||
to_chat(user, "<span class='caution'>No active AIs detected!</span>")
|
||||
else
|
||||
to_chat(user, "[src.current.name] selected for law changes.")
|
||||
|
||||
/obj/machinery/computer/upload/ai/can_upload_to(mob/living/silicon/ai/A)
|
||||
if(!A || !isAI(A))
|
||||
return 0
|
||||
if(A.control_disabled)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/computer/upload/borg
|
||||
name = "cyborg upload console"
|
||||
desc = "Used to upload laws to Cyborgs."
|
||||
circuit = /obj/item/circuitboard/computer/borgupload
|
||||
|
||||
/obj/machinery/computer/upload/borg/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
src.current = select_active_free_borg(user)
|
||||
|
||||
if(!src.current)
|
||||
to_chat(user, "<span class='caution'>No active unslaved cyborgs detected!</span>")
|
||||
else
|
||||
to_chat(user, "[src.current.name] selected for law changes.")
|
||||
|
||||
/obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B)
|
||||
if(!B || !iscyborg(B))
|
||||
return 0
|
||||
if(B.scrambledcodes || B.emagged)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics
|
||||
name = "robotics control console"
|
||||
desc = "Used to remotely lockdown or detonate linked Cyborgs and Drones."
|
||||
@@ -61,11 +58,14 @@
|
||||
dat += " Slaved to [R.connected_ai.name] |"
|
||||
else
|
||||
dat += " Independent from AI |"
|
||||
if(issilicon(user) || IsAdminGhost(user))
|
||||
if(is_servant_of_ratvar(user) && user != R)
|
||||
if(issilicon(user) && user != R)
|
||||
var/mob/living/silicon/S = user
|
||||
if(is_servant_of_ratvar(S))
|
||||
dat += "<A href='?src=[REF(src)];convert=[REF(R)]'>(<font color=#BE8700><i>Convert</i></font>)</A> "
|
||||
else if(((issilicon(user) && is_special_character(user)) || IsAdminGhost(user)) && !R.emagged && (user != R || R.syndicate))
|
||||
else if(S.hack_software && !R.emagged)
|
||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
else if(IsAdminGhost(user) && !R.emagged)
|
||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
dat += "<A href='?src=[REF(src)];stopbot=[REF(R)]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
||||
dat += "<A href='?src=[REF(src)];killbot=[REF(R)]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||
dat += "<BR>"
|
||||
@@ -107,18 +107,12 @@
|
||||
if(can_control(usr, R))
|
||||
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm" && can_control(usr, R) && !..())
|
||||
if(R.syndicate && R.emagged)
|
||||
to_chat(R, "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered.")
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "<br><br><span class='alert'>ALERT - Cyborg detonation detected: [R.name]</span><br>")
|
||||
R.ResetSecurityCodes()
|
||||
else
|
||||
var/turf/T = get_turf(R)
|
||||
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] detonated [key_name(R, R.client)][ADMIN_JMP(T)]!</span>")
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated [key_name(R)]!</span>")
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "<br><br><span class='alert'>ALERT - Cyborg detonation detected: [R.name]</span><br>")
|
||||
R.self_destruct()
|
||||
var/turf/T = get_turf(R)
|
||||
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] detonated [key_name(R, R.client)][ADMIN_JMP(T)]!</span>")
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated [key_name(R)]!</span>")
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "<br><br><span class='alert'>ALERT - Cyborg detonation detected: [R.name]</span><br>")
|
||||
R.self_destruct()
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Access Denied.</span>")
|
||||
|
||||
@@ -139,19 +133,18 @@
|
||||
to_chat(usr, "<span class='danger'>Access Denied.</span>")
|
||||
|
||||
else if (href_list["magbot"])
|
||||
if((issilicon(usr) && is_special_character(usr)) || IsAdminGhost(usr))
|
||||
var/mob/living/silicon/S = usr
|
||||
if((istype(S) && S.hack_software) || IsAdminGhost(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["magbot"]) in GLOB.silicon_mobs
|
||||
if(istype(R) && !R.emagged && ((R.syndicate && R == usr) || R.connected_ai == usr || IsAdminGhost(usr)) && !R.scrambledcodes && can_control(usr, R))
|
||||
if(istype(R) && !R.emagged && (R.connected_ai == usr || IsAdminGhost(usr)) && !R.scrambledcodes && can_control(usr, R))
|
||||
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
|
||||
message_admins("[key_name_admin(usr)] emagged cyborg [key_name_admin(R)] using robotic console!")
|
||||
R.SetEmagged(1)
|
||||
if(is_special_character(R))
|
||||
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
else if(href_list["convert"])
|
||||
if(issilicon(usr) && is_special_character(usr))
|
||||
if(isAI(usr) && is_servant_of_ratvar(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["convert"]) in GLOB.silicon_mobs
|
||||
if(istype(R) && !is_servant_of_ratvar(R) && is_servant_of_ratvar(usr) && R.connected_ai == usr)
|
||||
if(istype(R) && !is_servant_of_ratvar(R) && R.connected_ai == usr)
|
||||
log_game("[key_name(usr)] converted [R.name] using robotic console!")
|
||||
message_admins("[key_name_admin(usr)] converted cyborg [key_name_admin(R)] using robotic console!")
|
||||
add_servant_of_ratvar(R)
|
||||
|
||||
@@ -81,24 +81,20 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(C.get_amount() >= 5 && state == 1)
|
||||
C.use(5)
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five length of cable to wire the frame!</span>")
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && !anchored)
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
|
||||
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=50))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
||||
@@ -107,8 +103,7 @@
|
||||
return
|
||||
if(istype(P, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
anchored = !anchored
|
||||
@@ -117,8 +112,7 @@
|
||||
if(2)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
anchored = !anchored
|
||||
return
|
||||
@@ -145,17 +139,16 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
state = 2
|
||||
circuit.forceMove(drop_location())
|
||||
components.Remove(circuit)
|
||||
@@ -179,7 +172,7 @@
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, 1)
|
||||
new_machine.on_construction()
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/defibrillator_mount/AltClick(mob/living/user)
|
||||
if(!user.Adjacent(src) || !istype(user))
|
||||
/obj/machinery/defibrillator_mount/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(!defib)
|
||||
to_chat(user, "<span class='warning'>It'd be hard to remove a defib unit from a mount that has none.</span>")
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=40))
|
||||
obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -64,12 +64,6 @@
|
||||
material = WOOD
|
||||
var/drop_amount = 3
|
||||
|
||||
/obj/structure/barricade/wooden/snowed
|
||||
name = "crude plank barricade"
|
||||
desc = "This space is blocked off by a wooden barricade. It seems to be covered in a layer of snow."
|
||||
icon_state = "woodenbarricade-snow"
|
||||
max_integrity = 125
|
||||
|
||||
/obj/structure/barricade/wooden/crude
|
||||
name = "crude plank barricade"
|
||||
desc = "This space is blocked off by a crude assortment of planks."
|
||||
@@ -141,8 +135,8 @@
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to toggle modes.</span>")
|
||||
|
||||
/obj/item/grenade/barrier/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
/obj/item/grenade/barrier/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
toggle_mode(user)
|
||||
|
||||
|
||||
@@ -782,15 +782,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_METAL)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the panel's shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount = 2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -802,8 +799,7 @@
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/crowbar/W = C
|
||||
to_chat(user, "<span class='notice'>You start removing the inner layer of shielding...</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, 1, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
if(security_level != AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
@@ -818,15 +814,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the inner layer of shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -834,10 +827,8 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/crowbar/W = C
|
||||
to_chat(user, "<span class='notice'>You start removing outer layer of shielding...</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, 1, target = src))
|
||||
if(C.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
if(security_level != AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
@@ -849,15 +840,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the outer layer of shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -865,12 +853,10 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/W = C
|
||||
if(src.hasPower() && src.shock(user, 60)) // Protective grille of wiring is electrified
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start cutting through the outer grille.</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 10*W.toolspeed, 1, target = src))
|
||||
if(C.use_tool(src, user, 10, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] cut through \the [src]'s outer grille.</span>",
|
||||
@@ -883,11 +869,11 @@
|
||||
return
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the airlock.</span>")
|
||||
playsound(src.loc, C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
src.update_icon()
|
||||
else if(istype(C, /obj/item/wirecutters) && note)
|
||||
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
note.forceMove(get_turf(user))
|
||||
note = null
|
||||
update_icon()
|
||||
@@ -932,36 +918,34 @@
|
||||
/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
if(!operating && density)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
if(W.remove_fuel(0,user))
|
||||
user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
|
||||
"<span class='notice'>You begin [welded ? "unwelding":"welding"] the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
if(do_after(user,40*W.toolspeed, 1, target = src, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("[user.name] has [welded? "welded shut":"unwelded"] [src].", \
|
||||
"<span class='notice'>You [welded ? "weld the airlock shut":"unweld the airlock"].</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
|
||||
"<span class='notice'>You begin [welded ? "unwelding":"welding"] the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
welded = !welded
|
||||
user.visible_message("[user.name] has [welded? "welded shut":"unwelded"] [src].", \
|
||||
"<span class='notice'>You [welded ? "weld the airlock shut":"unweld the airlock"].</span>")
|
||||
update_icon()
|
||||
else
|
||||
if(obj_integrity < max_integrity)
|
||||
if(W.remove_fuel(0,user))
|
||||
user.visible_message("[user] is welding the airlock.", \
|
||||
"<span class='notice'>You begin repairing the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
if(do_after(user,40*W.toolspeed, 1, target = src, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
user.visible_message("[user.name] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing the airlock.</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is welding the airlock.", \
|
||||
"<span class='notice'>You begin repairing the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
user.visible_message("[user.name] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing the airlock.</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The airlock doesn't need repairing.</span>")
|
||||
|
||||
/obj/machinery/door/airlock/proc/weld_checks(obj/item/weldingtool/W, mob/user)
|
||||
return !operating && density && user && W && W.isOn() && user.loc
|
||||
return !operating && density
|
||||
|
||||
/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
|
||||
var/beingcrowbarred = null
|
||||
@@ -971,8 +955,7 @@
|
||||
beingcrowbarred = 0
|
||||
if(panel_open && charge)
|
||||
to_chat(user, "<span class='notice'>You carefully start removing [charge] from [src]...</span>")
|
||||
playsound(get_turf(src), I.usesound, 50, 1)
|
||||
if(!do_after(user, 150*I.toolspeed, target = src))
|
||||
if(!I.use_tool(src, user, 150, volume=50))
|
||||
to_chat(user, "<span class='warning'>You slip and [charge] detonates!</span>")
|
||||
charge.ex_act(EXPLODE_DEVASTATE)
|
||||
user.Knockdown(60)
|
||||
@@ -983,13 +966,11 @@
|
||||
charge = null
|
||||
return
|
||||
if(beingcrowbarred && panel_open && ((obj_flags & EMAGGED) || (density && welded && !operating && !hasPower() && !locked)))
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
if(do_after(user,40*I.toolspeed, target = src))
|
||||
if(src.loc)
|
||||
deconstruct(TRUE, user)
|
||||
return
|
||||
if(I.use_tool(src, user, 40, volume=100))
|
||||
deconstruct(TRUE, user)
|
||||
return
|
||||
else if(hasPower())
|
||||
to_chat(user, "<span class='warning'>The airlock's motors resist your efforts to force it!</span>")
|
||||
else if(locked)
|
||||
|
||||
@@ -409,6 +409,7 @@
|
||||
damage_deflection = 10
|
||||
var/openingoverlaytype = /obj/effect/temp_visual/cult/door
|
||||
var/friendly = FALSE
|
||||
var/stealthy = FALSE
|
||||
|
||||
/obj/machinery/door/airlock/cult/Initialize()
|
||||
. = ..()
|
||||
@@ -421,18 +422,36 @@
|
||||
if(!density)
|
||||
return 1
|
||||
if(friendly || iscultist(L) || istype(L, /mob/living/simple_animal/shade) || isconstruct(L))
|
||||
new openingoverlaytype(loc)
|
||||
if(!stealthy)
|
||||
new openingoverlaytype(loc)
|
||||
return 1
|
||||
else
|
||||
new /obj/effect/temp_visual/cult/sac(loc)
|
||||
var/atom/throwtarget
|
||||
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
||||
flash_color(L, flash_color="#960000", flash_time=20)
|
||||
L.Knockdown(40)
|
||||
L.throw_at(throwtarget, 5, 1,src)
|
||||
if(!stealthy)
|
||||
new /obj/effect/temp_visual/cult/sac(loc)
|
||||
var/atom/throwtarget
|
||||
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
||||
flash_color(L, flash_color="#960000", flash_time=20)
|
||||
L.Knockdown(40)
|
||||
L.throw_at(throwtarget, 5, 1,src)
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/cult/proc/conceal()
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
name = "airlock"
|
||||
desc = "It opens and closes."
|
||||
stealthy = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/cult/proc/reveal()
|
||||
icon = initial(icon)
|
||||
overlays_file = initial(overlays_file)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
stealthy = initial(stealthy)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/cult/narsie_act()
|
||||
return
|
||||
|
||||
@@ -557,16 +576,14 @@
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(construction_state == GEAR_SECURE)
|
||||
user.visible_message("<span class='notice'>[user] begins loosening [src]'s cogwheel...</span>", "<span class='notice'>You begin loosening [src]'s cogwheel...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_SECURE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_SECURE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s cogwheel!</span>", "<span class='notice'>[src]'s cogwheel pops off and dangles loosely.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
construction_state = GEAR_LOOSE
|
||||
else if(construction_state == GEAR_LOOSE)
|
||||
user.visible_message("<span class='notice'>[user] begins tightening [src]'s cogwheel...</span>", "<span class='notice'>You begin tightening [src]'s cogwheel into place...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_LOOSE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s cogwheel!</span>", "<span class='notice'>You firmly tighten [src]'s cogwheel into place.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
@@ -578,8 +595,7 @@
|
||||
return 1
|
||||
else if(construction_state == GEAR_LOOSE)
|
||||
user.visible_message("<span class='notice'>[user] begins slowly lifting off [src]'s cogwheel...</span>", "<span class='notice'>You slowly begin lifting off [src]'s cogwheel...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_LOOSE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] lifts off [src]'s cogwheel, causing it to fall apart!</span>", \
|
||||
"<span class='notice'>You lift off [src]'s cogwheel, causing it to fall apart!</span>")
|
||||
|
||||
@@ -55,10 +55,7 @@
|
||||
|
||||
/obj/machinery/door/Initialize()
|
||||
. = ..()
|
||||
if(density)
|
||||
layer = CLOSED_DOOR_LAYER //Above most items if closed
|
||||
else
|
||||
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
set_init_door_layer()
|
||||
update_freelook_sight()
|
||||
air_update_turf(1)
|
||||
GLOB.airlocks += src
|
||||
@@ -69,6 +66,12 @@
|
||||
real_explosion_block = explosion_block
|
||||
explosion_block = EXPLOSION_BLOCK_PROC
|
||||
|
||||
/obj/machinery/door/proc/set_init_door_layer()
|
||||
if(density)
|
||||
layer = closingLayer
|
||||
else
|
||||
layer = initial(layer)
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = FALSE
|
||||
air_update_turf(1)
|
||||
@@ -255,7 +258,7 @@
|
||||
sleep(5)
|
||||
density = FALSE
|
||||
sleep(5)
|
||||
layer = OPEN_DOOR_LAYER
|
||||
layer = initial(layer)
|
||||
update_icon()
|
||||
set_opacity(0)
|
||||
operating = FALSE
|
||||
|
||||
@@ -100,10 +100,10 @@
|
||||
if(boltslocked)
|
||||
to_chat(user, "<span class='notice'>There are screws locking the bolts in place!</span>")
|
||||
return
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts undoing [src]'s bolts...</span>", \
|
||||
"<span class='notice'>You start unfastening [src]'s floor bolts...</span>")
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] unfastens [src]'s bolts.</span>", \
|
||||
@@ -113,7 +113,7 @@
|
||||
if(istype(C, /obj/item/screwdriver))
|
||||
user.visible_message("<span class='notice'>[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts.</span>", \
|
||||
"<span class='notice'>You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts.</span>")
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
boltslocked = !boltslocked
|
||||
return
|
||||
|
||||
@@ -123,14 +123,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")
|
||||
if(do_after(user, 40*W.toolspeed, 1, target=src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
welded = !welded
|
||||
to_chat(user, "<span class='danger'>[user] [welded?"welds":"unwelds"] [src].</span>", "<span class='notice'>You [welded ? "weld" : "unweld"] [src].</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
welded = !welded
|
||||
to_chat(user, "<span class='danger'>[user] [welded?"welds":"unwelds"] [src].</span>", "<span class='notice'>You [welded ? "weld" : "unweld"] [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/firedoor/try_to_crowbar(obj/item/I, mob/user)
|
||||
if(welded || operating)
|
||||
@@ -211,6 +210,11 @@
|
||||
flags_1 = ON_BORDER_1
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
|
||||
/obj/machinery/door/firedoor/border_only/closed
|
||||
icon_state = "door_closed"
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return 1
|
||||
@@ -279,10 +283,10 @@
|
||||
switch(constructionStep)
|
||||
if(CONSTRUCTION_PANEL_OPEN)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying something out from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the wire cover...</span>")
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_PANEL_OPEN)
|
||||
return
|
||||
@@ -296,10 +300,10 @@
|
||||
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
|
||||
to_chat(user, "<span class='warning'>There's already a firelock there.</span>")
|
||||
return
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts bolting down [src]...</span>", \
|
||||
"<span class='notice'>You begin bolting [src]...</span>")
|
||||
if(!do_after(user, 30*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 30))
|
||||
return
|
||||
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
|
||||
return
|
||||
@@ -335,10 +339,10 @@
|
||||
|
||||
if(CONSTRUCTION_WIRES_EXPOSED)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts cutting the wires from [src]...</span>", \
|
||||
"<span class='notice'>You begin removing [src]'s wires...</span>")
|
||||
if(!do_after(user, 60*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 60))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
|
||||
return
|
||||
@@ -350,10 +354,10 @@
|
||||
update_icon()
|
||||
return
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying a metal plate into [src]...</span>", \
|
||||
"<span class='notice'>You begin prying the cover plate back onto [src]...</span>")
|
||||
if(!do_after(user, 80*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 80))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
|
||||
return
|
||||
@@ -367,15 +371,13 @@
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
user.visible_message("<span class='notice'>[user] begins removing the circuit board from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the circuit board from [src]...</span>")
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50, volume=50))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_GUTTED)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] removes [src]'s circuit board.</span>", \
|
||||
"<span class='notice'>You remove the circuit board from [src].</span>")
|
||||
new /obj/item/electronics/firelock(get_turf(src))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
new /obj/item/electronics/firelock(drop_location())
|
||||
constructionStep = CONSTRUCTION_NOCIRCUIT
|
||||
update_icon()
|
||||
return
|
||||
@@ -399,18 +401,17 @@
|
||||
return
|
||||
if(CONSTRUCTION_NOCIRCUIT)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = C
|
||||
if(W.remove_fuel(1,user))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
|
||||
"<span class='notice'>You begin slicing [src] apart...</span>")
|
||||
if(!do_after(user, 80*C.toolspeed, target = src))
|
||||
return
|
||||
if(!C.tool_start_check(user, amount=1))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
|
||||
"<span class='notice'>You begin slicing [src] apart...</span>")
|
||||
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=1))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] cuts apart [src]!</span>", \
|
||||
"<span class='notice'>You cut [src] into metal.</span>")
|
||||
playsound(get_turf(src), 'sound/items/welder2.ogg', 50, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
new /obj/item/stack/sheet/metal(T, 3)
|
||||
if(reinforced)
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
icon = 'icons/obj/doors/blastdoor.dmi'
|
||||
icon_state = "closed"
|
||||
var/id = 1
|
||||
layer = BLASTDOOR_LAYER
|
||||
closingLayer = CLOSED_BLASTDOOR_LAYER
|
||||
sub_door = TRUE
|
||||
explosion_block = 3
|
||||
heat_proof = TRUE
|
||||
@@ -12,7 +14,7 @@
|
||||
armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 100, acid = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
damage_deflection = 70
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/preopen
|
||||
icon_state = "open"
|
||||
density = FALSE
|
||||
|
||||
@@ -4,26 +4,10 @@
|
||||
desc = "Heavy duty metal shutters that opens mechanically."
|
||||
icon = 'icons/obj/doors/shutters.dmi'
|
||||
layer = SHUTTER_LAYER
|
||||
closingLayer = SHUTTER_LAYER
|
||||
damage_deflection = 20
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/preopen
|
||||
icon_state = "open"
|
||||
density = FALSE
|
||||
opacity = 0
|
||||
|
||||
|
||||
//shutters look like ass with things on top of them.
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/Initialize()
|
||||
. = ..()
|
||||
layer = CLOSED_DOOR_LAYER //to handle /obj/machinery/door/Initialize() resetting the layer.
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/open(ignorepower = 0)
|
||||
..()
|
||||
layer = CLOSED_DOOR_LAYER
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/close(ignorepower = 0)
|
||||
..()
|
||||
layer = CLOSED_DOOR_LAYER
|
||||
@@ -227,17 +227,16 @@
|
||||
if(density || operating)
|
||||
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
|
||||
return
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the [src.name].</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(panel_open && !density && !operating)
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the [src.name].", \
|
||||
"<span class='notice'>You start to remove electronics from the [src.name]...</span>")
|
||||
if(do_after(user,40*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
if(panel_open && !density && !operating && src.loc)
|
||||
var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(src.loc)
|
||||
switch(base_state)
|
||||
|
||||
@@ -29,8 +29,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
/obj/machinery/doppler_array/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/doppler_array/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/wrench))
|
||||
/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
anchored = TRUE
|
||||
power_change()
|
||||
@@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
anchored = FALSE
|
||||
power_change()
|
||||
to_chat(user, "<span class='notice'>You unfasten [src].</span>")
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -109,11 +109,16 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
. = ..()
|
||||
if(!istype(linked_techweb))
|
||||
say("Warning: No linked research system!")
|
||||
return
|
||||
var/adjusted = orig_light - 10 - linked_techweb.max_bomb_value
|
||||
if(adjusted <= 0)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
var/point_gain = techweb_scale_bomb(orig_light - 20 - linked_techweb.max_bomb_value)
|
||||
if(!point_gain)
|
||||
var/point_gain = techweb_scale_bomb(adjusted)
|
||||
if(point_gain <= 0)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
linked_techweb.max_bomb_value = orig_light - 20
|
||||
linked_techweb.max_bomb_value = orig_light - 10
|
||||
linked_techweb.research_points += point_gain
|
||||
say("Gained [point_gain] points from explosion dataset.")
|
||||
|
||||
@@ -124,4 +129,4 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
linked_techweb = SSresearch.science_tech
|
||||
|
||||
/proc/techweb_scale_bomb(lightradius)
|
||||
return (lightradius ** 0.5) * 13000
|
||||
return (lightradius ** 0.5) * 5000
|
||||
|
||||
@@ -210,35 +210,26 @@
|
||||
else
|
||||
icon_state = icon_on
|
||||
|
||||
/obj/machinery/droneDispenser/attackby(obj/item/O, mob/living/user)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
/obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool))
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
if(!(stat & BROKEN))
|
||||
to_chat(user, "<span class='warning'>[src] doesn't need repairs.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/weldingtool/WT = O
|
||||
|
||||
if(!WT.isOn())
|
||||
if(!I.tool_start_check(user, amount=1))
|
||||
return
|
||||
|
||||
if(WT.get_fuel() < 1)
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
return
|
||||
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] begins patching up [src] with [WT].</span>",
|
||||
"<span class='notice'>[user] begins patching up [src] with [I].</span>",
|
||||
"<span class='notice'>You begin restoring the damage to [src]...</span>")
|
||||
|
||||
if(!do_after(user, 40*O.toolspeed, target = src))
|
||||
return
|
||||
if(!src || !WT.remove_fuel(1, user))
|
||||
if(!I.use_tool(src, user, 40, volume=50, amount=1))
|
||||
return
|
||||
|
||||
user.visible_message(
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver) && buildstage == 2)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
|
||||
update_icon()
|
||||
@@ -158,15 +158,14 @@
|
||||
if(panel_open)
|
||||
|
||||
if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
obj_integrity = max_integrity
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
@@ -183,7 +182,7 @@
|
||||
|
||||
else if (istype(W, /obj/item/wirecutters))
|
||||
buildstage = 1
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
new /obj/item/stack/cable_coil(user.loc, 5)
|
||||
to_chat(user, "<span class='notice'>You cut the wires from \the [src].</span>")
|
||||
update_icon()
|
||||
@@ -201,10 +200,9 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user.name] removes the electronics from [src.name].", \
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
if(buildstage == 1)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed circuit.</span>")
|
||||
@@ -238,7 +236,7 @@
|
||||
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
|
||||
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
|
||||
frame.forceMove(user.drop_location())
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
if (bulb)
|
||||
user.visible_message("[user] begins to disconnect [src]'s flashbulb.", "<span class='notice'>You begin to disconnect [src]'s flashbulb...</span>")
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
if(do_after(user, 30*W.toolspeed, target = src) && bulb)
|
||||
if(W.use_tool(src, user, 30, volume=50) && bulb)
|
||||
user.visible_message("[user] has disconnected [src]'s flashbulb!", "<span class='notice'>You disconnect [src]'s flashbulb.</span>")
|
||||
bulb.forceMove(loc)
|
||||
bulb = null
|
||||
@@ -74,8 +73,7 @@
|
||||
else if (istype(W, /obj/item/wrench))
|
||||
if(!bulb)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the flasher frame...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unsecure the flasher frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
@@ -165,7 +163,7 @@
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
|
||||
if (!anchored && !isinspace())
|
||||
to_chat(user, "<span class='notice'>[src] is now secured.</span>")
|
||||
|
||||
@@ -58,6 +58,7 @@ Possible to do for anyone motivated enough:
|
||||
var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
|
||||
var/static/list/holopads = list()
|
||||
var/obj/effect/overlay/holoray/ray
|
||||
var/offset = FALSE
|
||||
|
||||
/obj/machinery/holopad/Initialize()
|
||||
. = ..()
|
||||
@@ -136,10 +137,6 @@ Possible to do for anyone motivated enough:
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/AltClick(mob/living/carbon/human/user)
|
||||
if(isAI(user))
|
||||
hangup_all_calls()
|
||||
return
|
||||
|
||||
/obj/machinery/holopad/interact(mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||
if(!istype(user))
|
||||
@@ -279,7 +276,16 @@ Possible to do for anyone motivated enough:
|
||||
record_stop()
|
||||
else if(href_list["record_clear"])
|
||||
record_clear()
|
||||
|
||||
else if(href_list["offset"])
|
||||
offset++
|
||||
if (offset > 4)
|
||||
offset = FALSE
|
||||
var/turf/new_turf
|
||||
if (!offset)
|
||||
new_turf = get_turf(src)
|
||||
else
|
||||
new_turf = get_step(src, GLOB.cardinals[offset])
|
||||
replay_holo.forceMove(new_turf)
|
||||
updateDialog()
|
||||
|
||||
//do not allow AIs to answer calls or people will use it to meta the AI sattelite
|
||||
@@ -493,7 +499,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
replay_mode = TRUE
|
||||
replay_holo = setup_replay_holo(disk.record)
|
||||
temp = "Replaying...<br>"
|
||||
temp += "<A href='?src=[REF(src)];replay_stop=1'>End replay.</A>"
|
||||
temp += "<A href='?src=[REF(src)];offset=1'>Change offset</A><br>"
|
||||
temp += "<A href='?src=[REF(src)];replay_stop=1'>End replay</A>"
|
||||
SetLightsAndPower()
|
||||
replay_entry(1)
|
||||
return
|
||||
@@ -502,6 +509,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(replay_mode)
|
||||
replay_mode = FALSE
|
||||
loop_mode = FALSE
|
||||
offset = FALSE
|
||||
temp = null
|
||||
QDEL_NULL(replay_holo)
|
||||
SetLightsAndPower()
|
||||
@@ -514,16 +522,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
record_mode = TRUE
|
||||
record_start = world.time
|
||||
record_user = user
|
||||
disk.record.caller_image = get_record_icon(user)
|
||||
disk.record.set_caller_image(user)
|
||||
temp = "Recording...<br>"
|
||||
temp += "<A href='?src=[REF(src)];record_stop=1'>End recording.</A>"
|
||||
|
||||
/obj/machinery/holopad/proc/get_record_icon(mob/living/user)
|
||||
var/olddir = user.dir
|
||||
user.setDir(SOUTH)
|
||||
. = getFlatIcon(user)
|
||||
user.setDir(olddir)
|
||||
|
||||
/obj/machinery/holopad/proc/record_message(mob/living/speaker,message,language)
|
||||
if(!record_mode)
|
||||
return
|
||||
@@ -553,8 +555,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/holopad/proc/replay_entry(entry_number)
|
||||
if(!replay_mode)
|
||||
return
|
||||
if (!disk.record.entries.len) // check for zero entries such as photographs and no text recordings
|
||||
return // and pretty much just display them statically untill manually stopped
|
||||
if(disk.record.entries.len < entry_number)
|
||||
if (loop_mode)
|
||||
if(loop_mode)
|
||||
entry_number = 1
|
||||
else
|
||||
replay_stop()
|
||||
@@ -626,4 +630,4 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
alpha = 100
|
||||
|
||||
#undef HOLOPAD_PASSIVE_POWER_USAGE
|
||||
#undef HOLOGRAM_POWER_USAGE
|
||||
#undef HOLOGRAM_POWER_USAGE
|
||||
|
||||
@@ -168,11 +168,10 @@
|
||||
|
||||
/obj/machinery/launchpad/briefcase/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(over_object == usr)
|
||||
if(!briefcase || !usr.can_hold_items())
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] starts closing [src]...</span>", "<span class='notice'>You start closing [src]...</span>")
|
||||
if(do_after(usr, 30, target = usr))
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
)
|
||||
|
||||
/obj/machinery/limbgrower/Initialize()
|
||||
. = ..()
|
||||
create_reagents(0)
|
||||
create_reagents(100)
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/limbgrower
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/limbgrower/interact(mob/user)
|
||||
if(!is_operational())
|
||||
|
||||
@@ -724,8 +724,8 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 60*I.toolspeed, target = src))
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The broken remains of [src] fall on the ground.</span>")
|
||||
@@ -737,21 +737,19 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
new /obj/item/wallframe/newscaster(loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(stat & BROKEN)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
@@ -1042,13 +1040,16 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
|
||||
/obj/item/newspaper/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
if(scribble_page == curr_page)
|
||||
to_chat(user, "<span class='notice'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</span>")
|
||||
else
|
||||
var/s = stripped_input(user, "Write something", "Newspaper")
|
||||
if (!s)
|
||||
return
|
||||
if (!in_range(src, usr) && loc != usr)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
scribble_page = curr_page
|
||||
scribble = s
|
||||
|
||||
@@ -151,7 +151,7 @@ Buildable meters
|
||||
A.on_construction(color, piping_layer)
|
||||
transfer_fingerprints_to(A)
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
user.visible_message( \
|
||||
"[user] fastens \the [src].", \
|
||||
"<span class='notice'>You fasten \the [src].</span>", \
|
||||
@@ -205,7 +205,7 @@ Buildable meters
|
||||
to_chat(user, "<span class='warning'>You need to fasten it to a pipe!</span>")
|
||||
return TRUE
|
||||
new /obj/machinery/meter(loc, piping_layer)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You fasten the meter to the pipe.</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -64,35 +64,15 @@
|
||||
to_chat(usr, "<span class='notice'>You put [W] back into [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
else if (istype(W, /obj/item/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>")
|
||||
if (do_after(user, 40*W.toolspeed, target = src))
|
||||
add_fingerprint(user)
|
||||
user.visible_message( \
|
||||
"[user] fastens \the [src].", \
|
||||
"<span class='notice'>You fasten \the [src]. Now it can dispense pipes.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = TRUE
|
||||
stat &= MAINT
|
||||
if (usr.machine==src)
|
||||
usr << browse(null, "window=pipedispenser")
|
||||
else if(anchored)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>")
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
add_fingerprint(user)
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = FALSE
|
||||
stat |= ~MAINT
|
||||
power_change()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/pipedispenser/wrench_act(mob/living/user, obj/item/I)
|
||||
if(default_unfasten_wrench(user, I, 40))
|
||||
user << browse(null, "window=pipedispenser")
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/pipedispenser/disposal
|
||||
name = "disposal pipe dispenser"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
var/on = TRUE //determines if the turret is on
|
||||
|
||||
var/faction = "turret" // Same faction mobs will never be shot at, no matter the other settings
|
||||
var/list/faction = list("turret") // Same faction mobs will never be shot at, no matter the other settings
|
||||
|
||||
var/datum/effect_system/spark_spread/spark_system //the spark system, used for generating... sparks?
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
//If the turret is destroyed, you can remove it with a crowbar to
|
||||
//try and salvage its components
|
||||
to_chat(user, "<span class='notice'>You begin prying the metal coverings off...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 20))
|
||||
if(prob(70))
|
||||
if(stored_gun)
|
||||
stored_gun.forceMove(loc)
|
||||
@@ -488,9 +488,10 @@
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/proc/in_faction(mob/target)
|
||||
if(!(faction in target.faction))
|
||||
return 0
|
||||
return 1
|
||||
for(var/faction1 in faction)
|
||||
if(faction1 in target.faction)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/porta_turret/proc/target(atom/movable/target)
|
||||
if(target)
|
||||
@@ -570,7 +571,7 @@
|
||||
stun_projectile_sound = 'sound/weapons/gunshot.ogg'
|
||||
icon_state = "syndie_off"
|
||||
base_icon_state = "syndie"
|
||||
faction = ROLE_SYNDICATE
|
||||
faction = list(ROLE_SYNDICATE)
|
||||
emp_vunerable = 0
|
||||
desc = "A ballistic machine gun auto-turret."
|
||||
|
||||
@@ -592,6 +593,7 @@
|
||||
lethal_projectile_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
desc = "An energy blaster auto-turret."
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/setup()
|
||||
return
|
||||
|
||||
@@ -605,7 +607,7 @@
|
||||
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
|
||||
|
||||
/obj/machinery/porta_turret/ai
|
||||
faction = "silicon"
|
||||
faction = list("silicon")
|
||||
|
||||
/obj/machinery/porta_turret/ai/assess_perp(mob/living/carbon/human/perp)
|
||||
return 10 //AI turrets shoot at everything not in their faction
|
||||
@@ -617,7 +619,7 @@
|
||||
lethal_projectile = /obj/item/projectile/plasma/turret
|
||||
lethal_projectile_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
mode = TURRET_LETHAL //It would be useless in stun mode anyway
|
||||
faction = "neutral" //Minebots, medibots, etc that should not be shot.
|
||||
faction = list("neutral","silicon","turret") //Minebots, medibots, etc that should not be shot.
|
||||
|
||||
/obj/machinery/porta_turret/aux_base/assess_perp(mob/living/carbon/human/perp)
|
||||
return 0 //Never shoot humanoids. You are on your own if Ashwalkers or the like attack!
|
||||
@@ -646,7 +648,7 @@
|
||||
stun_projectile_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
icon_state = "syndie_off"
|
||||
base_icon_state = "syndie"
|
||||
faction = "turret"
|
||||
faction = list("neutral","silicon","turret")
|
||||
emp_vunerable = 0
|
||||
mode = TURRET_LETHAL
|
||||
|
||||
@@ -663,7 +665,7 @@
|
||||
desc = "A turret built with substandard parts and run down further with age. Still capable of delivering lethal lasers to the odd space carp, but not much else."
|
||||
stun_projectile = /obj/item/projectile/beam/weak
|
||||
lethal_projectile = /obj/item/projectile/beam/weak
|
||||
faction = "neutral"
|
||||
faction = list("neutral","silicon","turret")
|
||||
|
||||
////////////////////////
|
||||
//Turret Control Panel//
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
switch(build_step)
|
||||
if(PTURRET_UNSECURED) //first step
|
||||
if(istype(I, /obj/item/wrench) && !anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
anchored = TRUE
|
||||
build_step = PTURRET_BOLTED
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/crowbar) && !anchored)
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
|
||||
new /obj/item/stack/sheet/metal( loc, 5)
|
||||
qdel(src)
|
||||
@@ -48,7 +48,7 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
anchored = FALSE
|
||||
build_step = PTURRET_UNSECURED
|
||||
@@ -57,27 +57,21 @@
|
||||
|
||||
if(PTURRET_START_INTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
|
||||
build_step = PTURRET_INTERNAL_ARMOUR_ON
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) //uses up 5 fuel.
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
|
||||
return
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to remove the turret's interior metal armor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
|
||||
if(I.use_tool(src, user, 20, volume=50, amount=5)) //uses up 5 fuel
|
||||
build_step = PTURRET_BOLTED
|
||||
to_chat(user, "<span class='notice'>You remove the turret's interior metal armor.</span>")
|
||||
new /obj/item/stack/sheet/metal( loc, 2)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -92,7 +86,7 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
|
||||
build_step = PTURRET_START_INTERNAL_ARMOUR
|
||||
return
|
||||
@@ -109,7 +103,7 @@
|
||||
|
||||
if(PTURRET_SENSORS_ON)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_CLOSED
|
||||
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
|
||||
return
|
||||
@@ -126,24 +120,18 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_SENSORS_ON
|
||||
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
|
||||
return
|
||||
|
||||
if(PTURRET_START_EXTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
if(!I.tool_start_check(user, amount=5))
|
||||
return
|
||||
if(WT.get_fuel() < 5)
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to weld the turret's armor down...</span>")
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
if(I.use_tool(src, user, 30, volume=50, amount=5))
|
||||
build_step = PTURRET_EXTERNAL_ARMOUR_ON
|
||||
to_chat(user, "<span class='notice'>You weld the turret's armor down.</span>")
|
||||
|
||||
@@ -161,7 +149,7 @@
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
build_step = PTURRET_CLOSED
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
anchored = !anchored
|
||||
power_change()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "attached" : "detached"] [src].</span>")
|
||||
playsound(loc, G.usesound, 75, 1)
|
||||
G.play_tool_sound(src)
|
||||
return
|
||||
|
||||
var/allowed = is_type_in_typecache(G, allowed_devices)
|
||||
|
||||
@@ -6,6 +6,11 @@ GLOBAL_LIST_EMPTY(req_console_supplies)
|
||||
GLOBAL_LIST_EMPTY(req_console_information)
|
||||
GLOBAL_LIST_EMPTY(allConsoles)
|
||||
|
||||
#define NO_NEW_MESSAGE 0
|
||||
#define NORMAL_MESSAGE_PRIORITY 1
|
||||
#define HIGH_MESSAGE_PRIORITY 2
|
||||
#define EXTREME_MESSAGE_PRIORITY 3 // not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
|
||||
|
||||
/obj/machinery/requests_console
|
||||
name = "requests console"
|
||||
desc = "A console intended to send requests to different departments on the station."
|
||||
@@ -23,11 +28,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
// 5 = ass + info
|
||||
// 6 = sup + info
|
||||
// 7 = ass + sup + info
|
||||
var/newmessagepriority = 0
|
||||
// 0 = no new message
|
||||
// 1 = normal priority
|
||||
// 2 = high priority
|
||||
// 3 = extreme priority - not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
|
||||
var/newmessagepriority = NO_NEW_MESSAGE
|
||||
var/screen = 0
|
||||
// 0 = main menu,
|
||||
// 1 = req. assistance,
|
||||
@@ -40,15 +41,11 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
// 8 = view messages
|
||||
// 9 = authentication before sending
|
||||
// 10 = send announcement
|
||||
var/silent = 0 // set to 1 for it not to beep all the time
|
||||
var/hackState = 0
|
||||
// 0 = not hacked
|
||||
// 1 = hacked
|
||||
var/announcementConsole = 0
|
||||
// 0 = This console cannot be used to send department announcements
|
||||
// 1 = This console can send department announcements
|
||||
var/open = FALSE // 1 if open
|
||||
var/announceAuth = 0 //Will be set to 1 when you authenticate yourself for announcements
|
||||
var/silent = FALSE // set to 1 for it not to beep all the time
|
||||
var/hackState = FALSE
|
||||
var/announcementConsole = FALSE // FALSE = This console cannot be used to send department announcements, TRUE = This console can send department announcements
|
||||
var/open = FALSE // TRUE if open
|
||||
var/announceAuth = FALSE //Will be set to 1 when you authenticate yourself for announcements
|
||||
var/msgVerified = "" //Will contain the name of the person who verified it
|
||||
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
|
||||
var/message = "";
|
||||
@@ -78,11 +75,11 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
if(icon_state != "req_comp_off")
|
||||
icon_state = "req_comp_off"
|
||||
else
|
||||
if(emergency || (newmessagepriority == 3))
|
||||
if(emergency || (newmessagepriority == EXTREME_MESSAGE_PRIORITY))
|
||||
icon_state = "req_comp3"
|
||||
else if(newmessagepriority == 2)
|
||||
else if(newmessagepriority == HIGH_MESSAGE_PRIORITY)
|
||||
icon_state = "req_comp2"
|
||||
else if(newmessagepriority == 1)
|
||||
else if(newmessagepriority == NORMAL_MESSAGE_PRIORITY)
|
||||
icon_state = "req_comp1"
|
||||
else
|
||||
icon_state = "req_comp0"
|
||||
@@ -194,10 +191,10 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
if(8) //view messages
|
||||
for (var/obj/machinery/requests_console/Console in GLOB.allConsoles)
|
||||
if (Console.department == department)
|
||||
Console.newmessagepriority = 0
|
||||
Console.newmessagepriority = NO_NEW_MESSAGE
|
||||
Console.update_icon()
|
||||
|
||||
newmessagepriority = 0
|
||||
newmessagepriority = NO_NEW_MESSAGE
|
||||
update_icon()
|
||||
var/messageComposite = ""
|
||||
for(var/msg in messages) // This puts more recent messages at the *top*, where they belong.
|
||||
@@ -230,12 +227,12 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
|
||||
else //main menu
|
||||
screen = 0
|
||||
announceAuth = 0
|
||||
if (newmessagepriority == 1)
|
||||
announceAuth = FALSE
|
||||
if (newmessagepriority == NORMAL_MESSAGE_PRIORITY)
|
||||
dat += "<div class='notice'>There are new messages</div><BR>"
|
||||
if (newmessagepriority == 2)
|
||||
if (newmessagepriority == HIGH_MESSAGE_PRIORITY)
|
||||
dat += "<div class='notice'>There are new <b>PRIORITY</b> messages</div><BR>"
|
||||
if (newmessagepriority == 3)
|
||||
if (newmessagepriority == EXTREME_MESSAGE_PRIORITY)
|
||||
dat += "<div class='notice'>There are new <b>EXTREME PRIORITY</b> messages</div><BR>"
|
||||
dat += "<A href='?src=[REF(src)];setScreen=8'>View Messages</A><BR><BR>"
|
||||
|
||||
@@ -296,7 +293,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
priority = text2num(href_list["priority"])
|
||||
else
|
||||
message = ""
|
||||
announceAuth = 0
|
||||
announceAuth = FALSE
|
||||
screen = 0
|
||||
|
||||
if(href_list["sendAnnouncement"])
|
||||
@@ -309,7 +306,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
GLOB.news_network.SubmitArticle(message, department, "Station Announcements", null)
|
||||
log_talk(usr,"[key_name(usr)] has made a station announcement: [message]",LOGSAY)
|
||||
message_admins("[key_name_admin(usr)] has made a station announcement.")
|
||||
announceAuth = 0
|
||||
announceAuth = FALSE
|
||||
message = ""
|
||||
screen = 0
|
||||
|
||||
@@ -435,9 +432,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
switch( href_list["setSilent"] )
|
||||
if(null) //skip
|
||||
if("1")
|
||||
silent = 1
|
||||
silent = TRUE
|
||||
else
|
||||
silent = 0
|
||||
silent = FALSE
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -464,31 +461,31 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
capitalize(title)
|
||||
switch(priority)
|
||||
if(2) //High priority
|
||||
if(src.newmessagepriority < 2)
|
||||
src.newmessagepriority = 2
|
||||
src.update_icon()
|
||||
if(!src.silent)
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
if(newmessagepriority < HIGH_MESSAGE_PRIORITY)
|
||||
newmessagepriority = HIGH_MESSAGE_PRIORITY
|
||||
update_icon()
|
||||
if(!silent)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
say(title)
|
||||
src.messages += "<span class='bad'>High Priority</span><BR><b>From:</b> [linkedsender]<BR>[message]"
|
||||
messages += "<span class='bad'>High Priority</span><BR><b>From:</b> [linkedsender]<BR>[message]"
|
||||
|
||||
if(3) // Extreme Priority
|
||||
if(src.newmessagepriority < 3)
|
||||
src.newmessagepriority = 3
|
||||
src.update_icon()
|
||||
if(newmessagepriority < EXTREME_MESSAGE_PRIORITY)
|
||||
newmessagepriority = EXTREME_MESSAGE_PRIORITY
|
||||
update_icon()
|
||||
if(1)
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
say(title)
|
||||
src.messages += "<span class='bad'>!!!Extreme Priority!!!</span><BR><b>From:</b> [linkedsender]<BR>[message]"
|
||||
messages += "<span class='bad'>!!!Extreme Priority!!!</span><BR><b>From:</b> [linkedsender]<BR>[message]"
|
||||
|
||||
else // Normal priority
|
||||
if(src.newmessagepriority < 1)
|
||||
src.newmessagepriority = 1
|
||||
src.update_icon()
|
||||
if(newmessagepriority < NORMAL_MESSAGE_PRIORITY)
|
||||
newmessagepriority = NORMAL_MESSAGE_PRIORITY
|
||||
update_icon()
|
||||
if(!src.silent)
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
say(title)
|
||||
src.messages += "<b>From:</b> [linkedsender]<BR>[message]"
|
||||
messages += "<b>From:</b> [linkedsender]<BR>[message]"
|
||||
|
||||
/obj/machinery/requests_console/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
@@ -519,9 +516,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
updateUsrDialog()
|
||||
if(screen == 10)
|
||||
if (ACCESS_RC_ANNOUNCE in ID.access)
|
||||
announceAuth = 1
|
||||
announceAuth = TRUE
|
||||
else
|
||||
announceAuth = 0
|
||||
announceAuth = FALSE
|
||||
to_chat(user, "<span class='warning'>You are not authorized to send announcements!</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -532,3 +529,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
updateUsrDialog()
|
||||
return
|
||||
return ..()
|
||||
|
||||
#undef NO_NEW_MESSAGE
|
||||
#undef NORMAL_MESSAGE_PRIORITY
|
||||
#undef HIGH_MESSAGE_PRIORITY
|
||||
#undef EXTREME_MESSAGE_PRIORITY
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
/obj/machinery/shieldgen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
panel_open = !panel_open
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>You open the panel and expose the wiring.</span>")
|
||||
@@ -170,11 +170,11 @@
|
||||
to_chat(user, "<span class='warning'>The bolts are covered! Unlocking this would retract the covers.</span>")
|
||||
return
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You secure \the [src] to the floor!</span>")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You unsecure \the [src] from the floor!</span>")
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>\The [src] shuts off!</span>")
|
||||
|
||||
@@ -116,14 +116,14 @@
|
||||
to_chat(user, "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You firmly wrench the bomb to the floor.</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
anchored = TRUE
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>The bolts lock in place.</span>")
|
||||
else
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>You wrench the bomb from the floor.</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
anchored = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")
|
||||
@@ -159,18 +159,12 @@
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
if(payload || !wires.is_all_cut() || !open_panel)
|
||||
return
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) //uses up 5 fuel.
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
|
||||
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
|
||||
return
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to cut [src] apart...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
if(I.use_tool(src, user, 20, volume=50, amount=5)) //uses up 5 fuel
|
||||
to_chat(user, "<span class='notice'>You cut [src] apart.</span>")
|
||||
new /obj/item/stack/sheet/plasteel( loc, 5)
|
||||
qdel(src)
|
||||
@@ -448,7 +442,7 @@
|
||||
|
||||
/obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar) && beakers.len > 0)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
for (var/obj/item/B in beakers)
|
||||
B.forceMove(drop_location())
|
||||
beakers -= B
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
else
|
||||
for(var/n = ++i; n <= optioncount; n++)
|
||||
dat += "<dd><font color='blue'>	[n]. ---------------</font><br></dd>"
|
||||
if(issilicon(usr) && is_special_character(usr))
|
||||
var/mob/living/silicon/S = usr
|
||||
if(istype(S) && S.hack_software)
|
||||
//Malf/Traitor AIs can bruteforce into the system to gain the Key.
|
||||
dat += "<dd><A href='?src=[REF(src)];hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>"
|
||||
else
|
||||
@@ -338,7 +339,8 @@
|
||||
|
||||
//Hack the Console to get the password
|
||||
if (href_list["hack"])
|
||||
if(issilicon(usr) && is_special_character(usr))
|
||||
var/mob/living/silicon/S = usr
|
||||
if(istype(S) && S.hack_software)
|
||||
hacking = TRUE
|
||||
screen = 2
|
||||
//Time it takes to bruteforce is dependant on the password length.
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
cut_overlays()
|
||||
if(panel_open)
|
||||
add_overlay("[initial(icon_state)]-panel")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must first secure [src].</span>")
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
O.throw_at(target, missile_range, missile_speed, spin = 0, diagonals_first = diags_first)
|
||||
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
|
||||
return 1
|
||||
|
||||
//used for projectile initilisation (priming flashbang) and additional logging
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
chassis.toggle_strafe()
|
||||
|
||||
/obj/mecha/AltClick(mob/living/user)
|
||||
if(user == occupant)
|
||||
if((user == occupant) && user.canUseTopic(src))
|
||||
toggle_strafe()
|
||||
|
||||
/obj/mecha/proc/toggle_strafe()
|
||||
|
||||
@@ -2,77 +2,34 @@
|
||||
///// Construction datums //////
|
||||
////////////////////////////////
|
||||
|
||||
/datum/construction/mecha/custom_action(step, atom/used_atom, mob/user)
|
||||
if(istype(used_atom, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = used_atom
|
||||
if (W.remove_fuel(0, user))
|
||||
/datum/construction/mecha/custom_action(step, obj/item/I, mob/user)
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(I.use_tool(holder, user, 0))
|
||||
playsound(holder, 'sound/items/welder2.ogg', 50, 1)
|
||||
else
|
||||
return FALSE
|
||||
else if(istype(used_atom, /obj/item/wrench))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/screwdriver))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
else if(I.tool_behaviour)
|
||||
return I.use_tool(holder, user, 0, volume=50)
|
||||
|
||||
else if(istype(used_atom, /obj/item/wirecutters))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
else if(istype(I, /obj/item/stack))
|
||||
return I.use_tool(holder, user, 0, volume=50, amount=5)
|
||||
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.use(4))
|
||||
playsound(holder, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
else
|
||||
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task!</span>"))
|
||||
return FALSE
|
||||
else if(istype(used_atom, /obj/item/stack/ore/bluespace_crystal))
|
||||
var/obj/item/stack/ore/bluespace_crystal/BSC = used_atom
|
||||
BSC.use(1)
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, ("<span class='warning'>There's not enough material in this stack!</span>"))
|
||||
return FALSE
|
||||
else
|
||||
S.use(5)
|
||||
return TRUE
|
||||
|
||||
/datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user)
|
||||
if(istype(used_atom, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = used_atom
|
||||
if (W.remove_fuel(0, user))
|
||||
/datum/construction/reversible/mecha/custom_action(index as num, diff as num, obj/item/I, mob/user)
|
||||
if(I.tool_behaviour == TOOL_WELDER)
|
||||
if(I.use_tool(holder, user, 0))
|
||||
playsound(holder, 'sound/items/welder2.ogg', 50, 1)
|
||||
else
|
||||
return FALSE
|
||||
else if(istype(used_atom, /obj/item/wrench))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/screwdriver))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
else if(I.tool_behaviour)
|
||||
return I.use_tool(holder, user, 0, volume=50)
|
||||
|
||||
else if(istype(used_atom, /obj/item/wirecutters))
|
||||
var/obj/item/W = used_atom
|
||||
playsound(holder, W.usesound, 50, 1)
|
||||
else if(istype(I, /obj/item/stack))
|
||||
return I.use_tool(holder, user, 0, volume=50, amount=5)
|
||||
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if (C.use(4))
|
||||
playsound(holder, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
else
|
||||
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task!</span>"))
|
||||
return FALSE
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, ("<span class='warning'>There's not enough material in this stack!</span>"))
|
||||
return FALSE
|
||||
else
|
||||
S.use(5)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -240,9 +240,8 @@
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity<max_integrity)
|
||||
if(WT.remove_fuel(1, user))
|
||||
if(obj_integrity < max_integrity)
|
||||
if(W.use_tool(src, user, 0, volume=50, amount=1))
|
||||
if (internal_damage & MECHA_INT_TANK_BREACH)
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
|
||||
@@ -251,9 +250,7 @@
|
||||
obj_integrity += min(10, max_integrity-obj_integrity)
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[WT] needs to be on for this task!</span>")
|
||||
return 1
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
|
||||
return 1
|
||||
|
||||
@@ -36,23 +36,24 @@
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(salvage_num <= 0)
|
||||
if(salvage_num <= 0 || !length(welder_salvage))
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(welder_salvage && welder_salvage.len && WT.remove_fuel(0, user))
|
||||
var/type = prob(70) ? pick(welder_salvage) : null
|
||||
if(type)
|
||||
var/N = new type(get_turf(user))
|
||||
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
|
||||
if(istype(N, /obj/item/mecha_parts/part))
|
||||
welder_salvage -= type
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
else
|
||||
|
||||
if(!I.use_tool(src, user, 0, volume=50))
|
||||
return
|
||||
|
||||
var/type = prob(70) ? pick(welder_salvage) : null
|
||||
if(type)
|
||||
var/N = new type(get_turf(user))
|
||||
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
|
||||
if(istype(N, /obj/item/mecha_parts/part))
|
||||
welder_salvage -= type
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/old
|
||||
name = "dusty robot debris"
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
@@ -265,7 +265,7 @@
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!ismecha(M) && M.anchored && !allow_anchored)
|
||||
if(!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored)
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/obj/effect/spawner/trap
|
||||
name = "random trap"
|
||||
icon = 'icons/obj/hand_of_god_structures.dmi'
|
||||
icon_state = "trap_rand"
|
||||
|
||||
/obj/effect/spawner/trap/Initialize(mapload)
|
||||
..()
|
||||
var/new_type = pick(subtypesof(/obj/structure/trap) - typesof(/obj/structure/trap/ctf))
|
||||
new new_type(get_turf(src))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -126,12 +126,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
@@ -735,7 +735,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips)
|
||||
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips && !QDELETED(src))
|
||||
var/timedelay = usr.client.prefs.tip_delay/100
|
||||
var/user = usr
|
||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
@@ -743,3 +743,72 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
/obj/item/MouseExited()
|
||||
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
// Called when a mob tries to use the item as a tool.
|
||||
// Handles most checks.
|
||||
/obj/item/proc/use_tool(atom/target, mob/living/user, delay, amount=0, volume=0, datum/callback/extra_checks)
|
||||
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
|
||||
// Run the start check here so we wouldn't have to call it manually.
|
||||
if(!delay && !tool_start_check(user, amount))
|
||||
return
|
||||
|
||||
delay *= toolspeed
|
||||
|
||||
// Play tool sound at the beginning of tool usage.
|
||||
play_tool_sound(target, volume)
|
||||
|
||||
if(delay)
|
||||
// Create a callback with checks that would be called every tick by do_after.
|
||||
var/datum/callback/tool_check = CALLBACK(src, .proc/tool_check_callback, user, amount, extra_checks)
|
||||
|
||||
if(ismob(target))
|
||||
if(!do_mob(user, target, delay, extra_checks=tool_check))
|
||||
return
|
||||
|
||||
else
|
||||
if(!do_after(user, delay, target=target, extra_checks=tool_check))
|
||||
return
|
||||
else
|
||||
// Invoke the extra checks once, just in case.
|
||||
if(extra_checks && !extra_checks.Invoke())
|
||||
return
|
||||
|
||||
// Use tool's fuel, stack sheets or charges if amount is set.
|
||||
if(amount && !use(amount))
|
||||
return
|
||||
|
||||
// Play tool sound at the end of tool usage,
|
||||
// but only if the delay between the beginning and the end is not too small
|
||||
if(delay >= MIN_TOOL_SOUND_DELAY)
|
||||
play_tool_sound(target, volume)
|
||||
|
||||
return TRUE
|
||||
|
||||
// Called before use_tool if there is a delay, or by use_tool if there isn't.
|
||||
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
|
||||
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
|
||||
return tool_use_check(user, amount)
|
||||
|
||||
// A check called by tool_start_check once, and by use_tool on every tick of delay.
|
||||
/obj/item/proc/tool_use_check(mob/living/user, amount)
|
||||
return !amount
|
||||
|
||||
// Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc.
|
||||
// Returns TRUE on success, FALSE on failure.
|
||||
/obj/item/proc/use(used)
|
||||
return !used
|
||||
|
||||
// Plays item's usesound, if any.
|
||||
/obj/item/proc/play_tool_sound(atom/target, volume=50)
|
||||
if(target && usesound && volume)
|
||||
var/played_sound = usesound
|
||||
|
||||
if(islist(usesound))
|
||||
played_sound = pick(usesound)
|
||||
|
||||
playsound(target, played_sound, volume, 1)
|
||||
|
||||
// Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.
|
||||
/obj/item/proc/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
flags_1 = CONDUCT_1 | NOBLUDGEON_1
|
||||
slot_flags = SLOT_BELT
|
||||
usesound = 'sound/effects/spray2.ogg'
|
||||
|
||||
var/obj/item/device/toner/ink = null
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
//This proc doesn't just check if the painter can be used, but also uses it.
|
||||
//Only call this if you are certain that the painter will be used right after this check!
|
||||
/obj/item/airlock_painter/proc/use(mob/user)
|
||||
/obj/item/airlock_painter/proc/use_paint(mob/user)
|
||||
if(can_use(user))
|
||||
ink.charges--
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
var/obj/machinery/door/firedoor/FD = D
|
||||
FD.CalculateAffectingAreas()
|
||||
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
|
||||
log_game("[key_name(usr)] has renamed [prevname] to [str]")
|
||||
interact()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -78,6 +78,18 @@
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/card/emagfake
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
|
||||
/obj/item/card/emagfake/afterattack()
|
||||
. = ..()
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
|
||||
/obj/item/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
@@ -109,10 +121,11 @@
|
||||
update_label()
|
||||
|
||||
/obj/item/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [icon2html(src, viewers(user))] [src.name].</span>", \
|
||||
if(Adjacent(user))
|
||||
user.visible_message("<span class='notice'>[user] shows you: [icon2html(src, viewers(user))] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/card/id/examine(mob/user)
|
||||
..()
|
||||
@@ -148,6 +161,12 @@ update_label("John Doe", "Clowny")
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
|
||||
/obj/item/card/id/silver/reaper
|
||||
name = "Thirteen's ID Card (Reaper)"
|
||||
access = list(ACCESS_MAINT_TUNNELS)
|
||||
assignment = "Reaper"
|
||||
registered_name = "Thirteen"
|
||||
|
||||
/obj/item/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
|
||||
@@ -807,4 +807,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
|
||||
if(reagents && reagents.total_volume)
|
||||
hand_reagents()
|
||||
hand_reagents()
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
build_path = /obj/machinery/recharger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cell_charger
|
||||
name = "Cell Charger (Machine Board)"
|
||||
build_path = /obj/machinery/cell_charger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cyborgrecharger
|
||||
name = "Cyborg Recharger (Machine Board)"
|
||||
build_path = /obj/machinery/recharge_station
|
||||
@@ -287,7 +292,7 @@
|
||||
new_setting = "Freezer"
|
||||
name = initial(new_type.name)
|
||||
build_path = initial(new_type.build_path)
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -584,6 +589,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/reagentgrinder
|
||||
name = "Machine Design (All-In-One Grinder)"
|
||||
build_path = /obj/machinery/reagentgrinder/constructed
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/condi
|
||||
name = "CondiMaster 3000 (Machine Board)"
|
||||
build_path = /obj/machinery/chem_master/condimaster
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, be_close=TRUE))
|
||||
if(user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
#define PDA_SCANNER_NONE 0
|
||||
#define PDA_SCANNER_MEDICAL 1
|
||||
#define PDA_SCANNER_FORENSICS 2 //unused
|
||||
#define PDA_SCANNER_REAGENT 3
|
||||
#define PDA_SCANNER_HALOGEN 4
|
||||
#define PDA_SCANNER_GAS 5
|
||||
|
||||
/obj/item/device/pda
|
||||
name = "\improper PDA"
|
||||
@@ -39,11 +45,11 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
#define MODE_VT 3
|
||||
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
var/fon = 0 //Is the flashlight function on?
|
||||
var/scanmode = PDA_SCANNER_NONE
|
||||
var/fon = FALSE //Is the flashlight function on?
|
||||
var/f_lum = 2.3 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/silent = FALSE //To beep or not to beep, that is the question
|
||||
var/toff = FALSE //If TRUE, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
var/last_text //No text spamming
|
||||
var/last_noise //Also no honk spamming that's bad too
|
||||
@@ -53,10 +59,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
||||
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
|
||||
var/notehtml = ""
|
||||
var/notescanned = 0 // True if what is in the notekeeper was from a paper.
|
||||
var/notescanned = FALSE // True if what is in the notekeeper was from a paper.
|
||||
var/detonatable = TRUE // Can the PDA be blown up?
|
||||
var/hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/emped = 0
|
||||
var/hidden = FALSE // Is the PDA hidden from the PDA list?
|
||||
var/emped = FALSE
|
||||
var/equipped = FALSE //used here to determine if this is the first time its been picked up
|
||||
|
||||
var/obj/item/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
|
||||
@@ -415,7 +421,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if (!isnull(cartridge))
|
||||
U.put_in_hands(cartridge)
|
||||
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
|
||||
scanmode = 0
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
cartridge.host_pda = null
|
||||
cartridge = null
|
||||
update_icon()
|
||||
@@ -440,40 +446,40 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
if("Light")
|
||||
if(fon)
|
||||
fon = 0
|
||||
fon = FALSE
|
||||
set_light(0)
|
||||
else if(f_lum)
|
||||
fon = 1
|
||||
fon = TRUE
|
||||
set_light(f_lum)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_MEDICAL)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL))
|
||||
scanmode = 1
|
||||
scanmode = PDA_SCANNER_MEDICAL
|
||||
if("Reagent Scan")
|
||||
if(scanmode == 3)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_REAGENT)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_REAGENT_SCANNER))
|
||||
scanmode = 3
|
||||
scanmode = PDA_SCANNER_REAGENT
|
||||
if("Halogen Counter")
|
||||
if(scanmode == 4)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_HALOGEN)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE))
|
||||
scanmode = 4
|
||||
scanmode = PDA_SCANNER_HALOGEN
|
||||
if("Honk")
|
||||
if ( !(last_noise && world.time < last_noise + 20) )
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
last_noise = world.time
|
||||
if("Trombone")
|
||||
if ( !(last_noise && world.time < last_noise + 20) )
|
||||
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1)
|
||||
playsound(src, 'sound/misc/sadtrombone.ogg', 50, 1)
|
||||
last_noise = world.time
|
||||
if("Gas Scan")
|
||||
if(scanmode == 5)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_GAS)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS))
|
||||
scanmode = 5
|
||||
scanmode = PDA_SCANNER_GAS
|
||||
if("Drone Phone")
|
||||
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
|
||||
var/area/A = get_area(U)
|
||||
@@ -491,7 +497,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if (mode == 1 && n)
|
||||
note = n
|
||||
notehtml = parsemarkdown(n, U)
|
||||
notescanned = 0
|
||||
notescanned = FALSE
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -571,7 +577,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
@@ -656,7 +662,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
|
||||
|
||||
if (!silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3)
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
@@ -816,9 +822,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
healthscan(user, C, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(2)
|
||||
// Unused
|
||||
|
||||
if(4)
|
||||
C.visible_message("<span class='warning'>[user] has analyzed [C]'s radiation levels!</span>")
|
||||
|
||||
@@ -875,7 +878,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
note = replacetext(note, "<ul>", "\[list\]")
|
||||
note = replacetext(note, "</ul>", "\[/list\]")
|
||||
note = html_encode(note)
|
||||
notescanned = 1
|
||||
notescanned = TRUE
|
||||
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
|
||||
|
||||
|
||||
@@ -996,3 +999,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(!P.owner || P.toff || P.hidden)
|
||||
continue
|
||||
. += P
|
||||
|
||||
#undef PDA_SCANNER_NONE
|
||||
#undef PDA_SCANNER_MEDICAL
|
||||
#undef PDA_SCANNER_REAGENT
|
||||
#undef PDA_SCANNER_HALOGEN
|
||||
#undef PDA_SCANNER_GAS
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/device/pda/ai
|
||||
icon_state = "NONE"
|
||||
ttone = "data"
|
||||
fon = 0
|
||||
fon = FALSE
|
||||
detonatable = FALSE
|
||||
|
||||
/obj/item/device/pda/ai/attack_self(mob/user)
|
||||
@@ -84,7 +84,7 @@
|
||||
default_cartridge = /obj/item/cartridge/virus/mime
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
icon_state = "pda-mime"
|
||||
silent = 1
|
||||
silent = TRUE
|
||||
ttone = "silence"
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
@@ -176,7 +176,7 @@
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
|
||||
silent = 1 //Quiet in the library!
|
||||
silent = TRUE //Quiet in the library!
|
||||
overlays_x_offset = -3
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
to_chat(U, "<span class='notice'>Virus Sent!</span>")
|
||||
target.silent = 1
|
||||
target.silent = TRUE
|
||||
target.ttone = "silence"
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
@@ -67,10 +67,10 @@
|
||||
var/difficulty = 0
|
||||
if(target.cartridge)
|
||||
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
|
||||
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
loop.start()
|
||||
|
||||
/obj/item/device/geiger_counter/rad_act(amount)
|
||||
. = ..()
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
@@ -169,11 +170,9 @@
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
if(!do_after(user, 40*I.toolspeed, target = user))
|
||||
if(!I.use_tool(src, user, 40, volume=50))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
@@ -182,7 +181,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/geiger_counter/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
@@ -200,6 +199,20 @@
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg
|
||||
var/datum/component/mobhook
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_RAD_ACT), CALLBACK(src, /atom.proc/rad_act))
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg/dropped()
|
||||
. = ..()
|
||||
QDEL_NULL(mobhook)
|
||||
|
||||
#undef RAD_LEVEL_NORMAL
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
#undef RAD_LEVEL_HIGH
|
||||
|
||||
@@ -41,10 +41,12 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/device/gps/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
toggletracking(user)
|
||||
|
||||
/obj/item/device/gps/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, "It's busted!")
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
|
||||
@@ -57,37 +57,28 @@
|
||||
|
||||
/obj/item/device/radio/intercom/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/obj/item/screwdriver/S = I
|
||||
if(unfastened)
|
||||
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
if(!do_after(user, 30 * S.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s screws!</span>", "<span class='notice'>You tighten [src]'s screws.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
unfastened = FALSE
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s screws!</span>", "<span class='notice'>You tighten [src]'s screws.</span>")
|
||||
unfastened = FALSE
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] starts loosening [src]'s screws...</span>", "<span class='notice'>You start unscrewing [src]...</span>")
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
if(!do_after(user, 60 * S.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
unfastened = TRUE
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
unfastened = TRUE
|
||||
return
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!unfastened)
|
||||
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
|
||||
return
|
||||
var/obj/item/wrench/W = I
|
||||
user.visible_message("<span class='notice'>[user] starts unsecuring [src]...</span>", "<span class='notice'>You start unsecuring [src]...</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(!do_after(user, 80 * W.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] unsecures [src]!</span>", "<span class='notice'>You detach [src] from the wall.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/wallframe/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 80))
|
||||
user.visible_message("<span class='notice'>[user] unsecures [src]!</span>", "<span class='notice'>You detach [src] from the wall.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/wallframe/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -276,17 +276,11 @@
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(I.use_tool(src, user, 120))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "dicebag"
|
||||
|
||||
/obj/item/storage/pill_bottle/dice/New()
|
||||
..()
|
||||
/obj/item/storage/pill_bottle/dice/Initialize()
|
||||
. = ..()
|
||||
var/special_die = pick("1","2","fudge","space","00","8bd20","4dd6","100")
|
||||
if(special_die == "1")
|
||||
new /obj/item/dice/d1(src)
|
||||
@@ -46,10 +46,10 @@
|
||||
var/can_be_rigged = TRUE
|
||||
var/rigged = FALSE
|
||||
|
||||
/obj/item/dice/New()
|
||||
result = rand(1, sides)
|
||||
/obj/item/dice/Initialize()
|
||||
. = ..()
|
||||
result = roll(sides)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/dice/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -85,8 +85,8 @@
|
||||
desc = "A die with six sides. 6 TIMES 255 TIMES 255 TILE TOTAL EXISTENCE, SQUARE YOUR MIND OF EDUCATED STUPID: 2 DOES NOT EXIST."
|
||||
icon_state = "spaced6"
|
||||
|
||||
/obj/item/dice/d6/space/New()
|
||||
..()
|
||||
/obj/item/dice/d6/space/Initialize()
|
||||
. = ..()
|
||||
if(prob(10))
|
||||
name = "spess cube"
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
name = "d100"
|
||||
desc = "A die with one hundred sides! Probably not fairly weighted..."
|
||||
icon_state = "d100"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sides = 100
|
||||
|
||||
/obj/item/dice/d100/update_icon()
|
||||
@@ -164,14 +165,14 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
result = rand(1, sides)
|
||||
result = roll(sides)
|
||||
if(rigged && result != rigged)
|
||||
if(prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
|
||||
result = rigged
|
||||
var/fake_result = rand(1, sides)//Daredevil isn't as good as he used to be
|
||||
var/fake_result = roll(sides)//Daredevil isn't as good as he used to be
|
||||
var/comment = ""
|
||||
if(sides == 20 && result == 20)
|
||||
comment = "Nat 20!"
|
||||
comment = "NAT 20!"
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
update_icon()
|
||||
|
||||
@@ -191,6 +191,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/extinguisher/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
EmptyExtinguisher(user)
|
||||
|
||||
/obj/item/extinguisher/proc/EmptyExtinguisher(var/mob/user)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
toggle_igniter(user)
|
||||
|
||||
/obj/item/flamethrower/AltClick(mob/user)
|
||||
if(ptank && isliving(user) && !user.incapacitated() && Adjacent(user))
|
||||
if(ptank && isliving(user) && user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
user.put_in_hands(ptank)
|
||||
ptank = null
|
||||
to_chat(user, "<span class='notice'>You remove the plasma tank from [src]!</span>")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
to_chat(user, "<span class='notice'>You lock the [initial(name)] assembly.</span>")
|
||||
playsound(loc, I.usesound, 25, -3)
|
||||
I.play_tool_sound(src, 25)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
|
||||
else if(stage == READY && !nadeassembly)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
playsound(src, I.usesound, 20, 1)
|
||||
I.play_tool_sound(src, 20)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
|
||||
@@ -40,10 +40,11 @@
|
||||
var/cuffsound = 'sound/weapons/handcuffs.ogg'
|
||||
var/trashtype = null //for disposable cuffs
|
||||
|
||||
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
|
||||
if(iscarbon(user) && (user.has_trait(TRAIT_CLUMSY) && prob(50)))
|
||||
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
|
||||
apply_cuffs(user,user)
|
||||
return
|
||||
@@ -61,7 +62,10 @@
|
||||
|
||||
playsound(loc, cuffsound, 30, 1, -2)
|
||||
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
|
||||
apply_cuffs(C,user)
|
||||
if(iscyborg(user))
|
||||
apply_cuffs(C, user, TRUE)
|
||||
else
|
||||
apply_cuffs(C, user)
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
|
||||
@@ -113,7 +117,6 @@
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=75)
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
var/datum/robot_energy_storage/wirestorage = null
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/Initialize(mapload, param_color)
|
||||
. = ..()
|
||||
@@ -128,23 +131,6 @@
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
if(wirestorage && wirestorage.energy < 15)
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [C]!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
|
||||
if(wirestorage)
|
||||
if(!wirestorage.use_charge(15))
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [target]!</span>")
|
||||
return
|
||||
return ..(target, user, 1)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/red
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
@@ -215,21 +201,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(iscyborg(user))
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put zipties on [C]!</span>")
|
||||
if(do_mob(user, C, 30))
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_handcuffed()
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to handcuff [C]!</span>")
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
|
||||
@@ -249,7 +220,6 @@
|
||||
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
|
||||
return
|
||||
|
||||
|
||||
//Legcuffs
|
||||
|
||||
/obj/item/restraints/legcuffs
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
//CREATOR'S NOTE: DO NOT FUCKING GIVE THIS TO BOTANY!
|
||||
/obj/item/hot_potato
|
||||
name = "hot potato"
|
||||
desc = "A label on the side of this potato reads \"Product of DonkCo Service Wing. Activate far away from populated areas. Device will only attach to sapient creatures.\" <span class='boldnotice'>You can attack anyone with it to force it on them instead of yourself!</span>"
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "potato"
|
||||
flags_1 = NOBLUDGEON_1
|
||||
force = 0
|
||||
var/icon_off = "potato"
|
||||
var/icon_on = "potato_active"
|
||||
var/detonation_timerid
|
||||
var/activation_time = 0
|
||||
var/timer = 600 //deciseconds
|
||||
var/show_timer = FALSE
|
||||
var/reusable = FALSE //absolute madman
|
||||
var/sticky = TRUE
|
||||
var/forceful_attachment = TRUE
|
||||
var/stimulant = TRUE
|
||||
var/detonate_explosion = TRUE
|
||||
var/detonate_dev_range = 0
|
||||
var/detonate_heavy_range = 0
|
||||
var/detonate_light_range = 2
|
||||
var/detonate_flash_range = 5
|
||||
var/detonate_fire_range = 5
|
||||
|
||||
var/color_val = FALSE
|
||||
|
||||
/obj/item/hot_potato/proc/detonate()
|
||||
var/atom/location = loc
|
||||
location.visible_message("<span class='userdanger'>[src] [detonate_explosion? "explodes" : "activates"]!</span>", "<span class='userdanger'>[src] activates! You've ran out of time!</span>")
|
||||
if(detonate_explosion)
|
||||
explosion(src, detonate_dev_range, detonate_heavy_range, detonate_light_range, detonate_flash_range, flame_range = detonate_fire_range)
|
||||
deactivate()
|
||||
if(!reusable)
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.dropItemToGround(src, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/hot_potato/proc/is_active()
|
||||
return isnull(detonation_timerid)? FALSE : TRUE
|
||||
|
||||
/obj/item/hot_potato/attack_self(mob/user)
|
||||
if(activate(timer, user))
|
||||
user.visible_message("<span class='boldwarning'>[user] squeezes [src], which promptly starts to flash red-hot colors!</span>", "<span class='boldwarning'>You squeeze [src], activating its countdown and attachment mechanism!</span>",
|
||||
"<span class='boldwarning'>You hear a mechanical click and a loud beeping!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/hot_potato/process()
|
||||
if(stimulant)
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.SetStun(0)
|
||||
L.SetKnockdown(0)
|
||||
L.SetSleeping(0)
|
||||
L.SetUnconscious(0)
|
||||
L.reagents.add_reagent("muscle_stimulant", CLAMP(5 - L.reagents.get_reagent_amount("muscle_stimulant"), 0, 5)) //If you don't have legs or get bola'd, tough luck!
|
||||
color_val = !color_val
|
||||
L.add_atom_colour(color_val? "#ffff00" : "#00ffff", FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/examine(mob/user)
|
||||
. = ..()
|
||||
if(is_active())
|
||||
to_chat(user, "<span class='warning'>[src] is flashing red-hot! You should probably get rid of it!</span>")
|
||||
if(show_timer)
|
||||
to_chat(user, "<span class='warning'>[src]'s timer looks to be at [(activation_time - world.time) / 10] seconds!</span>")
|
||||
|
||||
/obj/item/hot_potato/equipped(mob/user)
|
||||
. = ..()
|
||||
if(is_active())
|
||||
to_chat(user, "<span class='userdanger'>You have a really bad feeling about [src]!</span>")
|
||||
|
||||
/obj/item/hot_potato/afterattack(atom/target, mob/user, adjacent, params)
|
||||
if(!adjacent || !ismob(target))
|
||||
return ..()
|
||||
force_onto(target, user)
|
||||
|
||||
/obj/item/hot_potato/proc/force_onto(mob/living/victim, mob/user)
|
||||
if(!istype(victim) || user != loc || victim == user)
|
||||
return FALSE
|
||||
if(!victim.client)
|
||||
to_chat(user, "<span class='boldwarning'>[src] refuses to attach to a non-sapient creature!</span>")
|
||||
if(victim.stat != CONSCIOUS || !victim.get_num_legs())
|
||||
to_chat(user, "<span class='boldwarning'>[src] refuses to attach to someone incapable of using it!</span>")
|
||||
user.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
. = FALSE
|
||||
if(!victim.put_in_hands(src))
|
||||
if(forceful_attachment)
|
||||
victim.dropItemToGround(victim.get_inactive_held_item())
|
||||
if(!victim.put_in_hands(src))
|
||||
victim.dropItemToGround(victim.get_active_held_item())
|
||||
if(victim.put_in_hands(src))
|
||||
. = TRUE
|
||||
else
|
||||
. = TRUE
|
||||
else
|
||||
. = TRUE
|
||||
if(.)
|
||||
add_logs(user, victim, "forced a hot potato with explosive variables ([detonate_explosion]-[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_flash_range]/[detonate_fire_range]) onto")
|
||||
user.visible_message("<span class='userdanger'>[user] forces [src] onto [victim]!</span>", "<span class='userdanger'>You force [src] onto [victim]!</span>", "<span class='boldwarning'>You hear a mechanical click and a beep.</span>")
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
else
|
||||
add_logs(user, victim, "tried to force a hot potato with explosive variables ([detonate_explosion]-[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_flash_range]/[detonate_fire_range]) onto")
|
||||
user.visible_message("<span class='boldwarning'>[user] tried to force [src] onto [victim], but it could not attach!</span>", "<span class='boldwarning'>You try to force [src] onto [victim], but it is unable to attach!</span>", "<span class='boldwarning'>You hear a mechanical click and two buzzes.</span>")
|
||||
user.put_in_hands(src)
|
||||
|
||||
/obj/item/hot_potato/dropped(mob/user)
|
||||
. = ..()
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/proc/activate(delay, mob/user)
|
||||
if(is_active())
|
||||
return
|
||||
update_icon()
|
||||
if(sticky)
|
||||
flags_1 |= NODROP_1
|
||||
name = "primed [name]"
|
||||
activation_time = timer + world.time
|
||||
detonation_timerid = addtimer(CALLBACK(src, .proc/detonate), delay, TIMER_STOPPABLE)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[user? "[ADMIN_LOOKUPFLW(user)] has primed [src]" : "A [src] has been primed"] (Timer:[delay],Explosive:[detonate_explosion],Range:[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_fire_range]) for detonation at [COORD(T)]([T.loc])")
|
||||
log_game("[user? "[user] has primed [src]" : "A [src] has been primed"] ([detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_fire_range]) for detonation at [COORD(T)]([T.loc])")
|
||||
|
||||
/obj/item/hot_potato/proc/deactivate()
|
||||
update_icon()
|
||||
name = initial(name)
|
||||
flags_1 &= ~NODROP_1
|
||||
deltimer(detonation_timerid)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
detonation_timerid = null
|
||||
if(ismob(loc))
|
||||
var/mob/user = loc
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/update_icon()
|
||||
icon_state = is_active()? icon_on : icon_off
|
||||
|
||||
/obj/item/hot_potato/syndicate
|
||||
detonate_light_range = 4
|
||||
detonate_fire_range = 5
|
||||
|
||||
/obj/item/hot_potato/harmless
|
||||
detonate_explosion = FALSE
|
||||
|
||||
/obj/item/hot_potato/harmless/toy
|
||||
desc = "A label on the side of this potato reads \"Product of DonkCo Toys and Recreation department.\" <span class='boldnotice'>You can attack anyone with it to put it on them instead, if they have a free hand to take it!</span>"
|
||||
sticky = FALSE
|
||||
reusable = TRUE
|
||||
forceful_attachment = FALSE
|
||||
@@ -40,7 +40,7 @@
|
||||
//What does the implant do upon injection?
|
||||
//return 1 if the implant injects
|
||||
//return 0 if there is no room for implant / it fails
|
||||
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
LAZYINITLIST(target.implants)
|
||||
if(!target.can_be_implanted() || !can_be_implanted_in(target))
|
||||
return 0
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
|
||||
moveToNullspace()
|
||||
imp_in = null
|
||||
source.implants -= src
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
if(..())
|
||||
if(!target.mind)
|
||||
return TRUE
|
||||
@@ -38,7 +38,7 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implant/mindshield/removed(mob/target, silent = 0, special = 0)
|
||||
/obj/item/implant/mindshield/removed(mob/target, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
if(target.stat != DEAD && !silent)
|
||||
to_chat(target, "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>")
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
/obj/item/implant/radio
|
||||
name = "internal radio implant"
|
||||
desc = "Are you there God? It's me, Syndicate Comms Agent."
|
||||
activated = TRUE
|
||||
var/obj/item/device/radio/radio
|
||||
var/radio_key = /obj/item/device/encryptionkey/syndicate
|
||||
var/radio_key
|
||||
var/subspace_transmission = FALSE
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "walkietalkie"
|
||||
|
||||
@@ -98,11 +98,26 @@
|
||||
// almost like an internal headset, but without the
|
||||
// "must be in ears to hear" restriction.
|
||||
radio.name = "internal radio"
|
||||
radio.subspace_transmission = TRUE
|
||||
radio.subspace_transmission = subspace_transmission
|
||||
radio.canhear_range = 0
|
||||
radio.keyslot = new radio_key
|
||||
if(radio_key)
|
||||
radio.keyslot = new radio_key
|
||||
radio.recalculateChannels()
|
||||
|
||||
/obj/item/implant/radio/mining
|
||||
radio_key = /obj/item/device/encryptionkey/headset_cargo
|
||||
|
||||
/obj/item/implant/radio/syndicate
|
||||
desc = "Are you there God? It's me, Syndicate Comms Agent."
|
||||
radio_key = /obj/item/device/encryptionkey/syndicate
|
||||
subspace_transmission = TRUE
|
||||
|
||||
/obj/item/implant/radio/slime
|
||||
name = "slime radio"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "adamantine_resonator"
|
||||
radio_key = /obj/item/device/encryptionkey/headset_sci
|
||||
subspace_transmission = TRUE
|
||||
|
||||
/obj/item/implant/radio/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
@@ -114,3 +129,8 @@
|
||||
/obj/item/implanter/radio
|
||||
name = "implanter (internal radio)"
|
||||
imp_type = /obj/item/implant/radio
|
||||
|
||||
/obj/item/implanter/radio/syndicate
|
||||
name = "implanter (internal syndicate radio)"
|
||||
imp_type = /obj/item/implant/radio/syndicate
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 6
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
silent = 1
|
||||
silent = TRUE
|
||||
|
||||
|
||||
/obj/item/implant/storage
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/item/implant/storage/activate()
|
||||
storage.MouseDrop(imp_in)
|
||||
|
||||
/obj/item/implant/storage/removed(source, silent = 0, special = 0)
|
||||
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
if(!special)
|
||||
storage.close_all()
|
||||
@@ -28,7 +28,7 @@
|
||||
storage.remove_from_storage(I, get_turf(source))
|
||||
return 1
|
||||
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/storage/imp_e = X
|
||||
|
||||
@@ -25,10 +25,13 @@
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on the side of [src]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(t)
|
||||
name = "implant case - '[t]'"
|
||||
|
||||
@@ -1,70 +1,73 @@
|
||||
/obj/item/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/implanter/Initialize(mapload)
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/implant/adrenalin
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/implant/emp
|
||||
/obj/item/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You prod at [src] with [W]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/implanter/Initialize(mapload)
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/implant/adrenalin
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/implant/emp
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
for(var/X in target.implants)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/item/inducer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
|
||||
opened = TRUE
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/pet_carrier/AltClick(mob/living/user)
|
||||
if(open || !user.canUseTopic(src, be_close=TRUE))
|
||||
if(open || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You flip the lock switch [locked ? "down" : "up"].</span>")
|
||||
@@ -151,7 +151,7 @@
|
||||
add_overlay("[locked ? "" : "un"]locked")
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
if(isopenturf(over_atom) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
usr.visible_message("<span class='notice'>[usr] unloads [src].</span>", \
|
||||
"<span class='notice'>You unload [src] onto [over_atom].</span>")
|
||||
for(var/V in occupants)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
to_chat(user, "<span class='warning'>You already murdered it!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tears out the stuffing from [src]!</span>", "<span class='notice'>You rip a bunch of the stuffing from [src]. Murderer.</span>")
|
||||
playsound(I, I.usesound, 50, TRUE)
|
||||
I.play_tool_sound(src)
|
||||
stuffed = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the grenade from [src].</span>")
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
fisto_setting = 3
|
||||
if(3)
|
||||
fisto_setting = 1
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(tank)
|
||||
|
||||
@@ -25,14 +25,11 @@
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.forceMove(loc)
|
||||
|
||||
/obj/item/target/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
else
|
||||
return ..()
|
||||
/obj/item/target/welder_act(mob/living/user, obj/item/I)
|
||||
if(I.use_tool(src, user, 0, volume=40))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
if(pinnedLoc)
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
actions_types = list(/datum/action/item_action/nano_picket_sign)
|
||||
|
||||
/obj/item/picket_sign/proc/retext(mob/user)
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt && Adjacent(user))
|
||||
if(txt && user.canUseTopic(src, BE_CLOSE))
|
||||
label = txt
|
||||
name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
|
||||
@@ -40,17 +40,15 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
if(W.use_tool(src, user, 0, volume=40))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
user.visible_message("[user.name] shaped [src] into metal with [W].", \
|
||||
"<span class='notice'>You shape [src] into metal with [W].</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
|
||||
@@ -181,6 +181,41 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
recipes = GLOB.prglass_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(titaniumglass_recipes, list(
|
||||
new/datum/stack_recipe("shuttle window", /obj/structure/window/shuttle/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/titaniumglass
|
||||
name = "titanium glass"
|
||||
desc = "A glass sheet made out of a titanium-silicate alloy."
|
||||
singular_name = "titanium glass sheet"
|
||||
icon_state = "sheet-titaniumglass"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/titaniumglass
|
||||
|
||||
/obj/item/stack/sheet/titaniumglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.titaniumglass_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
new/datum/stack_recipe("plastitanium window", /obj/structure/window/plastitanium/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/plastitaniumglass
|
||||
name = "plastitanium glass"
|
||||
desc = "A glass sheet made out of a plasma-titanium-silicate alloy."
|
||||
singular_name = "plastitanium glass sheet"
|
||||
icon_state = "sheet-plastitaniumglass"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/plastitaniumglass
|
||||
|
||||
/obj/item/stack/sheet/plastitaniumglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plastitaniumglass_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/shard
|
||||
name = "shard"
|
||||
@@ -244,21 +279,22 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
/obj/item/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/lightreplacer))
|
||||
I.attackby(src, user)
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G == NG)
|
||||
continue
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/shard/welder_act(mob/living/user, obj/item/I)
|
||||
if(I.use_tool(src, user, 0, volume=50))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G == NG)
|
||||
continue
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/shard/Crossed(mob/living/L)
|
||||
if(istype(L) && has_gravity(loc))
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
|
||||
@@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "plastitanium"
|
||||
materials = list(MAT_TITANIUM=2000, MAT_PLASMA=2000)
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
|
||||
new/datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
grind_results[grind_results[i]] *= amount //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
|
||||
/obj/item/stack/grind_requirements()
|
||||
if(is_cyborg)
|
||||
@@ -247,7 +247,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/stack/proc/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
|
||||
/obj/item/stack/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
|
||||
if(zero_amount())
|
||||
return 0
|
||||
if (is_cyborg)
|
||||
@@ -260,6 +260,20 @@
|
||||
update_weight()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/tool_use_check(mob/living/user, amount)
|
||||
if(get_amount() < amount)
|
||||
if(singular_name)
|
||||
if(amount > 1)
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name]\s to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name] to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] to do this!</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/zero_amount()
|
||||
if(is_cyborg)
|
||||
return source.energy < cost
|
||||
@@ -310,10 +324,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(is_cyborg)
|
||||
return
|
||||
@@ -324,7 +335,7 @@
|
||||
var/min = 0
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as num)
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src))
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else
|
||||
change_stack(user,stackmaterial)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user