Merge remote-tracking branch 'upstream/master' into psych+paramedic
This commit is contained in:
@@ -1367,3 +1367,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/tcommsat/lounge
|
||||
name = "Telecommunications Satellite Lounge"
|
||||
icon_state = "tcomsatlounge"
|
||||
|
||||
/area/crew_quarters/fitness/pool
|
||||
name = "Pool Area"
|
||||
icon_state = "pool"
|
||||
|
||||
@@ -63,6 +63,15 @@
|
||||
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
|
||||
var/list/canSmoothWithAreas //typecache to limit the areas that atoms in this area can smooth with
|
||||
|
||||
/**
|
||||
* These two vars allow for multiple unique areas to be linked to a master area
|
||||
* and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing
|
||||
* their own flags, statuses, variables and more snowflakes.
|
||||
* Friendly reminder: no map edited areas.
|
||||
*/
|
||||
var/list/area/sub_areas //list of typepaths of the areas you wish to link here, will be replaced with a list of references on mapload.
|
||||
var/area/base_area //The area we wish to use in place of src for certain actions such as APC area linking.
|
||||
|
||||
var/nightshift_public_area = NIGHTSHIFT_AREA_NONE //considered a public area for nightshift
|
||||
|
||||
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
|
||||
@@ -123,10 +132,35 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
|
||||
reg_in_areas_in_z()
|
||||
|
||||
//so far I'm only implementing it on mapped unique areas, it's easier this way.
|
||||
if(unique && sub_areas)
|
||||
if(type in sub_areas)
|
||||
WARNING("\"[src]\" typepath found inside its own sub-areas list, please make sure it doesn't share its parent type initial sub-areas value.")
|
||||
sub_areas = null
|
||||
else
|
||||
var/paths = sub_areas.Copy()
|
||||
sub_areas = null
|
||||
for(var/type in paths)
|
||||
var/area/A = GLOB.areas_by_type[type]
|
||||
if(!A) //By chance an area not loaded in the current world, no warning report.
|
||||
continue
|
||||
if(A == src)
|
||||
WARNING("\"[src]\" area a attempted to link with itself.")
|
||||
continue
|
||||
if(A.base_area)
|
||||
WARNING("[src] attempted to link with [A] while the latter is already linked to another area ([A.base_area]).")
|
||||
continue
|
||||
LAZYADD(sub_areas, A)
|
||||
A.base_area = src
|
||||
else if(LAZYLEN(sub_areas))
|
||||
WARNING("sub-areas are currently not supported for non-unique areas such as [src].")
|
||||
sub_areas = null
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/area/LateInitialize()
|
||||
power_change() // all machines set to current power level, also updates icon
|
||||
if(!base_area) //we don't want to run it twice.
|
||||
power_change() // all machines set to current power level, also updates icon
|
||||
|
||||
/area/proc/reg_in_areas_in_z()
|
||||
if(contents.len)
|
||||
@@ -149,6 +183,19 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/area/Destroy()
|
||||
if(GLOB.areas_by_type[type] == src)
|
||||
GLOB.areas_by_type[type] = null
|
||||
if(base_area)
|
||||
LAZYREMOVE(base_area, src)
|
||||
base_area = null
|
||||
if(sub_areas)
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
A.base_area = null
|
||||
sub_areas -= A
|
||||
if(A.requires_power)
|
||||
A.power_light = FALSE
|
||||
A.power_equip = FALSE
|
||||
A.power_environ = FALSE
|
||||
INVOKE_ASYNC(A, .proc/power_change)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
@@ -214,9 +261,12 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
var/datum/computer_file/program/alarm_monitor/p = item
|
||||
p.cancelAlarm("Atmosphere", src, source)
|
||||
|
||||
src.atmosalm = danger_level
|
||||
return 1
|
||||
return 0
|
||||
atmosalm = danger_level
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
A.atmosalm = danger_level
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/area/proc/ModifyFiredoors(opening)
|
||||
if(firedoors)
|
||||
@@ -241,11 +291,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
return
|
||||
|
||||
if (!fire)
|
||||
set_fire_alarm_effect()
|
||||
set_fire_alarm_effects(TRUE)
|
||||
ModifyFiredoors(FALSE)
|
||||
for(var/item in firealarms)
|
||||
var/obj/machinery/firealarm/F = item
|
||||
F.update_icon()
|
||||
|
||||
for (var/item in GLOB.alert_consoles)
|
||||
var/obj/machinery/computer/station_alert/a = item
|
||||
@@ -264,11 +311,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
|
||||
/area/proc/firereset(obj/source)
|
||||
if (fire)
|
||||
unset_fire_alarm_effects()
|
||||
set_fire_alarm_effects(FALSE)
|
||||
ModifyFiredoors(TRUE)
|
||||
for(var/item in firealarms)
|
||||
var/obj/machinery/firealarm/F = item
|
||||
F.update_icon()
|
||||
|
||||
for (var/item in GLOB.silicon_mobs)
|
||||
var/mob/living/silicon/aiPlayer = item
|
||||
@@ -300,9 +344,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
return
|
||||
|
||||
//Trigger alarm effect
|
||||
set_fire_alarm_effect()
|
||||
set_fire_alarm_effects(TRUE)
|
||||
//Lockdown airlocks
|
||||
for(var/obj/machinery/door/DOOR in src)
|
||||
for(var/obj/machinery/door/DOOR in get_sub_areas_contents(src))
|
||||
close_and_lock_door(DOOR)
|
||||
|
||||
for (var/i in GLOB.silicon_mobs)
|
||||
@@ -311,23 +355,20 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
//Cancel silicon alert after 1 minute
|
||||
addtimer(CALLBACK(SILICON, /mob/living/silicon.proc/cancelAlarm,"Burglar",src,trigger), 600)
|
||||
|
||||
/area/proc/set_fire_alarm_effect()
|
||||
fire = TRUE
|
||||
/area/proc/set_fire_alarm_effects(boolean)
|
||||
fire = boolean
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
A.fire = boolean
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
for(var/alarm in firealarms)
|
||||
var/obj/machinery/firealarm/F = alarm
|
||||
F.update_fire_light(fire)
|
||||
for(var/obj/machinery/light/L in src)
|
||||
F.update_icon()
|
||||
for(var/obj/machinery/light/L in get_sub_areas_contents(src))
|
||||
L.update()
|
||||
|
||||
/area/proc/unset_fire_alarm_effects()
|
||||
fire = FALSE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
for(var/alarm in firealarms)
|
||||
var/obj/machinery/firealarm/F = alarm
|
||||
F.update_fire_light(fire)
|
||||
for(var/obj/machinery/light/L in src)
|
||||
L.update()
|
||||
/area/proc/updateicon()
|
||||
/**
|
||||
* Update the icon state of the area
|
||||
*
|
||||
@@ -380,26 +421,35 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/area/proc/power_change()
|
||||
for(var/obj/machinery/M in src) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
if(sub_areas)
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
A.power_light = power_light
|
||||
A.power_equip = power_equip
|
||||
A.power_environ = power_environ
|
||||
INVOKE_ASYNC(A, .proc/power_change)
|
||||
update_icon()
|
||||
|
||||
/area/proc/usage(chan)
|
||||
var/used = 0
|
||||
switch(chan)
|
||||
if(LIGHT)
|
||||
used += used_light
|
||||
. += used_light
|
||||
if(EQUIP)
|
||||
used += used_equip
|
||||
. += used_equip
|
||||
if(ENVIRON)
|
||||
used += used_environ
|
||||
. += used_environ
|
||||
if(TOTAL)
|
||||
used += used_light + used_equip + used_environ
|
||||
. += used_light + used_equip + used_environ
|
||||
if(STATIC_EQUIP)
|
||||
used += static_equip
|
||||
. += static_equip
|
||||
if(STATIC_LIGHT)
|
||||
used += static_light
|
||||
. += static_light
|
||||
if(STATIC_ENVIRON)
|
||||
used += static_environ
|
||||
return used
|
||||
. += static_environ
|
||||
if(sub_areas)
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
. += A.usage(chan)
|
||||
|
||||
/area/proc/addStaticPower(value, powerchannel)
|
||||
switch(powerchannel)
|
||||
@@ -414,6 +464,10 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
used_equip = 0
|
||||
used_light = 0
|
||||
used_environ = 0
|
||||
if(sub_areas)
|
||||
for(var/i in sub_areas)
|
||||
var/area/A = i
|
||||
A.clear_usage()
|
||||
|
||||
/area/proc/use_power(amount, chan)
|
||||
|
||||
|
||||
@@ -505,9 +505,8 @@
|
||||
return final_rgb
|
||||
|
||||
/atom/proc/clean_blood()
|
||||
if(islist(blood_DNA))
|
||||
blood_DNA = null
|
||||
return TRUE
|
||||
. = blood_DNA? TRUE : FALSE
|
||||
blood_DNA = null
|
||||
|
||||
/atom/proc/wash_cream()
|
||||
return TRUE
|
||||
@@ -728,6 +727,13 @@
|
||||
/atom/proc/multitool_act(mob/living/user, obj/item/I)
|
||||
return
|
||||
|
||||
/atom/proc/multitool_check_buffer(user, obj/item/I, silent = FALSE)
|
||||
if(!istype(I, /obj/item/multitool))
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/atom/proc/screwdriver_act(mob/living/user, obj/item/I)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_SCREWDRIVER_ACT, user, I)
|
||||
|
||||
@@ -761,6 +767,8 @@
|
||||
log_whisper(log_text)
|
||||
if(LOG_EMOTE)
|
||||
log_emote(log_text)
|
||||
if(LOG_SUBTLER)
|
||||
log_subtler(log_text)
|
||||
if(LOG_DSAY)
|
||||
log_dsay(log_text)
|
||||
if(LOG_PDA)
|
||||
@@ -863,4 +871,4 @@ Proc for attack log creation, because really why not
|
||||
return TRUE
|
||||
|
||||
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
|
||||
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
|
||||
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// LISTS //
|
||||
var/list/vassal_allowed_antags = list(/datum/antagonist/brother, /datum/antagonist/traitor, /datum/antagonist/traitor/internal_affairs, /datum/antagonist/survivalist, \
|
||||
/datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee)
|
||||
/datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee, /datum/antagonist/valentine, /datum/antagonist/heartbreaker,)
|
||||
// The antags you're allowed to be if turning Vassal.
|
||||
/proc/isvamp(mob/living/M)
|
||||
return istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/bloodsucker)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
/datum/game_mode/traitor/bros
|
||||
name = "traitor+brothers"
|
||||
config_tag = "traitorbro"
|
||||
required_players = 25
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
|
||||
|
||||
|
||||
@@ -57,10 +57,8 @@
|
||||
/obj/item/melee/transforming/energy/sword/bananium
|
||||
name = "bananium sword"
|
||||
desc = "An elegant weapon, for a more civilized age."
|
||||
force = 0
|
||||
throwforce = 0
|
||||
force_on = 0
|
||||
throwforce_on = 0
|
||||
force_on = 15
|
||||
throwforce_on = 15
|
||||
hitsound = null
|
||||
attack_verb_on = list("slipped")
|
||||
clumsy_check = FALSE
|
||||
@@ -69,24 +67,26 @@
|
||||
heat = 0
|
||||
light_color = "#ffff00"
|
||||
var/next_trombone_allowed = 0
|
||||
var/datum/component/slippery/slipper
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper = LoadComponent(/datum/component/slippery, 81, GALOSHES_DONT_HELP)
|
||||
slipper.signal_enabled = active
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
if(active)
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.Slip(M)
|
||||
slipper.lube_flags |= FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING
|
||||
slipper.Slip(src, M)
|
||||
slipper.lube_flags &= ~(FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
|
||||
. = ..()
|
||||
if(active)
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.Slip(hit_atom)
|
||||
slipper.lube_flags |= FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING
|
||||
slipper.Slip(src, hit_atom)
|
||||
slipper.lube_flags &= ~(FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params)
|
||||
if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/transforming/energy/sword/bananium))
|
||||
@@ -98,7 +98,6 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text)
|
||||
..()
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.signal_enabled = active
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
|
||||
@@ -108,8 +107,9 @@
|
||||
if(!active)
|
||||
transform_weapon(user, TRUE)
|
||||
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!</span>")
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.Slip(user)
|
||||
slipper.lube_flags |= FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING
|
||||
slipper.Slip(src, user)
|
||||
slipper.lube_flags &= ~(FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
|
||||
return SHAME
|
||||
|
||||
//BANANIUM SHIELD
|
||||
@@ -126,16 +126,15 @@
|
||||
on_force = 0
|
||||
on_throwforce = 0
|
||||
on_throw_speed = 1
|
||||
var/datum/component/slippery/slipper
|
||||
|
||||
/obj/item/shield/energy/bananium/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper = LoadComponent(/datum/component/slippery, 81, GALOSHES_DONT_HELP)
|
||||
slipper.signal_enabled = active
|
||||
|
||||
/obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user)
|
||||
..()
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.signal_enabled = active
|
||||
|
||||
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
@@ -149,8 +148,9 @@
|
||||
if(active)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.Slip(hit_atom)
|
||||
slipper.lube_flags |= FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING
|
||||
slipper.Slip(src, hit_atom)
|
||||
slipper.lube_flags &= ~(FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
|
||||
if(thrownby && !caught)
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, 1)
|
||||
else
|
||||
@@ -203,24 +203,35 @@
|
||||
clumsy_check = GRENADE_NONCLUMSY_FUMBLE
|
||||
|
||||
/obj/item/grenade/chem_grenade/teargas/moustache/prime()
|
||||
var/myloc = get_turf(src)
|
||||
var/list/check_later = list()
|
||||
for(var/mob/living/carbon/C in get_turf(src))
|
||||
check_later += C
|
||||
. = ..()
|
||||
for(var/mob/living/carbon/M in view(6, myloc))
|
||||
if(!istype(M.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(M.wear_mask, /obj/item/clothing/mask/gas/mime) )
|
||||
if(!M.wear_mask || M.dropItemToGround(M.wear_mask))
|
||||
if(!.) //grenade did not properly prime.
|
||||
return
|
||||
for(var/M in check_later)
|
||||
var/mob/living/carbon/C = M
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(C.wear_mask, /obj/item/clothing/mask/gas/mime))
|
||||
if(!C.wear_mask || C.dropItemToGround(C.wear_mask))
|
||||
var/obj/item/clothing/mask/fakemoustache/sticky/the_stash = new /obj/item/clothing/mask/fakemoustache/sticky()
|
||||
M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
|
||||
C.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky
|
||||
var/unstick_time = 600
|
||||
var/unstick_time = 2 MINUTES
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/Initialize()
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT)
|
||||
addtimer(CALLBACK(src, .proc/unstick), unstick_time)
|
||||
addtimer(TRAIT_CALLBACK_REMOVE(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT), unstick_time)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/proc/unstick()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, STICKY_MOUSTACHE_TRAIT)
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(slot == SLOT_WEAR_MASK)
|
||||
ADD_TRAIT(user, TRAIT_NO_INTERNALS, STICKY_MOUSTACHE_TRAIT)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/dropped(mob/user)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(user, TRAIT_NO_INTERNALS, STICKY_MOUSTACHE_TRAIT)
|
||||
|
||||
//DARK H.O.N.K. AND CLOWN MECH WEAPONS
|
||||
|
||||
@@ -268,7 +279,6 @@
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/honker/dark
|
||||
max_equip = 3
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/honker/dark/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
|
||||
@@ -41,7 +41,7 @@ GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset)
|
||||
// Forced threat level, setting this to zero or higher forces the roundstart threat to the value.
|
||||
GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
|
||||
GLOBAL_VAR_INIT(dynamic_storyteller_type, null)
|
||||
GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
|
||||
/datum/game_mode/dynamic
|
||||
name = "dynamic mode"
|
||||
@@ -239,12 +239,20 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, null)
|
||||
. += "<b>Peaceful Waypoint</b></center><BR>"
|
||||
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive. However, even deep in our territory there may be subversive elements, especially for such a high-value target as your station. Keep an eye out, but don't expect much trouble."
|
||||
set_security_level(SEC_LEVEL_GREEN)
|
||||
for(var/T in subtypesof(/datum/station_goal))
|
||||
var/datum/station_goal/G = new T
|
||||
if(!(G in station_goals))
|
||||
station_goals += G
|
||||
if(21 to 79)
|
||||
var/perc_green = 100-round(100*((threat_level-21)/(79-21)))
|
||||
if(prob(perc_green))
|
||||
. += "<b>Core Territory</b></center><BR>"
|
||||
. += "Your station orbits within reliably mundane, secure space. Although Nanotrasen has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station."
|
||||
set_security_level(SEC_LEVEL_GREEN)
|
||||
for(var/T in subtypesof(/datum/station_goal))
|
||||
var/datum/station_goal/G = new T
|
||||
if(!(G in station_goals))
|
||||
station_goals += G
|
||||
else if(prob(perc_green))
|
||||
. += "<b>Contested System</b></center><BR>"
|
||||
. += "Your station's orbit passes along the edge of Nanotrasen's sphere of influence. While subversive elements remain the most likely threat against your station, hostile organizations are bolder here, where our grip is weaker. Exercise increased caution against elite Syndicate strike forces, or Executives forbid, some kind of ill-conceived unionizing attempt."
|
||||
@@ -273,7 +281,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, null)
|
||||
if(GLOB.security_level >= SEC_LEVEL_BLUE)
|
||||
priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", "intercept")
|
||||
else
|
||||
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no likely threats to [station_name()]. Have a secure shift!", "Security Report", "commandreport")
|
||||
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no likely threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", "commandreport")
|
||||
|
||||
// Yes, this is copy pasted from game_mode
|
||||
/datum/game_mode/dynamic/check_finished(force_ending)
|
||||
@@ -346,7 +354,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, null)
|
||||
generate_threat()
|
||||
|
||||
storyteller.start_injection_cooldowns()
|
||||
|
||||
SSevents.frequency_lower = storyteller.event_frequency_lower // 6 minutes by default
|
||||
SSevents.frequency_upper = storyteller.event_frequency_upper // 20 minutes by default
|
||||
log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]!")
|
||||
initial_threat_level = threat_level
|
||||
return TRUE
|
||||
@@ -395,7 +404,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, null)
|
||||
|
||||
/datum/game_mode/dynamic/post_setup(report)
|
||||
update_playercounts()
|
||||
|
||||
|
||||
for(var/datum/dynamic_ruleset/roundstart/rule in executed_rules)
|
||||
addtimer(CALLBACK(src, /datum/game_mode/dynamic/.proc/execute_roundstart_rule, rule), rule.delay)
|
||||
..()
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
assigned += M.mind
|
||||
M.mind.special_role = antag_flag
|
||||
M.mind.add_antag_datum(antag_datum)
|
||||
log_admin("[M.name] was made into a [name] by dynamic.")
|
||||
message_admins("[M.name] was made into a [name] by dynamic.")
|
||||
return TRUE
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -72,12 +74,6 @@
|
||||
property_weights = list("story_potential" = 2, "trust" = -1, "extended" = 1)
|
||||
always_max_weight = TRUE
|
||||
|
||||
/datum/dynamic_ruleset/latejoin/infiltrator/execute()
|
||||
. = ..()
|
||||
for(var/datum/mind/M in assigned)
|
||||
log_admin("[M.name] was made into a traitor by dynamic.")
|
||||
message_admins("[M.name] was made into a traitor by dynamic.")
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// REVOLUTIONARY PROVOCATEUR //
|
||||
@@ -225,3 +221,25 @@
|
||||
log_admin("[M.name] was made into a bloodsucker by dynamic.")
|
||||
message_admins("[M.name] was made into a bloodsucker by dynamic.")
|
||||
return TRUE
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// COLLECTOR //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/datum/dynamic_ruleset/latejoin/collector
|
||||
name = "Contraband Collector"
|
||||
config_tag = "latejoin_collector"
|
||||
antag_datum = /datum/antagonist/collector
|
||||
antag_flag = ROLE_MINOR_ANTAG
|
||||
restricted_roles = list("AI", "Cyborg")
|
||||
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
|
||||
required_candidates = 1
|
||||
weight = 5
|
||||
cost = 1
|
||||
requirements = list(10,10,10,10,10,10,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
repeatable = TRUE
|
||||
flags = TRAITOR_RULESET
|
||||
property_weights = list("story_potential" = 2, "trust" = -1, "extended" = 2)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
trimmed_list.Remove(M)
|
||||
continue
|
||||
if (M.mind)
|
||||
if (restrict_ghost_roles && M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL]) // Are they playing a ghost role?
|
||||
if (restrict_ghost_roles && (M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL])) // Are they playing a ghost role?
|
||||
trimmed_list.Remove(M)
|
||||
continue
|
||||
if (M.mind.assigned_role in restricted_roles) // Does their job allow it?
|
||||
@@ -494,7 +494,7 @@
|
||||
high_population_requirement = 50
|
||||
repeatable_weight_decrease = 2
|
||||
repeatable = TRUE
|
||||
property_weights = list("story_potential" = 1, "trust" = 1, "extended" = 1, "valid" = 2, "integrity" = 2)
|
||||
property_weights = list("story_potential" = 1, "trust" = 1, "extended" = 1, "valid" = 2, "integrity" = 1)
|
||||
var/list/spawn_locs = list()
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/nightmare/execute()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/dynamic_storyteller
|
||||
var/name = "none"
|
||||
var/config_tag = null
|
||||
var/desc = "A coder's idiocy."
|
||||
var/list/property_weights = list()
|
||||
var/curve_centre = 0
|
||||
@@ -7,6 +8,8 @@
|
||||
var/forced_threat_level = -1
|
||||
var/flags = 0
|
||||
var/weight = 3 // how many rounds need to have been recently played for this storyteller to be left out of the vote
|
||||
var/event_frequency_lower = 6 MINUTES
|
||||
var/event_frequency_upper = 20 MINUTES
|
||||
var/datum/game_mode/dynamic/mode = null
|
||||
|
||||
/**
|
||||
@@ -20,14 +23,6 @@ Property weights are:
|
||||
"conversion" -- Basically a bool. Conversion antags, well, convert. It's its own class for a good reason.
|
||||
*/
|
||||
|
||||
/datum/dynamic_storyteller/New()
|
||||
..()
|
||||
if (istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||
mode = SSticker.mode
|
||||
GLOB.dynamic_curve_centre = curve_centre
|
||||
GLOB.dynamic_curve_width = curve_width
|
||||
GLOB.dynamic_forced_threat_level = forced_threat_level
|
||||
|
||||
/datum/dynamic_storyteller/proc/start_injection_cooldowns()
|
||||
var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_first_latejoin_delay_max + GLOB.dynamic_first_latejoin_delay_min)
|
||||
mode.latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_first_latejoin_delay_min, GLOB.dynamic_first_latejoin_delay_max)) + world.time
|
||||
@@ -42,7 +37,29 @@ Property weights are:
|
||||
return
|
||||
|
||||
/datum/dynamic_storyteller/proc/on_start()
|
||||
return
|
||||
if (istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||
mode = SSticker.mode
|
||||
GLOB.dynamic_curve_centre = curve_centre
|
||||
GLOB.dynamic_curve_width = curve_width
|
||||
if(flags & USE_PREF_WEIGHTS)
|
||||
var/voters = 0
|
||||
var/mean = 0
|
||||
for(var/client/c in GLOB.clients)
|
||||
var/vote = c.prefs.preferred_chaos
|
||||
if(vote)
|
||||
voters += 1
|
||||
switch(vote)
|
||||
if(CHAOS_NONE)
|
||||
mean -= 5
|
||||
if(CHAOS_LOW)
|
||||
mean -= 2.5
|
||||
if(CHAOS_HIGH)
|
||||
mean += 2.5
|
||||
if(CHAOS_MAX)
|
||||
mean += 5
|
||||
if(voters)
|
||||
GLOB.dynamic_curve_centre += (mean/voters)
|
||||
GLOB.dynamic_forced_threat_level = forced_threat_level
|
||||
|
||||
/datum/dynamic_storyteller/proc/get_midround_cooldown()
|
||||
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
|
||||
@@ -154,12 +171,15 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/cowabunga
|
||||
name = "Chaotic"
|
||||
config_tag = "chaotic"
|
||||
curve_centre = 10
|
||||
desc = "Chaos: high. Variation: high. Likely antags: clock cult, revs, wizard."
|
||||
property_weights = list("extended" = -1, "chaos" = 10)
|
||||
weight = 2
|
||||
weight = 1
|
||||
event_frequency_lower = 2 MINUTES
|
||||
event_frequency_upper = 10 MINUTES
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
var/refund_cooldown
|
||||
var/refund_cooldown = 0
|
||||
|
||||
/datum/dynamic_storyteller/cowabunga/get_midround_cooldown()
|
||||
return ..() / 4
|
||||
@@ -169,12 +189,13 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/cowabunga/do_process()
|
||||
if(refund_cooldown < world.time)
|
||||
mode.refund_threat(10)
|
||||
mode.log_threat("Cowabunga it is. Refunded 10 threat. Threat is now [mode.threat].")
|
||||
refund_cooldown = world.time + 300 SECONDS
|
||||
mode.refund_threat(20)
|
||||
mode.log_threat("Cowabunga it is. Refunded 20 threat. Threat is now [mode.threat].")
|
||||
refund_cooldown = world.time + 600 SECONDS
|
||||
|
||||
/datum/dynamic_storyteller/team
|
||||
name = "Teamwork"
|
||||
config_tag = "teamwork"
|
||||
desc = "Chaos: high. Variation: low. Likely antags: nukies, clockwork cult, wizard, blob, xenomorph."
|
||||
curve_centre = 2
|
||||
curve_width = 1.5
|
||||
@@ -187,6 +208,7 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/conversion
|
||||
name = "Conversion"
|
||||
config_tag = "conversion"
|
||||
desc = "Chaos: high. Variation: medium. Likely antags: cults, bloodsuckers, revs."
|
||||
curve_centre = 3
|
||||
curve_width = 1
|
||||
@@ -196,24 +218,33 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/classic
|
||||
name = "Random"
|
||||
config_tag = "random"
|
||||
desc = "Chaos: varies. Variation: highest. No special weights attached."
|
||||
weight = 6
|
||||
flags = USE_PREF_WEIGHTS
|
||||
curve_width = 4
|
||||
|
||||
/datum/dynamic_storyteller/memes
|
||||
name = "Story"
|
||||
config_tag = "story"
|
||||
desc = "Chaos: varies. Variation: high. Likely antags: abductors, nukies, wizard, traitor."
|
||||
weight = 4
|
||||
flags = USE_PREF_WEIGHTS
|
||||
curve_width = 4
|
||||
property_weights = list("story_potential" = 10)
|
||||
|
||||
/datum/dynamic_storyteller/suspicion
|
||||
name = "Intrigue"
|
||||
config_tag = "intrigue"
|
||||
desc = "Chaos: low. Variation: high. Likely antags: traitor, bloodsucker. Rare: revs, blood cult."
|
||||
weight = 4
|
||||
flags = USE_PREF_WEIGHTS
|
||||
curve_width = 4
|
||||
property_weights = list("trust" = -5)
|
||||
|
||||
/datum/dynamic_storyteller/liteextended
|
||||
name = "Calm"
|
||||
config_tag = "calm"
|
||||
desc = "Chaos: low. Variation: medium. Likely antags: bloodsuckers, traitors, sentient disease, revenant."
|
||||
curve_centre = -5
|
||||
curve_width = 0.5
|
||||
@@ -226,10 +257,12 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/extended
|
||||
name = "Extended"
|
||||
config_tag = "extended"
|
||||
desc = "Chaos: none. Variation: none. Likely antags: none."
|
||||
curve_centre = -20
|
||||
weight = 2
|
||||
weight = 0
|
||||
curve_width = 0.5
|
||||
|
||||
/datum/dynamic_storyteller/extended/on_start()
|
||||
..()
|
||||
GLOB.dynamic_forced_extended = TRUE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
if( !A.requires_power || A.always_unpowered || A.base_area)
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
@@ -61,8 +61,9 @@
|
||||
S.output_attempt = 1
|
||||
S.update_icon()
|
||||
S.power_change()
|
||||
|
||||
for(var/area/A in world)
|
||||
if(!istype(A, /area/space) && !istype(A, /area/shuttle) && !istype(A, /area/arrival))
|
||||
if(!istype(A, /area/space) && !istype(A, /area/shuttle) && !istype(A, /area/arrival) && !A.always_unpowered && !A.base_area)
|
||||
A.power_light = TRUE
|
||||
A.power_equip = TRUE
|
||||
A.power_environ = TRUE
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
playsound(loc, 'sound/items/timer.ogg', 10, 0)
|
||||
if(!warned && (time_remaining < 180))
|
||||
warned = TRUE
|
||||
var/area/domloc = get_area(loc)
|
||||
var/area/domloc = get_base_area(loc)
|
||||
gang.message_gangtools("Less than 3 minutes remains in hostile takeover. Defend your dominator at [domloc.map_name]!")
|
||||
for(var/G in GLOB.gangs)
|
||||
var/datum/team/gang/tempgang = G
|
||||
@@ -179,7 +179,7 @@
|
||||
if((tempgang.domination_time != NOT_DOMINATING) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc))
|
||||
return 0
|
||||
|
||||
var/area/A = get_area(loc)
|
||||
var/area/A = get_base_area(loc)
|
||||
var/locname = A.map_name
|
||||
|
||||
gang = tempgang
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return INITIALIZE_HINT_QDEL
|
||||
gang = G
|
||||
var/newcolor = G.color
|
||||
var/area/territory = get_area(src)
|
||||
var/area/territory = get_base_area(src)
|
||||
icon_state = G.name
|
||||
G.new_territories |= list(territory.type = territory.name)
|
||||
//If this isn't tagged by a specific gangster there's no bonus income.
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
if(gang)
|
||||
var/area/territory = get_area(src)
|
||||
var/area/territory = get_base_area(src)
|
||||
gang.territories -= territory.type
|
||||
gang.new_territories -= territory.type
|
||||
gang.lost_territories |= list(territory.type = territory.name)
|
||||
|
||||
@@ -290,12 +290,6 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m
|
||||
cost = 5
|
||||
item_path = /obj/item/grenade/syndieminibomb/concussion/frag
|
||||
|
||||
/datum/gang_item/equipment/stimpack
|
||||
name = "Black Market Stimulants"
|
||||
id = "stimpack"
|
||||
cost = 12
|
||||
item_path = /obj/item/reagent_containers/syringe/stimulants
|
||||
|
||||
/datum/gang_item/equipment/implant_breaker
|
||||
name = "Implant Breaker"
|
||||
id = "implant_breaker"
|
||||
@@ -401,7 +395,7 @@ datum/gang_item/equipment/gangsheild
|
||||
return "This device requires a 5x5 area clear of walls to FUNCTION. (Estimated Takeover Time: [round(gang.determine_domination_time()/60,0.1)] minutes)"
|
||||
|
||||
/datum/gang_item/equipment/dominator/purchase(mob/living/carbon/user, datum/team/gang/gang, obj/item/device/gangtool/gangtool)
|
||||
var/area/userarea = get_area(user)
|
||||
var/area/userarea = get_base_area(user)
|
||||
if(!(userarea.type in gang.territories|gang.new_territories))
|
||||
to_chat(user,"<span class='warning'>The <b>dominator</b> can be spawned only on territory controlled by your gang!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -6,7 +6,8 @@ GLOBAL_LIST_EMPTY(gangs)
|
||||
name = "gang war"
|
||||
config_tag = "gang"
|
||||
antag_flag = ROLE_GANG
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security")
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
|
||||
required_players = 15
|
||||
required_enemies = 0
|
||||
recommended_enemies = 2
|
||||
|
||||
@@ -21,16 +21,16 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
//Meteor spawning global procs
|
||||
///////////////////////////////
|
||||
|
||||
/proc/spawn_meteors(number = 10, list/meteortypes)
|
||||
/proc/spawn_meteors(number = 10, list/meteortypes, dir)
|
||||
for(var/i = 0; i < number; i++)
|
||||
spawn_meteor(meteortypes)
|
||||
spawn_meteor(meteortypes, dir)
|
||||
|
||||
/proc/spawn_meteor(list/meteortypes)
|
||||
/proc/spawn_meteor(list/meteortypes, dir)
|
||||
var/turf/pickedstart
|
||||
var/turf/pickedgoal
|
||||
var/max_i = 10//number of tries to spawn meteor.
|
||||
while(!isspaceturf(pickedstart))
|
||||
var/startSide = pick(GLOB.cardinals)
|
||||
var/startSide = dir || pick(GLOB.cardinals)
|
||||
var/startZ = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
pickedstart = spaceDebrisStartLoc(startSide, startZ)
|
||||
pickedgoal = spaceDebrisFinishLoc(startSide, startZ)
|
||||
|
||||
@@ -9,9 +9,10 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
var/explanation_text = "Nothing" //What that person is supposed to do.
|
||||
var/team_explanation_text //For when there are multiple owners.
|
||||
var/datum/mind/target = null //If they are focused on a particular person.
|
||||
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
|
||||
var/completed = 0 //currently only used for custom objectives.
|
||||
var/martyr_compatible = 0 //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
|
||||
var/target_amount = FALSE //If they are focused on a particular number. Steal objectives have their own counter.
|
||||
var/completed = FALSE //currently only used for custom objectives.
|
||||
var/completable = TRUE //Whether this objective shows greentext when completed
|
||||
var/martyr_compatible = FALSE //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
|
||||
@@ -172,6 +173,26 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
/datum/objective/assassinate/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/assassinate/once
|
||||
name = "kill once"
|
||||
var/won = FALSE
|
||||
|
||||
/datum/objective/assassinate/once/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Kill [target.name], the [!target_role_type ? target.assigned_role : target.special_role]. You only need to kill them once; if they come back, you've still succeeded."
|
||||
START_PROCESSING(SSprocessing,src)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/assassinate/once/check_completion()
|
||||
return won || ..()
|
||||
|
||||
/datum/objective/assassinate/once/process()
|
||||
won = check_completion()
|
||||
if(won)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/objective/assassinate/internal
|
||||
var/stolen = 0 //Have we already eliminated this target?
|
||||
|
||||
@@ -293,9 +314,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
|
||||
/datum/objective/hijack
|
||||
name = "hijack"
|
||||
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
||||
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
||||
explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console)."
|
||||
team_explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console). Leave no team member behind."
|
||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||
/// Overrides the hijack speed of any antagonist datum it is on ONLY, no other datums are impacted.
|
||||
var/hijack_speed_override = 1
|
||||
|
||||
/datum/objective/hijack/check_completion() // Requires all owners to escape.
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
|
||||
@@ -365,6 +388,28 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/objective/breakout
|
||||
name = "breakout"
|
||||
martyr_compatible = 1
|
||||
var/target_role_type = 0
|
||||
var/human_check = TRUE
|
||||
|
||||
/datum/objective/breakout/check_completion()
|
||||
return !target || considered_escaped(target)
|
||||
|
||||
/datum/objective/breakout/find_target_by_role(role, role_type=0, invert=0)
|
||||
if(!invert)
|
||||
target_role_type = role_type
|
||||
..()
|
||||
return target
|
||||
|
||||
/datum/objective/breakout/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Make sure [target.name], the [!target_role_type ? target.assigned_role : target.special_role] escapes on the shuttle or an escape pod alive and without being in custody."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/escape/escape_with_identity
|
||||
name = "escape with identity"
|
||||
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
||||
@@ -527,7 +572,7 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
else if(targetinfo.check_special_completion(I))//Returns 1 by default. Items with special checks will return 1 if the conditions are fulfilled.
|
||||
return TRUE
|
||||
|
||||
if(targetinfo && I.type in targetinfo.altitems) //Ok, so you don't have the item. Do you have an alternative, at least?
|
||||
if(targetinfo && (I.type in targetinfo.altitems)) //Ok, so you don't have the item. Do you have an alternative, at least?
|
||||
if(targetinfo.check_special_completion(I))//Yeah, we do! Don't return 0 if we don't though - then you could fail if you had 1 item that didn't pass and got checked first!
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -582,7 +627,6 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
explanation_text = "Do not give up or lose [targetinfo.name]."
|
||||
steal_target = targetinfo.targetitem
|
||||
|
||||
|
||||
/datum/objective/download
|
||||
name = "download"
|
||||
|
||||
@@ -786,40 +830,10 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
/datum/objective/destroy/internal
|
||||
var/stolen = FALSE //Have we already eliminated this target?
|
||||
|
||||
/datum/objective/steal_five_of_type
|
||||
name = "steal five of"
|
||||
explanation_text = "Steal at least five items!"
|
||||
var/list/wanted_items = list(/obj/item)
|
||||
|
||||
/datum/objective/steal_five_of_type/New()
|
||||
..()
|
||||
wanted_items = typecacheof(wanted_items)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_guns
|
||||
name = "steal guns"
|
||||
explanation_text = "Steal at least five guns!"
|
||||
wanted_items = list(/obj/item/gun)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_magic
|
||||
name = "steal magic"
|
||||
explanation_text = "Steal at least five magical artefacts!"
|
||||
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
|
||||
|
||||
/datum/objective/steal_five_of_type/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
var/stolen_count = 0
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!isliving(M.current))
|
||||
continue
|
||||
var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
|
||||
for(var/obj/I in all_items) //Check for wanted items
|
||||
if(is_type_in_typecache(I, wanted_items))
|
||||
stolen_count++
|
||||
return stolen_count >= 5
|
||||
|
||||
//Created by admin tools
|
||||
/datum/objective/custom
|
||||
name = "custom"
|
||||
completable = FALSE
|
||||
|
||||
/datum/objective/custom/admin_edit(mob/admin)
|
||||
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
|
||||
@@ -997,4 +1011,147 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
command_staff_only = TRUE
|
||||
|
||||
|
||||
/datum/objective/hoard
|
||||
name = "hoard"
|
||||
var/obj/item/hoarded_item = null
|
||||
|
||||
/datum/objective/hoard/get_target()
|
||||
return hoarded_item
|
||||
|
||||
/datum/objective/hoard/proc/set_target(obj/item/I)
|
||||
if(I)
|
||||
hoarded_item = I
|
||||
explanation_text = "Keep [I] on your person at all times."
|
||||
return hoarded_item
|
||||
else
|
||||
explanation_text = "Free objective"
|
||||
return
|
||||
|
||||
/datum/objective/hoard/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
if(!hoarded_item)
|
||||
return TRUE
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!isliving(M.current))
|
||||
continue
|
||||
|
||||
var/list/all_items = M.current.GetAllContents() //this should get things in cheesewheels, books, etc.
|
||||
|
||||
for(var/obj/I in all_items) //Check for items
|
||||
if(I == hoarded_item)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/objective/hoard/heirloom
|
||||
name = "steal heirloom"
|
||||
|
||||
/datum/objective/hoard/heirloom/find_target()
|
||||
set_target(pick(GLOB.family_heirlooms))
|
||||
|
||||
GLOBAL_LIST_EMPTY(traitor_contraband)
|
||||
|
||||
GLOBAL_LIST_EMPTY(cult_contraband)
|
||||
|
||||
/datum/objective/hoard/collector
|
||||
name = "Hoard contraband"
|
||||
|
||||
/datum/objective/collector/New()
|
||||
..()
|
||||
if(!GLOB.traitor_contraband.len)//Only need to fill the list when it's needed.
|
||||
GLOB.traitor_contraband = list(/obj/item/card/emag/empty,/obj/item/clothing/glasses/phantomthief,/obj/item/clothing/gloves/chameleon/broken)
|
||||
if(!GLOB.cult_contraband.len)
|
||||
GLOB.cult_contraband = list(/obj/item/clockwork/slab,/obj/item/clockwork/component/belligerent_eye,/obj/item/clockwork/component/belligerent_eye/lens_gem,/obj/item/shuttle_curse,/obj/item/cult_shift)
|
||||
|
||||
/datum/objective/hoard/collector/find_target()
|
||||
var/obj/item/I
|
||||
var/I_type
|
||||
if(prob(50))
|
||||
I_type = pick_n_take(GLOB.traitor_contraband) // always unique unless it's run out, in which case we refill it anyway
|
||||
else
|
||||
I_type = pick_n_take(GLOB.cult_contraband)
|
||||
I = new I_type
|
||||
I.forceMove(get_turf(owner))
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.equip_in_one_of_slots(I, list("backpack" = SLOT_IN_BACKPACK))
|
||||
hoarded_item = I
|
||||
|
||||
|
||||
|
||||
GLOBAL_LIST_EMPTY(possible_sabotages)
|
||||
// For saboteurs. Go in and cause some trouble somewhere. Not necessarily breaking things, just sufficiently troublemaking.
|
||||
/datum/objective/sabotage
|
||||
name = "sabotage"
|
||||
var/datum/sabotage_objective/targetinfo = null //composition > inheritance.
|
||||
|
||||
/datum/objective/sabotage/get_target()
|
||||
return targetinfo.sabotage_type
|
||||
|
||||
/datum/objective/sabotage/New()
|
||||
..()
|
||||
if(!GLOB.possible_sabotages.len)//Only need to fill the list when it's needed.
|
||||
for(var/I in subtypesof(/datum/sabotage_objective))
|
||||
new I
|
||||
|
||||
/datum/objective/sabotage/find_target()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
var/approved_targets = list()
|
||||
check_sabotages:
|
||||
for(var/datum/sabotage_objective/possible_sabotage in GLOB.possible_sabotages)
|
||||
if(!is_unique_objective(possible_sabotage.sabotage_type) || possible_sabotage.check_conditions() || !possible_sabotage.can_run())
|
||||
continue
|
||||
for(var/datum/mind/M in owners)
|
||||
if(M.current.mind.assigned_role in possible_sabotage.excludefromjob)
|
||||
continue check_sabotages
|
||||
approved_targets += possible_sabotage
|
||||
return set_target(safepick(approved_targets))
|
||||
|
||||
/datum/objective/sabotage/proc/set_target(datum/sabotage_objective/sabo)
|
||||
if(sabo)
|
||||
targetinfo = sabo
|
||||
explanation_text = "[targetinfo.name]"
|
||||
give_special_equipment(targetinfo.special_equipment)
|
||||
return sabo
|
||||
else
|
||||
explanation_text = "Free objective"
|
||||
return
|
||||
|
||||
/datum/objective/sabotage/check_completion()
|
||||
return targetinfo.check_conditions()
|
||||
|
||||
/datum/objective/flavor
|
||||
name = "flavor"
|
||||
completable = FALSE
|
||||
var/flavor_file
|
||||
|
||||
/datum/objective/flavor/proc/get_flavor_list()
|
||||
return world.file2list(flavor_file)
|
||||
|
||||
/datum/objective/flavor/proc/forge_objective()
|
||||
var/flavor_list = get_flavor_list()
|
||||
explanation_text = pick(flavor_list)
|
||||
|
||||
/datum/objective/flavor/traitor
|
||||
name = "traitor flavor"
|
||||
flavor_file = "strings/flavor_objectives/traitor.txt"
|
||||
|
||||
/datum/objective/flavor/traitor/get_flavor_list()
|
||||
. = ..()
|
||||
switch(owner.assigned_role)
|
||||
if("Station Engineer", "Atmospheric Technician")
|
||||
. += world.file2list("strings/flavor_objectives/traitor/engineering.txt")
|
||||
if("Medical Doctor","Chemist","Virologist","Geneticist")
|
||||
. += world.file2list("strings/flavor_objectives/traitor/medical.txt")
|
||||
if("Scientist","Roboticist","Geneticist")
|
||||
. += world.file2list("strings/flavor_objectives/traitor/science.txt")
|
||||
if("Assistant")
|
||||
. += world.file2list("strings/flavor_objectives/traitor/assistant.txt")
|
||||
|
||||
/datum/objective/flavor/ninja_helping
|
||||
flavor_file = "strings/flavor_objectives/ninja_helping.txt"
|
||||
|
||||
/datum/objective/flavor/ninja_syndie
|
||||
flavor_file = "strings/flavor_objectives/ninja_syndie.txt"
|
||||
|
||||
/datum/objective/flavor/wizard
|
||||
flavor_file = "strings/flavor_objectives/wizard.txt"
|
||||
|
||||
113
code/game/gamemodes/objective_sabotage.dm
Normal file
113
code/game/gamemodes/objective_sabotage.dm
Normal file
@@ -0,0 +1,113 @@
|
||||
/datum/sabotage_objective
|
||||
var/name = "Free Objective"
|
||||
var/sabotage_type = "nothing"
|
||||
var/special_equipment = list()
|
||||
var/list/excludefromjob = list()
|
||||
|
||||
/datum/sabotage_objective/New()
|
||||
..()
|
||||
if(sabotage_type!="nothing")
|
||||
GLOB.possible_sabotages += src
|
||||
|
||||
/datum/sabotage_objective/proc/check_conditions()
|
||||
return TRUE
|
||||
|
||||
/datum/sabotage_objective/proc/can_run()
|
||||
return TRUE
|
||||
|
||||
/datum/sabotage_objective/processing
|
||||
var/won = FALSE
|
||||
|
||||
/datum/sabotage_objective/processing/New()
|
||||
..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/sabotage_objective/processing/proc/check_condition_processing()
|
||||
return 100
|
||||
|
||||
/datum/sabotage_objective/processing/process()
|
||||
check_condition_processing()
|
||||
if(won >= 100)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/sabotage_objective/processing/check_conditions()
|
||||
return won
|
||||
|
||||
/datum/sabotage_objective/processing/power_sink
|
||||
name = "Drain at least 1 gigajoule of power using a power sink."
|
||||
sabotage_type = "powersink"
|
||||
special_equipment = list(/obj/item/powersink)
|
||||
var/sink_found = FALSE
|
||||
var/count = 0
|
||||
|
||||
/datum/sabotage_objective/processing/power_sink/check_condition_processing()
|
||||
count += 1
|
||||
if(count==10 || sink_found) // doesn't need to fire that often unless a sink exists
|
||||
var/sink_found_this_time = FALSE
|
||||
for(var/datum/powernet/PN in GLOB.powernets)
|
||||
for(var/obj/item/powersink/sink in PN.nodes)
|
||||
sink_found_this_time = TRUE
|
||||
won = max(won,sink.power_drained/1e9)
|
||||
sink_found = sink_found_this_time
|
||||
count = 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/paper/guides/antag/supermatter_sabotage
|
||||
info = "Ways to sabotage a supermatter:<br>\
|
||||
<ul>\
|
||||
<li>Set the air alarm's operating mode to anything that isn't 'draught' (yes, anything, though 'off' works best). Or just smash the air alarm, that works too.</li>\
|
||||
<li>Wrench a pipe (the junction to the cold loop is most effective, but some setups will robust through this no issue; best to try for multiple)</li>\
|
||||
<li>Pump in as much carbon dioxide, oxygen, plasma or tritium as you can find (this will likely also cause a singularity or tesla delamination, so watch out!)</li>\
|
||||
<li>Unset the filters on the cooling loop, or, perhaps more insidious, set them to oxygen/plasma.</li>\
|
||||
<li>Deactivate the digital valve that sends the exhaust gases to space (note: only works on box station; others you must unwrench).</li>\
|
||||
<li>There are many other ways; be creative!</li>\
|
||||
</ul>"
|
||||
|
||||
/datum/sabotage_objective/processing/supermatter
|
||||
name = "Sabotage the supermatter so that it goes under 50% integrity. If it is delaminated, you will fail."
|
||||
sabotage_type = "supermatter"
|
||||
special_equipment = list(/obj/item/paper/guides/antag/supermatter_sabotage)
|
||||
var/list/supermatters = list()
|
||||
excludefromjob = list("Chief Engineer", "Station Engineer", "Atmospheric Technician")
|
||||
|
||||
/datum/sabotage_objective/processing/supermatter/check_condition_processing()
|
||||
if(!supermatters.len)
|
||||
supermatters = list()
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if (!isturf(S.loc) || !(is_station_level(S.z) || is_mining_level(S.z)))
|
||||
continue
|
||||
supermatters.Add(S)
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in supermatters) // you can win this with a wishgranter... lol.
|
||||
won = max(1-((S.get_integrity()-50)/50),won)
|
||||
return FALSE
|
||||
|
||||
/datum/sabotage_objective/processing/supermatter/can_run()
|
||||
return (locate(/obj/machinery/power/supermatter_crystal) in GLOB.machines)
|
||||
|
||||
/datum/sabotage_objective/station_integrity
|
||||
name = "Make sure the station is at less than 80% integrity by the end. Smash walls, windows etc. to reach this goal."
|
||||
sabotage_type = "integrity"
|
||||
|
||||
/datum/sabotage_objective/station_integrity/check_conditions()
|
||||
return 5-(max(SSticker.station_integrity*4,320)/80)
|
||||
|
||||
/datum/sabotage_objective/cloner
|
||||
name = "Destroy all Nanotrasen cloning machines."
|
||||
sabotage_type = "cloner"
|
||||
|
||||
/datum/sabotage_objective/cloner/check_conditions()
|
||||
return !(locate(/obj/machinery/clonepod) in GLOB.machines)
|
||||
|
||||
/datum/sabotage_objective/ai_law
|
||||
name = "Upload a hacked law to the AI."
|
||||
sabotage_type = "ailaw"
|
||||
special_equipment = list(/obj/item/aiModule/syndicate)
|
||||
excludefromjob = list("Chief Engineer","Research Director","Head of Personnel","Captain","Chief Medical Officer","Head Of Security")
|
||||
|
||||
/datum/sabotage_objective/ai_law/check_conditions()
|
||||
for (var/i in GLOB.ai_list)
|
||||
var/mob/living/silicon/ai/aiPlayer = i
|
||||
if(aiPlayer.mind && length(aiPlayer.laws.hacked))
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/machinery/sleeper/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(state_open)
|
||||
close_machine()
|
||||
@@ -264,7 +264,7 @@
|
||||
if(blood_id)
|
||||
data["occupant"]["blood"] = list() // We can start populating this list.
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != "blood") // special blood substance
|
||||
if(!(blood_id in GLOB.blood_reagent_types)) // special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
|
||||
@@ -113,6 +113,11 @@ Class Procs:
|
||||
var/atom/movable/occupant = null
|
||||
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
|
||||
// For storing and overriding ui id and dimensions
|
||||
var/tgui_id // ID of TGUI interface
|
||||
var/ui_style // ID of custom TGUI style (optional)
|
||||
var/ui_x
|
||||
var/ui_y
|
||||
|
||||
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
|
||||
|
||||
@@ -224,7 +229,7 @@ Class Procs:
|
||||
return !(stat & (NOPOWER|BROKEN|MAINT))
|
||||
|
||||
/obj/machinery/can_interact(mob/user)
|
||||
var/silicon = issiliconoradminghost(user)
|
||||
var/silicon = hasSiliconAccessInArea(user) || IsAdminGhost(user)
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
return FALSE
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
|
||||
@@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
/obj/machinery/announcement_system/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
@@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
/obj/machinery/announcement_system/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
@@ -132,13 +132,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(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(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(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(NewMessage)
|
||||
newhead = NewMessage
|
||||
@@ -157,7 +157,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = attack_ai(user)
|
||||
|
||||
/obj/machinery/announcement_system/attack_ai(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s firmware appears to be malfunctioning!</span>")
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/list/L = list()
|
||||
var/list/LL = list()
|
||||
var/hacked = FALSE
|
||||
var/hackable = TRUE
|
||||
var/disabled = 0
|
||||
var/shocked = FALSE
|
||||
var/hack_wire
|
||||
@@ -371,6 +372,8 @@
|
||||
|
||||
/obj/machinery/autolathe/proc/adjust_hacked(state)
|
||||
hacked = state
|
||||
if(!hackable && hacked)
|
||||
return
|
||||
for(var/id in SSresearch.techweb_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(id)
|
||||
if((D.build_type & AUTOLATHE) && ("hacked" in D.category))
|
||||
@@ -383,6 +386,12 @@
|
||||
. = ..()
|
||||
adjust_hacked(TRUE)
|
||||
|
||||
/obj/machinery/autolathe/secure
|
||||
name = "secured autolathe"
|
||||
desc = "An autolathe reprogrammed with security protocols to prevent hacking."
|
||||
hackable = FALSE
|
||||
circuit = /obj/item/circuitboard/machine/autolathe/secure
|
||||
|
||||
//Called when the object is constructed by an autolathe
|
||||
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
|
||||
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
|
||||
|
||||
@@ -46,34 +46,37 @@
|
||||
new /obj/item/stack/spacecash/c200(drop_location()) // will autostack
|
||||
playsound(src.loc, 'sound/items/poster_being_created.ogg', 100, 1)
|
||||
SSshuttle.points -= 200
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!"
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!"
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
|
||||
/obj/machinery/computer/bank_machine/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "[station_name()] secure vault. Authorized personnel only.<br>"
|
||||
dat += "Current Balance: [SSshuttle.points] credits.<br>"
|
||||
if(!siphoning)
|
||||
dat += "<A href='?src=[REF(src)];siphon=1'>Siphon Credits</A><br>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];halt=1'>Halt Credit Siphon</A><br>"
|
||||
/obj/machinery/computer/bank_machine/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "bank_machine", name, 320, 165, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
dat += "<a href='?src=[REF(user)];mach_close=computer'>Close</a>"
|
||||
/obj/machinery/computer/bank_machine/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["current_balance"] = SSshuttle.points
|
||||
data["siphoning"] = siphoning
|
||||
data["station_name"] = station_name()
|
||||
|
||||
var/datum/browser/popup = new(user, "computer", "Bank Vault", 300, 200)
|
||||
popup.set_content("<center>[dat]</center>")
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/bank_machine/Topic(href, href_list)
|
||||
/obj/machinery/computer/bank_machine/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["siphon"])
|
||||
say("Siphon of station credits has begun!")
|
||||
siphoning = TRUE
|
||||
if(href_list["halt"])
|
||||
say("Station credit withdrawal halted.")
|
||||
siphoning = FALSE
|
||||
|
||||
switch(action)
|
||||
if("siphon")
|
||||
say("Siphon of station credits has begun!")
|
||||
siphoning = TRUE
|
||||
. = TRUE
|
||||
if("halt")
|
||||
say("Station credit withdrawal halted.")
|
||||
siphoning = FALSE
|
||||
. = TRUE
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(bag)
|
||||
. += "<span class='notice'>It has \a [bag.name] hooked to its <b>input</b> slot. The counter reads: \"Current Capacity: [bag.reagents.total_volume] of [bag.reagents.maximum_volume]\"</span>"
|
||||
if(outbag)
|
||||
. += "<span class='notice'>It has \a [bag.name] hooked to its <b>output</b> slot. The counter reads: \"Current Capacity: [outbag.reagents.total_volume] of [outbag.reagents.maximum_volume]\"</span>"
|
||||
. += "<span class='notice'>It has \a [outbag.name] hooked to its <b>output</b> slot. The counter reads: \"Current Capacity: [outbag.reagents.total_volume] of [outbag.reagents.maximum_volume]\"</span>"
|
||||
|
||||
|
||||
/obj/machinery/bloodbankgen/handle_atom_del(atom/A)
|
||||
@@ -274,20 +274,20 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/bloodbankgen/proc/detachinput()
|
||||
/obj/machinery/bloodbankgen/proc/detachinput(mob/user)
|
||||
if(bag)
|
||||
bag.forceMove(drop_location())
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
usr.put_in_hands(bag)
|
||||
if(user && Adjacent(usr) && user.can_hold_items())
|
||||
user.put_in_hands(bag)
|
||||
bag = null
|
||||
draining = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/bloodbankgen/proc/detachoutput()
|
||||
/obj/machinery/bloodbankgen/proc/detachoutput(mob/user)
|
||||
if(outbag)
|
||||
outbag.forceMove(drop_location())
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
usr.put_in_hands(outbag)
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(outbag)
|
||||
outbag = null
|
||||
filling = null
|
||||
update_icon()
|
||||
@@ -325,12 +325,12 @@
|
||||
activateinput()
|
||||
|
||||
else if(href_list["detachinput"])
|
||||
detachinput()
|
||||
detachinput(usr)
|
||||
|
||||
else if(href_list["activateoutput"])
|
||||
activateoutput()
|
||||
|
||||
else if(href_list["detachoutput"])
|
||||
detachoutput()
|
||||
detachoutput(usr)
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -319,7 +319,8 @@
|
||||
if(status)
|
||||
change_msg = "reactivates"
|
||||
triggerCameraAlarm()
|
||||
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
|
||||
if(!QDELETED(src)) //We'll be doing it anyway in destroy
|
||||
addtimer(CALLBACK(src, .proc/cancelCameraAlarm), 100)
|
||||
if(displaymessage)
|
||||
if(user)
|
||||
visible_message("<span class='danger'>[user] [change_msg] [src]!</span>")
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
|
||||
if(!isarea(a))
|
||||
return
|
||||
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
|
||||
if(!a.powered(EQUIP)) // There's no APC in this area, don't try to cheat power!
|
||||
to_chat(user, "<span class='warning'>[src] blinks red as you try to insert the cell!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W,src))
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
QDEL_LIST(unattached_flesh)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/clonepod/RefreshParts()
|
||||
/obj/machinery/clonepod/RefreshParts()
|
||||
speed_coeff = 0
|
||||
efficiency = 0
|
||||
for(var/obj/item/stock_parts/scanning_module/S in component_parts)
|
||||
@@ -471,7 +471,7 @@
|
||||
if(!istype(organ) || (organ.organ_flags & ORGAN_VITAL))
|
||||
continue
|
||||
organ.organ_flags |= ORGAN_FROZEN
|
||||
organ.Remove(H, special=TRUE)
|
||||
organ.Remove(TRUE)
|
||||
organ.forceMove(src)
|
||||
unattached_flesh += organ
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
var/obj/structure/table/optable/table
|
||||
var/list/advanced_surgeries = list()
|
||||
var/datum/techweb/linked_techweb
|
||||
var/menu = MENU_OPERATION
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/operating/Initialize()
|
||||
@@ -54,8 +53,6 @@
|
||||
var/list/data = list()
|
||||
data["table"] = table
|
||||
if(table)
|
||||
data["menu"] = menu
|
||||
|
||||
var/list/surgeries = list()
|
||||
for(var/X in advanced_surgeries)
|
||||
var/datum/surgery/S = X
|
||||
@@ -64,9 +61,8 @@
|
||||
surgery["desc"] = initial(S.desc)
|
||||
surgeries += list(surgery)
|
||||
data["surgeries"] = surgeries
|
||||
|
||||
data["patient"] = list()
|
||||
if(table.check_patient())
|
||||
data["patient"] = list()
|
||||
patient = table.patient
|
||||
switch(patient.stat)
|
||||
if(CONSCIOUS)
|
||||
@@ -110,15 +106,14 @@
|
||||
"alternative_step" = alternative_step,
|
||||
"alt_chems_needed" = alt_chems_needed
|
||||
))
|
||||
else
|
||||
data["patient"] = null
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/operating/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("change_menu")
|
||||
menu = text2num(params["menu"])
|
||||
. = TRUE
|
||||
if("sync")
|
||||
sync_surgeries()
|
||||
. = TRUE
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
|
||||
var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]"
|
||||
LAZYADD(logs, "<b>([STATION_TIME_TIMESTAMP("hh:mm:ss")])</b> [op_string] [log_text]")
|
||||
LAZYADD(logs, "<b>([STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)])</b> [op_string] [log_text]")
|
||||
|
||||
/mob/proc/using_power_flow_console()
|
||||
for(var/obj/machinery/computer/apc_control/A in range(1, src))
|
||||
|
||||
@@ -304,12 +304,12 @@
|
||||
/obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound
|
||||
var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num
|
||||
if(!new_rows || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_rows || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
new_rows = CLAMP(new_rows + 1, 4, 30)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num
|
||||
if(!new_columns || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_columns || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
new_columns = CLAMP(new_columns + 1, 4, 50)
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
@@ -317,7 +317,7 @@
|
||||
var/lower_limit = round(grid_area*0.156)
|
||||
var/upper_limit = round(grid_area*0.85)
|
||||
var/new_mine_limit = input(user, "How many mines do you want? (Minimum: [lower_limit], Maximum: [upper_limit])", "Minesweeper Mines") as null|num
|
||||
if(!new_mine_limit || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(!new_mine_limit || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return FALSE
|
||||
playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
|
||||
rows = new_rows
|
||||
|
||||
@@ -91,6 +91,8 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
ui_x = 400
|
||||
ui_y = 925
|
||||
|
||||
var/frequency = FREQ_ATMOS_STORAGE
|
||||
var/list/sensors = list(
|
||||
@@ -125,7 +127,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 400, 925, master_ui, state)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/ui_data(mob/user)
|
||||
@@ -161,6 +163,20 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
//Incinerator sensor only
|
||||
/obj/machinery/computer/atmos_control/incinerator
|
||||
name = "Incinerator Air Control"
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
|
||||
ui_x = 400
|
||||
ui_y = 300
|
||||
|
||||
//Toxins mix sensor only
|
||||
/obj/machinery/computer/atmos_control/toxinsmix
|
||||
name = "Toxins Mixing Air Control"
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB = "Toxins Mixing Chamber")
|
||||
ui_x = 400
|
||||
ui_y = 300
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// LARGE TANK CONTROL
|
||||
/////////////////////////////////////////////////////////////
|
||||
@@ -174,6 +190,9 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
var/list/input_info
|
||||
var/list/output_info
|
||||
|
||||
ui_x = 500
|
||||
ui_y = 315
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/oxygen_tank
|
||||
name = "Oxygen Supply Control"
|
||||
input_tag = ATMOS_GAS_MONITOR_INPUT_O2
|
||||
@@ -216,12 +235,6 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
output_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_CO2 = "Carbon Dioxide Tank")
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/incinerator
|
||||
name = "Incinerator Air Control"
|
||||
input_tag = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
|
||||
output_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
|
||||
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
|
||||
|
||||
// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this
|
||||
/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user)
|
||||
var/list/IO = list()
|
||||
@@ -235,7 +248,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
IO |= text[1]
|
||||
if(!IO.len)
|
||||
to_chat(user, "<span class='alert'>No machinery detected.</span>")
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
|
||||
if(src)
|
||||
src.input_tag = "[S]_in"
|
||||
src.output_tag = "[S]_out"
|
||||
@@ -256,7 +269,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 500, 305, master_ui, state)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_data(mob/user)
|
||||
@@ -280,13 +293,19 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
|
||||
if("input")
|
||||
signal.data += list("tag" = input_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("rate")
|
||||
var/target = text2num(params["rate"])
|
||||
if(!isnull(target))
|
||||
target = CLAMP(target, 0, MAX_TRANSFER_RATE)
|
||||
signal.data += list("tag" = input_tag, "set_volume_rate" = target)
|
||||
. = TRUE
|
||||
if("output")
|
||||
signal.data += list("tag" = output_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
target = CLAMP(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
var/target = text2num(params["pressure"])
|
||||
if(!isnull(target))
|
||||
target = CLAMP(target, 0, MAX_OUTPUT_PRESSURE)
|
||||
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
|
||||
. = TRUE
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/security/can_interact(mob/user)
|
||||
if((!issilicon(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
|
||||
if((!hasSiliconAccessInArea(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
jump_action.Grant(user)
|
||||
actions += jump_action
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user)
|
||||
/obj/machinery/proc/remove_eye_control(mob/living/user)
|
||||
CRASH("[type] does not implement ai eye handling")
|
||||
|
||||
/obj/machinery/computer/camera_advanced/remove_eye_control(mob/living/user)
|
||||
if(!user)
|
||||
return
|
||||
for(var/V in actions)
|
||||
@@ -69,7 +72,7 @@
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && hasSiliconAccessInArea(user)) || user.eye_blind || user.incapacitated() )
|
||||
user.unset_machine()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/Destroy()
|
||||
@@ -157,7 +160,7 @@
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
var/mob/living/eye_user = null
|
||||
var/obj/machinery/computer/camera_advanced/origin
|
||||
var/obj/machinery/origin
|
||||
var/eye_initialized = 0
|
||||
var/visible_icon = 0
|
||||
var/image/user_image = null
|
||||
@@ -170,7 +173,7 @@
|
||||
|
||||
/mob/camera/aiEye/remote/Destroy()
|
||||
if(origin && eye_user)
|
||||
origin.remove_eye_control(eye_user)
|
||||
origin.remove_eye_control(eye_user,src)
|
||||
origin = null
|
||||
. = ..()
|
||||
eye_user = null
|
||||
|
||||
@@ -171,7 +171,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
/obj/machinery/computer/card/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)) || !is_operational())
|
||||
return
|
||||
if(inserted_modify_id)
|
||||
if(id_eject(user, inserted_modify_id))
|
||||
@@ -360,7 +360,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)) || !is_operational())
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)) || !is_operational())
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=id_com")
|
||||
return
|
||||
@@ -392,7 +392,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
inserted_scan_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("auth")
|
||||
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) || mode))
|
||||
if ((!( authenticated ) && (inserted_scan_id || hasSiliconAccessInArea(usr)) || mode))
|
||||
if (check_access(inserted_scan_id))
|
||||
region_access = list()
|
||||
head_subordinates = list()
|
||||
@@ -426,7 +426,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
get_subordinates("Quartermaster")
|
||||
if(region_access)
|
||||
authenticated = 1
|
||||
else if ((!( authenticated ) && issilicon(usr)) && (!inserted_modify_id))
|
||||
else if ((!( authenticated ) && hasSiliconAccessInArea(usr)) && (!inserted_modify_id))
|
||||
to_chat(usr, "<span class='warning'>You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.</span>")
|
||||
if ("logout")
|
||||
region_access = null
|
||||
@@ -481,7 +481,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if ("reg")
|
||||
if (authenticated)
|
||||
var/t2 = inserted_modify_id
|
||||
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
|
||||
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || hasSiliconAccessInArea(usr)) && isturf(loc)))
|
||||
var/newName = reject_bad_name(href_list["reg"])
|
||||
if(newName)
|
||||
inserted_modify_id.registered_name = newName
|
||||
|
||||
@@ -482,7 +482,7 @@
|
||||
|
||||
R.fields["ckey"] = mob_occupant.ckey
|
||||
R.fields["name"] = mob_occupant.real_name
|
||||
R.fields["id"] = copytext(md5(mob_occupant.real_name), 2, 6)
|
||||
R.fields["id"] = copytext_char(md5(mob_occupant.real_name), 2, 6)
|
||||
R.fields["UE"] = dna.unique_enzymes
|
||||
R.fields["UI"] = dna.uni_identity
|
||||
R.fields["SE"] = dna.struc_enzymes
|
||||
|
||||
@@ -443,13 +443,13 @@
|
||||
var/dat = ""
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = SSshuttle.emergency.timeLeft()
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_leading(num2text(timeleft % 60), 2, "0")]"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
|
||||
if(issilicon(user))
|
||||
if(issilicon(user) || (hasSiliconAccessInArea(user) && !in_range(user,src)))
|
||||
var/dat2 = interact_ai(user) // give the AI a different interact proc to limit its access
|
||||
if(dat2)
|
||||
dat += dat2
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!user)
|
||||
return
|
||||
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
|
||||
if(!(in_range(src, user) || issilicon(user)))
|
||||
if(!(in_range(src, user) || hasSiliconAccessInArea(user)))
|
||||
popup.close()
|
||||
return
|
||||
popup.add_stylesheet("scannernew", 'html/browser/scannernew.css')
|
||||
@@ -274,13 +274,18 @@
|
||||
var/max_line_len = 7*DNA_BLOCK_SIZE
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
for(var/i=1, i<=len, i++)
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[i];'>[copytext(viable_occupant.dna.uni_identity,i,i+1)]</a>"
|
||||
if ((i % max_line_len) == 0)
|
||||
var/char = ""
|
||||
var/ui_text = viable_occupant.dna.uni_identity
|
||||
var/len_byte = length(ui_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = ui_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((i % DNA_BLOCK_SIZE) == 0 && i < len)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div><br>"
|
||||
@@ -288,13 +293,18 @@
|
||||
temp_html += "<br><div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><div class='clearBoth'>"
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
for(var/i=1, i<=len, i++)
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[i];'>[copytext(viable_occupant.dna.struc_enzymes,i,i+1)]</a>"
|
||||
if ((i % max_line_len) == 0)
|
||||
var/char = ""
|
||||
var/se_text = viable_occupant.dna.struc_enzymes
|
||||
var/len_byte = length(se_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = se_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((i % DNA_BLOCK_SIZE) == 0 && i < len)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div>"
|
||||
@@ -308,7 +318,7 @@
|
||||
return
|
||||
if(!isturf(usr.loc))
|
||||
return
|
||||
if(!((isturf(loc) && in_range(src, usr)) || issilicon(usr)))
|
||||
if(!((isturf(loc) && in_range(src, usr)) || hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(current_screen == "working")
|
||||
return
|
||||
@@ -465,7 +475,7 @@
|
||||
viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation
|
||||
switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage
|
||||
if("pulseui")
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
var/len = length_char(viable_occupant.dna.uni_identity)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
@@ -473,12 +483,12 @@
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "UI #[block]-[subblock]; "
|
||||
|
||||
var/hex = copytext(viable_occupant.dna.uni_identity, num, num+1)
|
||||
var/hex = copytext_char(viable_occupant.dna.uni_identity, num, num+1)
|
||||
last_change += "[hex]"
|
||||
hex = scramble(hex, radstrength, radduration)
|
||||
last_change += "->[hex]"
|
||||
|
||||
viable_occupant.dna.uni_identity = copytext(viable_occupant.dna.uni_identity, 1, num) + hex + copytext(viable_occupant.dna.uni_identity, num+1, 0)
|
||||
viable_occupant.dna.uni_identity = copytext_char(viable_occupant.dna.uni_identity, 1, num) + hex + copytext_char(viable_occupant.dna.uni_identity, num + 1)
|
||||
viable_occupant.updateappearance(mutations_overlay_update=1)
|
||||
if("pulsese")
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
@@ -489,12 +499,12 @@
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "SE #[block]-[subblock]; "
|
||||
|
||||
var/hex = copytext(viable_occupant.dna.struc_enzymes, num, num+1)
|
||||
var/hex = copytext_char(viable_occupant.dna.struc_enzymes, num, num+1)
|
||||
last_change += "[hex]"
|
||||
hex = scramble(hex, radstrength, radduration)
|
||||
last_change += "->[hex]"
|
||||
|
||||
viable_occupant.dna.struc_enzymes = copytext(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext(viable_occupant.dna.struc_enzymes, num+1, 0)
|
||||
viable_occupant.dna.struc_enzymes = copytext_char(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext_char(viable_occupant.dna.struc_enzymes, num + 1)
|
||||
viable_occupant.domutcheck()
|
||||
else
|
||||
current_screen = "mainmenu"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/obj/machinery/computer/launchpad
|
||||
name = "\improper launchpad control console"
|
||||
name = "launchpad control console"
|
||||
desc = "Used to teleport objects to and from a launchpad."
|
||||
icon_screen = "teleport"
|
||||
icon_keyboard = "teleport_key"
|
||||
circuit = /obj/item/circuitboard/computer/launchpad_console
|
||||
var/sending = TRUE
|
||||
var/current_pad //current pad viewed on the screen
|
||||
ui_x = 475
|
||||
ui_y = 260
|
||||
|
||||
var/selected_id
|
||||
var/list/obj/machinery/launchpad/launchpads
|
||||
var/maximum_pads = 4
|
||||
|
||||
@@ -18,7 +20,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/launchpad/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
@@ -36,55 +40,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/get_pad(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
return pad
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/list/t = list()
|
||||
if(!LAZYLEN(launchpads))
|
||||
obj_flags &= ~IN_USE //Yeah so if you deconstruct teleporter while its in the process of shooting it wont disable the console
|
||||
t += "<div class='statusDisplay'>No launchpad located.</div><BR>"
|
||||
else
|
||||
for(var/i in 1 to LAZYLEN(launchpads))
|
||||
if(pad_exists(i))
|
||||
var/obj/machinery/launchpad/pad = get_pad(i)
|
||||
if(pad.stat & NOPOWER)
|
||||
t+= "<span class='linkOff'>[pad.display_name]</span>"
|
||||
else
|
||||
t+= "<A href='?src=[REF(src)];choose_pad=1;pad=[i]'>[pad.display_name]</A>"
|
||||
else
|
||||
launchpads -= get_pad(i)
|
||||
t += "<BR>"
|
||||
|
||||
if(current_pad)
|
||||
var/obj/machinery/launchpad/pad = get_pad(current_pad)
|
||||
t += "<div class='statusDisplay'><b>[pad.display_name]</b></div>"
|
||||
t += "<A href='?src=[REF(src)];change_name=1;pad=[current_pad]'>Rename</A>"
|
||||
t += "<A href='?src=[REF(src)];remove=1;pad=[current_pad]'>Remove</A><BR><BR>"
|
||||
t += "<A href='?src=[REF(src)];raisey=1;lowerx=1;pad=[current_pad]'>O</A>" //up-left
|
||||
t += "<A href='?src=[REF(src)];raisey=1;pad=[current_pad]'>^</A>" //up
|
||||
t += "<A href='?src=[REF(src)];raisey=1;raisex=1;pad=[current_pad]'>O</A><BR>" //up-right
|
||||
t += "<A href='?src=[REF(src)];lowerx=1;pad=[current_pad]'><</A>"//left
|
||||
t += "<A href='?src=[REF(src)];reset=1;pad=[current_pad]'>R</A>"//reset to 0
|
||||
t += "<A href='?src=[REF(src)];raisex=1;pad=[current_pad]'>></A><BR>"//right
|
||||
t += "<A href='?src=[REF(src)];lowery=1;lowerx=1;pad=[current_pad]'>O</A>"//down-left
|
||||
t += "<A href='?src=[REF(src)];lowery=1;pad=[current_pad]'>v</A>"//down
|
||||
t += "<A href='?src=[REF(src)];lowery=1;raisex=1;pad=[current_pad]'>O</A><BR>"//down-right
|
||||
t += "<BR>"
|
||||
t += "<div class='statusDisplay'>Current offset:</div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.y_offset)] [pad.y_offset > 0 ? "N":"S"] <a href='?src=[REF(src)];sety=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.x_offset)] [pad.x_offset > 0 ? "E":"W"] <a href='?src=[REF(src)];setx=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
|
||||
|
||||
t += "<BR><A href='?src=[REF(src)];launch=1;pad=[current_pad]'>Launch</A>"
|
||||
t += " <A href='?src=[REF(src)];pull=1;pad=[current_pad]'>Pull</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "launchpad", name, 300, 500)
|
||||
popup.set_content(t.Join())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/teleport(mob/user, obj/machinery/launchpad/pad)
|
||||
/obj/machinery/computer/launchpad/proc/teleport(mob/user, obj/machinery/launchpad/pad, sending)
|
||||
if(QDELETED(pad))
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not responding. Check launchpad integrity.</span>")
|
||||
return
|
||||
@@ -93,66 +49,83 @@
|
||||
return
|
||||
pad.doteleport(user, sending)
|
||||
|
||||
/obj/machinery/computer/launchpad/Topic(href, href_list)
|
||||
var/obj/machinery/launchpad/pad
|
||||
if(href_list["pad"])
|
||||
pad = get_pad(text2num(href_list["pad"]))
|
||||
/obj/machinery/computer/launchpad/proc/get_pad(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
return pad
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "launchpad_console", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/pad_list = list()
|
||||
for(var/i in 1 to LAZYLEN(launchpads))
|
||||
if(pad_exists(i))
|
||||
var/obj/machinery/launchpad/pad = get_pad(i)
|
||||
var/list/this_pad = list()
|
||||
this_pad["name"] = pad.display_name
|
||||
this_pad["id"] = i
|
||||
if(pad.stat & NOPOWER)
|
||||
this_pad["inactive"] = TRUE
|
||||
pad_list += list(this_pad)
|
||||
else
|
||||
launchpads -= get_pad(i)
|
||||
data["launchpads"] = pad_list
|
||||
data["selected_id"] = selected_id
|
||||
if(selected_id)
|
||||
var/obj/machinery/launchpad/current_pad = launchpads[selected_id]
|
||||
data["x"] = current_pad.x_offset
|
||||
data["y"] = current_pad.y_offset
|
||||
data["pad_name"] = current_pad.display_name
|
||||
data["range"] = current_pad.range
|
||||
data["selected_pad"] = current_pad
|
||||
if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
|
||||
data["pad_active"] = FALSE
|
||||
return data
|
||||
data["pad_active"] = TRUE
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/launchpad/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!LAZYLEN(launchpads))
|
||||
updateDialog()
|
||||
return
|
||||
var/obj/machinery/launchpad/current_pad = launchpads[selected_id]
|
||||
switch(action)
|
||||
if("select_pad")
|
||||
selected_id = text2num(params["id"])
|
||||
. = TRUE
|
||||
if("set_pos")
|
||||
var/new_x = text2num(params["x"])
|
||||
var/new_y = text2num(params["y"])
|
||||
current_pad.set_offset(new_x, new_y)
|
||||
. = TRUE
|
||||
if("move_pos")
|
||||
var/plus_x = text2num(params["x"])
|
||||
var/plus_y = text2num(params["y"])
|
||||
current_pad.set_offset(
|
||||
x = current_pad.x_offset + plus_x,
|
||||
y = current_pad.y_offset + plus_y
|
||||
)
|
||||
. = TRUE
|
||||
if("rename")
|
||||
. = TRUE
|
||||
var/new_name = params["name"]
|
||||
if(!new_name)
|
||||
return
|
||||
current_pad.display_name = new_name
|
||||
if("remove")
|
||||
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
launchpads -= current_pad
|
||||
selected_id = null
|
||||
. = TRUE
|
||||
if("launch")
|
||||
teleport(usr, current_pad, TRUE)
|
||||
. = TRUE
|
||||
|
||||
if(href_list["choose_pad"])
|
||||
current_pad = text2num(href_list["pad"])
|
||||
|
||||
if(href_list["raisex"])
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
|
||||
if(href_list["lowerx"])
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
|
||||
if(href_list["raisey"])
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
|
||||
if(href_list["lowery"])
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
|
||||
if(href_list["reset"])
|
||||
pad.y_offset = 0
|
||||
pad.x_offset = 0
|
||||
|
||||
if(href_list["change_name"])
|
||||
var/new_name = stripped_input(usr, "What do you wish to name the launchpad?", "Launchpad", pad.display_name, 15)
|
||||
if(!new_name)
|
||||
return
|
||||
pad.display_name = new_name
|
||||
|
||||
if(href_list["setx"])
|
||||
var/newx = input(usr, "Input new x offset", pad.display_name, pad.x_offset) as null|num
|
||||
if(!isnull(newx))
|
||||
pad.x_offset = CLAMP(newx, -pad.range, pad.range)
|
||||
|
||||
if(href_list["sety"])
|
||||
var/newy = input(usr, "Input new y offset", pad.display_name, pad.y_offset) as null|num
|
||||
if(!isnull(newy))
|
||||
pad.y_offset = CLAMP(newy, -pad.range, pad.range)
|
||||
|
||||
if(href_list["remove"])
|
||||
if(usr && alert(usr, "Are you sure?", "Remove Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
launchpads -= pad
|
||||
|
||||
if(href_list["launch"])
|
||||
sending = TRUE
|
||||
teleport(usr, pad)
|
||||
|
||||
if(href_list["pull"])
|
||||
sending = FALSE
|
||||
teleport(usr, pad)
|
||||
|
||||
updateDialog()
|
||||
if("pull")
|
||||
teleport(usr, current_pad, FALSE)
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
@@ -190,7 +190,7 @@
|
||||
if(!(active2 in GLOB.data_core.medical))
|
||||
active2 = null
|
||||
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["temp"])
|
||||
temp = null
|
||||
@@ -216,7 +216,7 @@
|
||||
else if(href_list["login"])
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(issilicon(M))
|
||||
if(hasSiliconAccessInArea(M))
|
||||
active1 = null
|
||||
active2 = null
|
||||
authenticated = 1
|
||||
@@ -478,7 +478,7 @@
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
|
||||
else if(href_list["del_c"])
|
||||
if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
|
||||
@@ -569,7 +569,7 @@
|
||||
if(user)
|
||||
if(message)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return 1
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
/obj/machinery/computer/pod/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["power"])
|
||||
var/t = text2num(href_list["power"])
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
icon_keyboard = "security_key"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
|
||||
ui_x = 350
|
||||
ui_y = 295
|
||||
|
||||
var/default_goal = 200
|
||||
var/obj/machinery/gulag_teleporter/teleporter = null
|
||||
var/obj/structure/gulag_beacon/beacon = null
|
||||
@@ -22,7 +25,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
|
||||
ui = new(user, src, ui_key, "gulag_console", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_data(mob/user)
|
||||
@@ -50,13 +53,19 @@
|
||||
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
|
||||
data["teleporter_lock"] = teleporter.locked
|
||||
data["teleporter_state_open"] = teleporter.state_open
|
||||
else
|
||||
data["teleporter"] = null
|
||||
if(beacon)
|
||||
data["beacon"] = beacon
|
||||
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
|
||||
else
|
||||
data["beacon"] = null
|
||||
if(contained_id)
|
||||
data["id"] = contained_id
|
||||
data["id_name"] = contained_id.registered_name
|
||||
data["goal"] = contained_id.goal
|
||||
else
|
||||
data["id"] = null
|
||||
data["can_teleport"] = can_teleport
|
||||
|
||||
return data
|
||||
@@ -72,36 +81,41 @@
|
||||
switch(action)
|
||||
if("scan_teleporter")
|
||||
teleporter = findteleporter()
|
||||
return TRUE
|
||||
if("scan_beacon")
|
||||
beacon = findbeacon()
|
||||
return TRUE
|
||||
if("handle_id")
|
||||
if(contained_id)
|
||||
id_eject(usr)
|
||||
else
|
||||
id_insert(usr)
|
||||
return TRUE
|
||||
if("set_goal")
|
||||
var/new_goal = input("Set the amount of points:", "Points", contained_id.goal) as num|null
|
||||
var/new_goal = text2num(params["value"])
|
||||
if(!isnum(new_goal))
|
||||
return
|
||||
if(!new_goal)
|
||||
new_goal = default_goal
|
||||
if (new_goal > 1000)
|
||||
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
|
||||
contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
|
||||
return TRUE
|
||||
if("toggle_open")
|
||||
if(teleporter.locked)
|
||||
to_chat(usr, "The teleporter is locked")
|
||||
to_chat(usr, "<span class='alert'>The teleporter must be unlocked first.</span>")
|
||||
return
|
||||
teleporter.toggle_open()
|
||||
return TRUE
|
||||
if("teleporter_lock")
|
||||
if(teleporter.state_open)
|
||||
to_chat(usr, "Close the teleporter before locking!")
|
||||
to_chat(usr, "<span class='alert'>The teleporter must be closed first.</span>")
|
||||
return
|
||||
teleporter.locked = !teleporter.locked
|
||||
return TRUE
|
||||
if("teleport")
|
||||
if(!teleporter || !beacon)
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/prisoner/gulag_teleporter_computer/proc/scan_machinery()
|
||||
teleporter = findteleporter()
|
||||
@@ -129,12 +143,12 @@
|
||||
say("[contained_id]'s ID card goal defaulting to [contained_id.goal] points.")
|
||||
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][contained_id.goal] points.")
|
||||
teleporter.handle_prisoner(contained_id, temporary_record)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, TRUE)
|
||||
prisoner.forceMove(get_turf(beacon))
|
||||
prisoner.Stun(40) // small travel dizziness
|
||||
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
|
||||
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
|
||||
playsound(src, "sparks", 50, 1)
|
||||
playsound(src, "sparks", 50, TRUE)
|
||||
if(teleporter.locked)
|
||||
teleporter.locked = FALSE
|
||||
teleporter.toggle_open()
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/machinery/computer/prisoner/management/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["id"])
|
||||
@@ -125,7 +125,7 @@
|
||||
to_chat(usr, "<span class='danger'>Unauthorized access.</span>")
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
|
||||
var/warning = stripped_input(usr, "Message:", "Enter your message here!", "", MAX_MESSAGE_LEN)
|
||||
if(!warning)
|
||||
return
|
||||
var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants
|
||||
|
||||
@@ -265,7 +265,7 @@ What a mess.*/
|
||||
active1 = null
|
||||
if(!( GLOB.data_core.security.Find(active2) ))
|
||||
active2 = null
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
// SORTING!
|
||||
@@ -299,7 +299,7 @@ What a mess.*/
|
||||
if("Log In")
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(issilicon(M))
|
||||
if(hasSiliconAccessInArea(M))
|
||||
var/mob/living/silicon/borg = M
|
||||
active1 = null
|
||||
active2 = null
|
||||
@@ -456,7 +456,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
|
||||
|
||||
if("Delete Record (ALL)")
|
||||
if(active1)
|
||||
@@ -544,7 +544,7 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input name:", "Secure. records", active1.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
var/t1 = stripped_input(usr, "Please input name:", "Secure. records", active1.fields["name"], MAX_MESSAGE_LEN)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, a1))
|
||||
return
|
||||
if(istype(active1, /datum/data/record))
|
||||
@@ -636,7 +636,7 @@ What a mess.*/
|
||||
var/t2 = stripped_input(usr, "Please input minor crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss"))
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time))
|
||||
GLOB.data_core.addMinorCrime(active1.fields["id"], crime)
|
||||
investigate_log("New Minor Crime: <strong>[t1]</strong>: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
|
||||
if("mi_crim_delete")
|
||||
@@ -651,7 +651,7 @@ What a mess.*/
|
||||
var/t2 = stripped_input(usr, "Please input major crime details:", "Secure. records", "", null)
|
||||
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
|
||||
return
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss"))
|
||||
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, STATION_TIME_TIMESTAMP("hh:mm:ss", world.time))
|
||||
GLOB.data_core.addMajorCrime(active1.fields["id"], crime)
|
||||
investigate_log("New Major Crime: <strong>[t1]</strong>: [t2] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS)
|
||||
if("ma_crim_delete")
|
||||
@@ -802,7 +802,7 @@ What a mess.*/
|
||||
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
|
||||
if(user)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
if(!trim(message1))
|
||||
return 0
|
||||
if(!record1 || record1 == active1)
|
||||
|
||||
@@ -20,17 +20,18 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "station_alert", name, 300, 500, master_ui, state)
|
||||
ui = new(user, src, ui_key, "station_alert", name, 325, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/station_alert/ui_data(mob/user)
|
||||
. = list()
|
||||
var/list/data = list()
|
||||
|
||||
.["alarms"] = list()
|
||||
data["alarms"] = list()
|
||||
for(var/class in alarms)
|
||||
.["alarms"][class] = list()
|
||||
data["alarms"][class] = list()
|
||||
for(var/area in alarms[class])
|
||||
.["alarms"][class] += area
|
||||
data["alarms"][class] += area
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/station_alert/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
if(source.z != z)
|
||||
|
||||
@@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
var/list/transferlog = list()
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/logTransfer(logmessage)
|
||||
transferlog += ("<b>[STATION_TIME_TIMESTAMP("hh:mm:ss")]</b> [logmessage]")
|
||||
transferlog += ("<b>[STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]</b> [logmessage]")
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/scanUplinkers()
|
||||
for(var/obj/machinery/computer/telecrystals/uplinker/A in urange(scanrange, src.loc))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
icon_keyboard = "teleport_key"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
circuit = /obj/item/circuitboard/computer/teleporter
|
||||
ui_x = 475
|
||||
ui_y = 130
|
||||
var/regime_set = "Teleporter"
|
||||
var/id
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
@@ -32,34 +34,30 @@
|
||||
break
|
||||
return power_station
|
||||
|
||||
/obj/machinery/computer/teleporter/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/data = "<h3>Teleporter Status</h3>"
|
||||
if(!power_station)
|
||||
data += "<div class='statusDisplay'>No power station linked.</div>"
|
||||
else if(!power_station.teleporter_hub)
|
||||
data += "<div class='statusDisplay'>No hub linked.</div>"
|
||||
obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "teleporter", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/teleporter/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["power_station"] = power_station ? TRUE : FALSE
|
||||
data["teleporter_hub"] = power_station?.teleporter_hub ? TRUE : FALSE
|
||||
data["regime_set"] = regime_set
|
||||
data["target"] = !target ? "None" : "[get_area(target)] [(regime_set != "Gate") ? "" : "Teleporter"]"
|
||||
data["calibrating"] = calibrating
|
||||
|
||||
if(power_station?.teleporter_hub?.calibrated || power_station?.teleporter_hub?.accuracy >= 3)
|
||||
data["calibrated"] = TRUE
|
||||
else
|
||||
data += "<div class='statusDisplay'>Current regime: [regime_set]<BR>"
|
||||
data += "Current target: [(!target) ? "None" : "[get_area(target)] [(regime_set != "Gate") ? "" : "Teleporter"]"]<BR>"
|
||||
if(calibrating)
|
||||
data += "Calibration: <font color='yellow'>In Progress</font>"
|
||||
else if(power_station.teleporter_hub.calibrated || power_station.efficiency >= 3)
|
||||
data += "Calibration: <font color='green'>Optimal</font>"
|
||||
else
|
||||
data += "Calibration: <font color='red'>Sub-Optimal</font>"
|
||||
data += "</div><BR>"
|
||||
data["calibrated"] = FALSE
|
||||
|
||||
data += "<A href='?src=[REF(src)];regimeset=1'>Change regime</A><BR>"
|
||||
data += "<A href='?src=[REF(src)];settarget=1'>Set target</A><BR>"
|
||||
return data
|
||||
|
||||
data += "<BR><A href='?src=[REF(src)];calibrate=1'>Calibrate Hub</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "teleporter", name, 400, 400)
|
||||
popup.set_content(data)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/teleporter/Topic(href, href_list)
|
||||
/obj/machinery/computer/teleporter/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -70,38 +68,39 @@
|
||||
say("Error: Calibration in progress. Stand by.")
|
||||
return
|
||||
|
||||
if(href_list["regimeset"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
reset_regime()
|
||||
if(href_list["settarget"])
|
||||
power_station.engaged = 0
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = 0
|
||||
set_target(usr)
|
||||
if(href_list["calibrate"])
|
||||
if(!target)
|
||||
say("Error: No target set to calibrate to.")
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.efficiency >= 3)
|
||||
say("Hub is already calibrated!")
|
||||
return
|
||||
say("Processing hub calibration to target...")
|
||||
switch(action)
|
||||
if("regimeset")
|
||||
power_station.engaged = FALSE
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = FALSE
|
||||
reset_regime()
|
||||
. = TRUE
|
||||
if("settarget")
|
||||
power_station.engaged = FALSE
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.calibrated = FALSE
|
||||
set_target(usr)
|
||||
. = TRUE
|
||||
if("calibrate")
|
||||
if(!target)
|
||||
say("Error: No target set to calibrate to.")
|
||||
return
|
||||
if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accuracy >= 3)
|
||||
say("Hub is already calibrated!")
|
||||
return
|
||||
|
||||
calibrating = 1
|
||||
power_station.update_icon()
|
||||
spawn(50 * (3 - power_station.efficiency)) //Better parts mean faster calibration
|
||||
calibrating = 0
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = 1
|
||||
say("Calibration complete.")
|
||||
else
|
||||
say("Error: Unable to detect hub.")
|
||||
say("Processing hub calibration to target...")
|
||||
calibrating = TRUE
|
||||
power_station.update_icon()
|
||||
updateDialog()
|
||||
|
||||
updateDialog()
|
||||
spawn(50 * (3 - power_station.teleporter_hub.accuracy)) //Better parts mean faster calibration
|
||||
calibrating = FALSE
|
||||
if(check_hub_connection())
|
||||
power_station.teleporter_hub.calibrated = TRUE
|
||||
say("Calibration complete.")
|
||||
else
|
||||
say("Error: Unable to detect hub.")
|
||||
power_station.update_icon()
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/check_hub_connection()
|
||||
if(!power_station)
|
||||
@@ -141,7 +140,7 @@
|
||||
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = M
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
|
||||
if(!user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) //check if we are still around
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //check if we are still around
|
||||
return
|
||||
target = L[desc]
|
||||
if(imp_t)
|
||||
@@ -169,7 +168,7 @@
|
||||
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
|
||||
return
|
||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
||||
if(!user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) //again, check if we are still around
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user), NO_DEXTERY)) //again, check if we are still around
|
||||
return
|
||||
var/obj/machinery/teleport/station/target_station = L[desc]
|
||||
if(!target_station || !target_station.teleporter_hub)
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
|
||||
if(istype(P, /obj/item/circuitboard/machine))
|
||||
var/obj/item/circuitboard/machine/B = P
|
||||
if(!B.build_path)
|
||||
to_chat(user, "<span class'warning'>This circuitboard seems to be broken.</span>")
|
||||
return
|
||||
if(!anchored && B.needs_anchored)
|
||||
to_chat(user, "<span class='warning'>The frame needs to be secured first!</span>")
|
||||
return
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
* ~ Zuhayr
|
||||
*/
|
||||
|
||||
|
||||
//Main cryopod console.
|
||||
|
||||
/obj/machinery/computer/cryopod
|
||||
@@ -18,7 +17,6 @@
|
||||
density = FALSE
|
||||
interaction_flags_machine = INTERACT_MACHINE_OFFLINE
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with.
|
||||
var/mode = null
|
||||
|
||||
var/menu = 1 //Which menu screen to display
|
||||
|
||||
@@ -118,7 +116,7 @@
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
I.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(I)
|
||||
frozen_items -= I
|
||||
updateUsrDialog()
|
||||
@@ -130,7 +128,8 @@
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(!allow_items) return
|
||||
if(!allow_items)
|
||||
return
|
||||
|
||||
if(frozen_items.len == 0)
|
||||
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
@@ -182,7 +181,7 @@
|
||||
var/last_no_computer_message = 0
|
||||
|
||||
// These items are preserved when the process() despawn proc occurs.
|
||||
var/list/preserve_items = list(
|
||||
var/static/list/preserve_items = typecacheof(list(
|
||||
/obj/item/hand_tele,
|
||||
/obj/item/card/id/captains_spare,
|
||||
/obj/item/aicard,
|
||||
@@ -203,9 +202,9 @@
|
||||
/obj/item/tank/jetpack,
|
||||
/obj/item/documents,
|
||||
/obj/item/nuke_core_container
|
||||
)
|
||||
))
|
||||
// These items will NOT be preserved
|
||||
var/list/do_not_preserve_items = list (
|
||||
var/static/list/do_not_preserve_items = typecacheof(list(
|
||||
/obj/item/mmi/posibrain,
|
||||
/obj/item/gun/energy/laser/mounted,
|
||||
/obj/item/gun/energy/e_gun/advtaser/mounted,
|
||||
@@ -215,7 +214,7 @@
|
||||
/obj/item/gun/energy/printer,
|
||||
/obj/item/gun/energy/kinetic_accelerator/cyborg,
|
||||
/obj/item/gun/energy/laser/cyborg
|
||||
)
|
||||
))
|
||||
|
||||
/obj/machinery/cryopod/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -287,14 +286,14 @@
|
||||
#define CRYO_DESTROY 0
|
||||
#define CRYO_PRESERVE 1
|
||||
#define CRYO_OBJECTIVE 2
|
||||
#define CRYO_IGNORE 3
|
||||
|
||||
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I)
|
||||
for(var/datum/objective_item/steal/T in control_computer.theft_cache)
|
||||
if(istype(I, T.targetitem) && T.check_special_completion(I))
|
||||
return CRYO_OBJECTIVE
|
||||
for(var/T in preserve_items)
|
||||
if(istype(I, T) && !(I.type in do_not_preserve_items))
|
||||
return CRYO_PRESERVE
|
||||
if(preserve_items[I] && !do_not_preserve_items[I])
|
||||
return CRYO_PRESERVE
|
||||
return CRYO_DESTROY
|
||||
|
||||
// This function can not be undone; do not call this unless you are sure
|
||||
@@ -303,52 +302,47 @@
|
||||
find_control_computer()
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
var/list/obj/item/cryo_items = list()
|
||||
|
||||
//Handle Borg stuff first
|
||||
if(iscyborg(mob_occupant))
|
||||
var/mob/living/silicon/robot/R = mob_occupant
|
||||
|
||||
R.contents -= R.mmi
|
||||
qdel(R.mmi)
|
||||
if(R.mmi?.brain)
|
||||
cryo_items[R.mmi] = CRYO_IGNORE
|
||||
cryo_items[R.mmi.brain] = CRYO_IGNORE
|
||||
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
|
||||
for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags
|
||||
if(should_preserve_item(O) != CRYO_DESTROY) // Preserve important things inside the item
|
||||
continue
|
||||
cryo_items[O] = should_preserve_item(O)
|
||||
O.forceMove(src)
|
||||
R.module.remove_module(I, TRUE) //delete the module itself so it doesn't transfer over.
|
||||
|
||||
//Drop all items into the pod.
|
||||
for(var/obj/item/I in mob_occupant)
|
||||
mob_occupant.doUnEquip(I)
|
||||
I.forceMove(src)
|
||||
|
||||
if(cryo_items[I] == CRYO_IGNORE)
|
||||
continue
|
||||
cryo_items[I] = should_preserve_item(I)
|
||||
mob_occupant.transferItemToLoc(I, src, TRUE)
|
||||
if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items.
|
||||
if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation
|
||||
if(cryo_items[I] != CRYO_DESTROY) // Don't remove the contents of things that need preservation
|
||||
continue
|
||||
for(var/obj/item/O in I.contents)
|
||||
if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck!
|
||||
continue
|
||||
cryo_items[O] = should_preserve_item(O)
|
||||
O.forceMove(src)
|
||||
|
||||
//Delete all items not on the preservation list.
|
||||
var/list/items = contents
|
||||
items -= mob_occupant // Don't delete the occupant
|
||||
|
||||
for(var/obj/item/I in items)
|
||||
if(istype(I, /obj/item/pda))
|
||||
var/obj/item/pda/P = I
|
||||
QDEL_NULL(P.id)
|
||||
qdel(P)
|
||||
for(var/A in cryo_items)
|
||||
var/obj/item/I = A
|
||||
if(QDELETED(I)) //edge cases and DROPDEL.
|
||||
continue
|
||||
|
||||
var/preserve = should_preserve_item(I)
|
||||
if(preserve == CRYO_DESTROY)
|
||||
var/preserve = cryo_items[I]
|
||||
if(preserve == CRYO_IGNORE)
|
||||
continue
|
||||
else if(preserve == CRYO_DESTROY)
|
||||
qdel(I)
|
||||
else if(control_computer && control_computer.allow_items)
|
||||
else if(control_computer?.allow_items)
|
||||
control_computer.frozen_items += I
|
||||
if(preserve == CRYO_OBJECTIVE)
|
||||
control_computer.objective_items += I
|
||||
I.loc = null
|
||||
I.moveToNullspace()
|
||||
else
|
||||
I.forceMove(loc)
|
||||
|
||||
@@ -417,6 +411,7 @@
|
||||
#undef CRYO_DESTROY
|
||||
#undef CRYO_PRESERVE
|
||||
#undef CRYO_OBJECTIVE
|
||||
#undef CRYO_IGNORE
|
||||
|
||||
/obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user)
|
||||
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
|
||||
@@ -443,29 +438,24 @@
|
||||
var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!"
|
||||
|
||||
if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)//if we haven't warned them in the last 5 minutes
|
||||
var/caught = FALSE
|
||||
var/list/caught_string
|
||||
var/addendum = ""
|
||||
if(target.mind.assigned_role in GLOB.command_positions)
|
||||
alert("<span class='userdanger'>You're a Head of Staff![generic_plsnoleave_message] Be sure to put your locker items back into your locker!</span>")
|
||||
caught = TRUE
|
||||
LAZYADD(caught_string, "Head of Staff")
|
||||
addendum = " Be sure to put your locker items back into your locker!"
|
||||
if(iscultist(target) || is_servant_of_ratvar(target))
|
||||
to_chat(target, "<span class='userdanger'>You're a Cultist![generic_plsnoleave_message]</span>")
|
||||
caught = TRUE
|
||||
LAZYADD(caught_string, "Cultist")
|
||||
if(is_devil(target))
|
||||
alert("<span class='userdanger'>You're a Devil![generic_plsnoleave_message]</span>")
|
||||
caught = TRUE
|
||||
if(istype(SSticker.mode, /datum/antagonist/gang))
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/gang))
|
||||
alert("<span class='userdanger'>You're a Gangster![generic_plsnoleave_message]</span>")
|
||||
caught = TRUE
|
||||
if(istype(SSticker.mode, /datum/antagonist/rev))
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/rev/head))
|
||||
alert("<span class='userdanger'>You're a Head Revolutionary![generic_plsnoleave_message]</span>")
|
||||
caught = TRUE
|
||||
else if(target.mind.has_antag_datum(/datum/antagonist/rev))
|
||||
alert("<span class='userdanger'>You're a Revolutionary![generic_plsnoleave_message]</span>")
|
||||
caught = TRUE
|
||||
LAZYADD(caught_string, "Devil")
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/gang))
|
||||
LAZYADD(caught_string, "Gangster")
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/rev/head))
|
||||
LAZYADD(caught_string, "Head Revolutionary")
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/rev))
|
||||
LAZYADD(caught_string, "Revolutionary")
|
||||
|
||||
if(caught)
|
||||
if(caught_string)
|
||||
alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
|
||||
target.client.cryo_warned = world.time
|
||||
return
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/machinery/jukebox/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if (!anchored)
|
||||
to_chat(user,"<span class='warning'>This device must be anchored by a wrench!</span>")
|
||||
@@ -202,6 +202,8 @@
|
||||
for(var/i in 1 to 10)
|
||||
spawn_atom_to_turf(/obj/effect/temp_visual/hierophant/telegraph/edge, src, 1, FALSE)
|
||||
sleep(5)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
#define DISCO_INFENO_RANGE (rand(85, 115)*0.01)
|
||||
|
||||
@@ -406,12 +408,11 @@
|
||||
lying_prev = 0
|
||||
|
||||
/obj/machinery/jukebox/proc/dance_over()
|
||||
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
|
||||
var/position = SSjukeboxes.findjukeboxindex(src)
|
||||
if(!position)
|
||||
return
|
||||
SSjukeboxes.removejukebox(position)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/mob/living/L in rangers)
|
||||
if(!L || !L.client)
|
||||
continue
|
||||
L.stop_sound_channel(CHANNEL_JUKEBOX)
|
||||
rangers = list()
|
||||
|
||||
/obj/machinery/jukebox/disco/dance_over()
|
||||
@@ -431,6 +432,6 @@
|
||||
/obj/machinery/jukebox/disco/process()
|
||||
. = ..()
|
||||
if(active)
|
||||
for(var/mob/M in rangers)
|
||||
for(var/mob/living/M in rangers)
|
||||
if(prob(5+(allowed(M)*4)) && M.canmove)
|
||||
dance(M)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
/obj/machinery/defibrillator_mount/AltClick(mob/living/carbon/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
. = TRUE
|
||||
if(!defib)
|
||||
@@ -129,9 +129,10 @@
|
||||
if(clamps_locked)
|
||||
to_chat(user, "<span class='warning'>You try to tug out [defib], but the mount's clamps are locked tight!</span>")
|
||||
return
|
||||
if(!user.put_in_hands(defib))
|
||||
if(!user.get_empty_held_indexes())
|
||||
to_chat(user, "<span class='warning'>You need a free hand!</span>")
|
||||
return
|
||||
user.put_in_hands(defib)
|
||||
user.visible_message("<span class='notice'>[user] unhooks [defib] from [src].</span>", \
|
||||
"<span class='notice'>You slide out [defib] from [src] and unhook the charging cables.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
@@ -147,4 +148,4 @@
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 100)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
result_path = /obj/machinery/defibrillator_mount
|
||||
pixel_shift = -28
|
||||
pixel_shift = -28
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/obj/machinery/dish_drive/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
do_the_dishes(TRUE)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
/obj/machinery/dna_scannernew/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
@@ -676,7 +676,7 @@
|
||||
else
|
||||
. += "It looks very robust."
|
||||
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(hasSiliconAccessInArea(user) && (!stat & BROKEN))
|
||||
. += "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>"
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>"
|
||||
@@ -1322,9 +1322,9 @@
|
||||
if(density && !open(2)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!)
|
||||
to_chat(user, "<span class='warning'>Despite your efforts, [src] managed to resist your attempts to open it!</span>")
|
||||
|
||||
/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
|
||||
/obj/machinery/door/airlock/hostile_lockdown(mob/origin, aicontrolneeded = TRUE)
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
|
||||
locked = FALSE //For airlocks that were bolted open.
|
||||
safe = FALSE //DOOR CRUSH
|
||||
close()
|
||||
@@ -1334,9 +1334,9 @@
|
||||
LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\] [key_name(origin)]")
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/disable_lockdown()
|
||||
/obj/machinery/door/airlock/disable_lockdown(aicontrolneeded = TRUE)
|
||||
// Must be powered and have working AI wire.
|
||||
if(canAIControl(src) && !stat)
|
||||
if((aicontrolneeded && canAIControl(src) && !stat) || !aicontrolneeded)
|
||||
unbolt()
|
||||
set_electrified(NOT_ELECTRIFIED)
|
||||
open()
|
||||
@@ -1434,7 +1434,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "ai_airlock", name, 550, 456, master_ui, state)
|
||||
ui = new(user, src, ui_key, "ai_airlock", name, 500, 390, master_ui, state)
|
||||
ui.open()
|
||||
return TRUE
|
||||
|
||||
@@ -1503,83 +1503,24 @@
|
||||
if("shock-perm")
|
||||
shock_perm(usr)
|
||||
. = TRUE
|
||||
if("idscan-on")
|
||||
if(wires.is_cut(WIRE_IDSCAN))
|
||||
to_chat(usr, "You can't enable IdScan - The IdScan wire has been cut.")
|
||||
else if(src.aiDisabledIdScanner)
|
||||
aiDisabledIdScanner = FALSE
|
||||
else
|
||||
to_chat(usr, "The IdScan feature is not disabled.")
|
||||
if("idscan-toggle")
|
||||
aiDisabledIdScanner = !aiDisabledIdScanner
|
||||
. = TRUE
|
||||
if("idscan-off")
|
||||
if(wires.is_cut(WIRE_IDSCAN))
|
||||
to_chat(usr, "The IdScan wire has been cut - So, you can't disable it, but it is already disabled anyways.")
|
||||
else if(aiDisabledIdScanner)
|
||||
to_chat(usr, "You've already disabled the IdScan feature.")
|
||||
else
|
||||
aiDisabledIdScanner = TRUE
|
||||
if("emergency-toggle")
|
||||
toggle_emergency(usr)
|
||||
. = TRUE
|
||||
if("emergency-on")
|
||||
emergency_on(usr)
|
||||
if("bolt-toggle")
|
||||
toggle_bolt(usr)
|
||||
. = TRUE
|
||||
if("emergency-off")
|
||||
emergency_off(usr)
|
||||
if("light-toggle")
|
||||
lights = !lights
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("bolt-raise")
|
||||
bolt_raise(usr)
|
||||
if("safe-toggle")
|
||||
safe = !safe
|
||||
. = TRUE
|
||||
if("bolt-drop")
|
||||
bolt_drop(usr)
|
||||
. = TRUE
|
||||
if("light-on")
|
||||
if(wires.is_cut(WIRE_LIGHT))
|
||||
to_chat(usr, "Control to door bolt lights has been severed.")
|
||||
else if (!src.lights)
|
||||
lights = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, text("Door bolt lights are already enabled!"))
|
||||
. = TRUE
|
||||
if("light-off")
|
||||
if(wires.is_cut(WIRE_LIGHT))
|
||||
to_chat(usr, "Control to door bolt lights has been severed.")
|
||||
else if (lights)
|
||||
lights = FALSE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "Door bolt lights are already disabled!")
|
||||
. = TRUE
|
||||
if("safe-on")
|
||||
if(wires.is_cut(WIRE_SAFETY))
|
||||
to_chat(usr, "Control to door sensors is disabled.")
|
||||
else if (!src.safe)
|
||||
safe = TRUE
|
||||
else
|
||||
to_chat(usr, "Firmware reports safeties already in place.")
|
||||
. = TRUE
|
||||
if("safe-off")
|
||||
if(wires.is_cut(WIRE_SAFETY))
|
||||
to_chat(usr, "Control to door sensors is disabled.")
|
||||
else if (safe)
|
||||
safe = FALSE
|
||||
else
|
||||
to_chat(usr, "Firmware reports safeties already overridden.")
|
||||
. = TRUE
|
||||
if("speed-on")
|
||||
if(wires.is_cut(WIRE_TIMING))
|
||||
to_chat(usr, "Control to door timing circuitry has been severed.")
|
||||
else if (!src.normalspeed)
|
||||
normalspeed = 1
|
||||
else
|
||||
to_chat(usr,"Door timing circuitry currently operating normally.")
|
||||
. = TRUE
|
||||
if("speed-off")
|
||||
if(wires.is_cut(WIRE_TIMING))
|
||||
to_chat(usr, "Control to door timing circuitry has been severed.")
|
||||
else if (normalspeed)
|
||||
normalspeed = 0
|
||||
else
|
||||
to_chat(usr, "Door timing circuitry already accelerated.")
|
||||
if("speed-toggle")
|
||||
normalspeed = !normalspeed
|
||||
|
||||
. = TRUE
|
||||
if("open-close")
|
||||
@@ -1587,7 +1528,7 @@
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/door/airlock/proc/user_allowed(mob/user)
|
||||
return (issilicon(user) && canAIControl(user)) || IsAdminGhost(user)
|
||||
return (hasSiliconAccessInArea(user) && canAIControl(user)) || IsAdminGhost(user)
|
||||
|
||||
/obj/machinery/door/airlock/proc/shock_restore(mob/user)
|
||||
if(!user_allowed(user))
|
||||
@@ -1617,45 +1558,26 @@
|
||||
log_combat(user, src, "electrified")
|
||||
set_electrified(ELECTRIFIED_PERMANENT)
|
||||
|
||||
/obj/machinery/door/airlock/proc/emergency_on(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if (!emergency)
|
||||
emergency = TRUE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "Emergency access is already enabled!")
|
||||
|
||||
/obj/machinery/door/airlock/proc/emergency_off(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if (emergency)
|
||||
emergency = FALSE
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "Emergency access is already disabled!")
|
||||
|
||||
/obj/machinery/door/airlock/proc/bolt_raise(mob/user)
|
||||
/obj/machinery/door/airlock/proc/toggle_bolt(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if(wires.is_cut(WIRE_BOLTS))
|
||||
to_chat(user, "The door bolt drop wire is cut - you can't raise the door bolts")
|
||||
else if(!src.locked)
|
||||
to_chat(user, "The door bolts are already up")
|
||||
else
|
||||
if(src.hasPower())
|
||||
unbolt()
|
||||
to_chat(user, "<span class='warning'>The door bolt drop wire is cut - you can't toggle the door bolts.</span>")
|
||||
return
|
||||
if(locked)
|
||||
if(!hasPower())
|
||||
to_chat(user, "<span class='warning'>The door has no power - you can't raise the door bolts.</span>")
|
||||
else
|
||||
to_chat(user, "Cannot raise door bolts due to power failure")
|
||||
|
||||
/obj/machinery/door/airlock/proc/bolt_drop(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
if(wires.is_cut(WIRE_BOLTS))
|
||||
to_chat(user, "You can't drop the door bolts - The door bolt dropping wire has been cut.")
|
||||
unbolt()
|
||||
else
|
||||
bolt()
|
||||
|
||||
/obj/machinery/door/airlock/proc/toggle_emergency(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
emergency = !emergency
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/user_toggle_open(mob/user)
|
||||
if(!user_allowed(user))
|
||||
return
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "airlock_electronics", name, 975, 420, master_ui, state)
|
||||
ui = new(user, src, ui_key, "airlock_electronics", name, 420, 485, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/electronics/airlock/ui_data()
|
||||
@@ -43,13 +43,16 @@
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("clear")
|
||||
if("clear_all")
|
||||
accesses = list()
|
||||
one_access = 0
|
||||
. = TRUE
|
||||
if("one_access")
|
||||
one_access = !one_access
|
||||
. = TRUE
|
||||
if("grant_all")
|
||||
accesses = get_all_accesses()
|
||||
. = TRUE
|
||||
if("set")
|
||||
var/access = text2num(params["access"])
|
||||
if (!(access in accesses))
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#define FONT_SIZE "5pt"
|
||||
#define FONT_COLOR "#09f"
|
||||
#define FONT_STYLE "Arial Black"
|
||||
#define MAX_TIMER 9000
|
||||
|
||||
#define PRESET_SHORT 1200
|
||||
#define PRESET_MEDIUM 1800
|
||||
#define PRESET_LONG 3000
|
||||
|
||||
#define MAX_TIMER 15 MINUTES
|
||||
|
||||
#define PRESET_SHORT 2 MINUTES
|
||||
#define PRESET_MEDIUM 3 MINUTES
|
||||
#define PRESET_LONG 5 MINUTES
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Brig Door control displays.
|
||||
@@ -25,7 +23,7 @@
|
||||
desc = "A remote control for a door."
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
density = FALSE
|
||||
var/id = null // id of linked machinery/lockers
|
||||
var/id // id of linked machinery/lockers
|
||||
|
||||
var/activation_time = 0
|
||||
var/timer_duration = 0
|
||||
@@ -43,8 +41,6 @@
|
||||
Radio = new/obj/item/radio(src)
|
||||
Radio.listening = 0
|
||||
|
||||
/obj/machinery/door_timer/Initialize()
|
||||
. = ..()
|
||||
if(id != null)
|
||||
for(var/obj/machinery/door/window/brigdoor/M in urange(20, src))
|
||||
if (M.id == id)
|
||||
@@ -71,7 +67,7 @@
|
||||
return
|
||||
|
||||
if(timing)
|
||||
if(world.realtime - activation_time >= timer_duration)
|
||||
if(REALTIMEOFDAY - activation_time >= timer_duration)
|
||||
timer_end() // open doors, reset timer, clear status screen
|
||||
update_icon()
|
||||
|
||||
@@ -80,14 +76,13 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
// open/closedoor checks if door_timer has power, if so it checks if the
|
||||
// linked door is open/closed (by density) then opens it/closes it.
|
||||
/obj/machinery/door_timer/proc/timer_start()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
|
||||
activation_time = world.realtime
|
||||
activation_time = REALTIMEOFDAY
|
||||
timing = TRUE
|
||||
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
@@ -104,7 +99,6 @@
|
||||
C.update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door_timer/proc/timer_end(forced = FALSE)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
@@ -136,7 +130,7 @@
|
||||
|
||||
|
||||
/obj/machinery/door_timer/proc/time_left(seconds = FALSE)
|
||||
. = max(0,timer_duration - (activation_time ? world.realtime - activation_time : 0))
|
||||
. = max(0,timer_duration - (activation_time ? REALTIMEOFDAY - activation_time : 0))
|
||||
if(seconds)
|
||||
. /= 10
|
||||
|
||||
@@ -149,7 +143,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "brig_timer", name, 300, 200, master_ui, state)
|
||||
ui = new(user, src, ui_key, "brig_timer", name, 300, 138, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
//icon update function
|
||||
@@ -168,7 +162,7 @@
|
||||
if(timing)
|
||||
var/disp1 = id
|
||||
var/time_left = time_left(seconds = TRUE)
|
||||
var/disp2 = "[add_zero(num2text((time_left / 60) % 60),2)]~[add_zero(num2text(time_left % 60), 2)]"
|
||||
var/disp2 = "[add_leading(num2text((time_left / 60) % 60), 2, "0")]:[add_leading(num2text(time_left % 60), 2, "0")]"
|
||||
if(length(disp2) > CHARS_PER_LINE)
|
||||
disp2 = "Error"
|
||||
update_display(disp1, disp2)
|
||||
@@ -240,7 +234,7 @@
|
||||
preset_time = PRESET_LONG
|
||||
. = set_timer(preset_time)
|
||||
if(timing)
|
||||
activation_time = world.realtime
|
||||
activation_time = REALTIMEOFDAY
|
||||
else
|
||||
. = FALSE
|
||||
|
||||
|
||||
@@ -288,9 +288,10 @@
|
||||
return
|
||||
|
||||
operating = TRUE
|
||||
|
||||
do_animate("closing")
|
||||
layer = closingLayer
|
||||
if(!safe)
|
||||
crush()
|
||||
sleep(5)
|
||||
density = TRUE
|
||||
sleep(5)
|
||||
@@ -302,8 +303,6 @@
|
||||
update_freelook_sight()
|
||||
if(safe)
|
||||
CheckForMobs()
|
||||
else
|
||||
crush()
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/CheckForMobs()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/obj/machinery/door/firedoor/proc/CalculateAffectingAreas()
|
||||
remove_from_areas()
|
||||
affecting_areas = get_adjacent_open_areas(src) | get_area(src)
|
||||
affecting_areas = get_adjacent_open_areas(src) | get_base_area(src)
|
||||
for(var/I in affecting_areas)
|
||||
var/area/A = I
|
||||
LAZYADD(A.firedoors, src)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
update_icon()
|
||||
myarea = get_area(src)
|
||||
myarea = get_base_area(src)
|
||||
LAZYADD(myarea.firealarms, src)
|
||||
|
||||
/obj/machinery/firealarm/Destroy()
|
||||
@@ -124,7 +124,7 @@
|
||||
if(!is_operational() || (last_alarm+FIREALARM_COOLDOWN > world.time))
|
||||
return
|
||||
last_alarm = world.time
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
A.firealert(src)
|
||||
playsound(loc, 'goon/sound/machinery/FireAlarm.ogg', 75)
|
||||
if(user)
|
||||
@@ -133,7 +133,7 @@
|
||||
/obj/machinery/firealarm/proc/reset(mob/user)
|
||||
if(!is_operational())
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
A.firereset(src)
|
||||
if(user)
|
||||
log_game("[user] reset a fire alarm at [COORD(src)]")
|
||||
@@ -142,7 +142,7 @@
|
||||
if(buildstage != 2)
|
||||
return ..()
|
||||
add_fingerprint(user)
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
if(A.fire)
|
||||
reset(user)
|
||||
else
|
||||
@@ -198,7 +198,7 @@
|
||||
return
|
||||
else if(W.force) //hit and turn it on
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
if(!A.fire)
|
||||
alarm()
|
||||
return
|
||||
@@ -322,7 +322,7 @@
|
||||
/obj/machinery/firealarm/partyalarm/reset()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
if (!A || !A.party)
|
||||
return
|
||||
A.party = FALSE
|
||||
@@ -331,7 +331,7 @@
|
||||
/obj/machinery/firealarm/partyalarm/alarm()
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_base_area(src)
|
||||
if (!A || A.party || A.name == "Space")
|
||||
return
|
||||
A.party = TRUE
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "gulag_item_reclaimer", name, 455, 440, master_ui, state)
|
||||
ui = new(user, src, ui_key, "gulag_item_reclaimer", name, 300, 400, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/gulag_item_reclaimer/ui_data(mob/user)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
say("Subject may not have abiotic items on.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
return
|
||||
if(!(MOB_ORGANIC in C.mob_biotypes))
|
||||
if(!(C.mob_biotypes & MOB_ORGANIC))
|
||||
say("Subject is not organic.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
return
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(beaker)
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
if(usr && Adjacent(usr) && usr.can_hold_items())
|
||||
if(!usr.put_in_hands(beaker))
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var/power_efficiency = 1
|
||||
var/x_offset = 0
|
||||
var/y_offset = 0
|
||||
var/indicator_icon = "launchpad_target"
|
||||
|
||||
/obj/machinery/launchpad/RefreshParts()
|
||||
var/E = 0
|
||||
@@ -34,17 +35,28 @@
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, I))
|
||||
return
|
||||
var/obj/item/multitool/M = I
|
||||
M.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/launchpad/attack_ghost(mob/dead/observer/ghost)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/target_x = x + x_offset
|
||||
var/target_y = y + y_offset
|
||||
var/turf/target = locate(target_x, target_y, z)
|
||||
ghost.forceMove(target)
|
||||
|
||||
/obj/machinery/launchpad/proc/isAvailable()
|
||||
if(stat & NOPOWER)
|
||||
return FALSE
|
||||
@@ -52,6 +64,14 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/launchpad/proc/set_offset(x, y)
|
||||
if(teleporting)
|
||||
return
|
||||
if(!isnull(x))
|
||||
x_offset = CLAMP(x, -range, range)
|
||||
if(!isnull(y))
|
||||
y_offset = CLAMP(y, -range, range)
|
||||
|
||||
/obj/machinery/launchpad/proc/doteleport(mob/user, sending)
|
||||
if(teleporting)
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad busy.</span>")
|
||||
@@ -69,12 +89,22 @@
|
||||
var/area/A = get_area(target)
|
||||
|
||||
flick(icon_teleport, src)
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, 1)
|
||||
|
||||
//Change the indicator's icon to show that we're teleporting
|
||||
if(sending)
|
||||
indicator_icon = "launchpad_launch"
|
||||
else
|
||||
indicator_icon = "launchpad_pull"
|
||||
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, TRUE)
|
||||
teleporting = TRUE
|
||||
|
||||
|
||||
sleep(teleport_speed)
|
||||
|
||||
//Set the indicator icon back to normal
|
||||
indicator_icon = "launchpad_target"
|
||||
|
||||
if(QDELETED(src) || !isAvailable())
|
||||
return
|
||||
|
||||
@@ -91,25 +121,25 @@
|
||||
source = dest
|
||||
dest = target
|
||||
|
||||
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, 1)
|
||||
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
|
||||
var/first = TRUE
|
||||
for(var/atom/movable/ROI in source)
|
||||
if(ROI == src)
|
||||
continue
|
||||
// if it's anchored, don't teleport
|
||||
if(!istype(ROI) || isdead(ROI) || iscameramob(ROI) || istype(ROI, /obj/effect/dummy/phased_mob))
|
||||
continue//don't teleport these
|
||||
var/on_chair = ""
|
||||
if(ROI.anchored)
|
||||
if(ROI.anchored)// if it's anchored, don't teleport
|
||||
if(isliving(ROI))
|
||||
var/mob/living/L = ROI
|
||||
if(L.buckled)
|
||||
// TP people on office chairs
|
||||
if(L.buckled.anchored)
|
||||
continue
|
||||
|
||||
on_chair = " (on a chair)"
|
||||
else
|
||||
continue
|
||||
else if(!isobserver(ROI))
|
||||
else
|
||||
continue
|
||||
if(!first)
|
||||
log_msg += ", "
|
||||
@@ -158,11 +188,11 @@
|
||||
var/obj/item/storage/briefcase/launchpad/briefcase
|
||||
|
||||
/obj/machinery/launchpad/briefcase/Initialize(mapload, briefcase)
|
||||
. = ..()
|
||||
if(!briefcase)
|
||||
log_game("[src] has been spawned without a briefcase.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
src.briefcase = briefcase
|
||||
. = ..()
|
||||
if(!briefcase)
|
||||
log_game("[src] has been spawned without a briefcase.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
src.briefcase = briefcase
|
||||
|
||||
/obj/machinery/launchpad/briefcase/Destroy()
|
||||
QDEL_NULL(briefcase)
|
||||
@@ -255,7 +285,7 @@
|
||||
/obj/item/launchpad_remote/ui_interact(mob/user, ui_key = "launchpad_remote", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "launchpad_remote", "Briefcase Launchpad Remote", 550, 400, master_ui, state) //width, height
|
||||
ui = new(user, src, ui_key, "launchpad_remote", "Briefcase Launchpad Remote", 300, 240, master_ui, state) //width, height
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
@@ -270,10 +300,9 @@
|
||||
return data
|
||||
|
||||
data["pad_name"] = pad.display_name
|
||||
data["abs_x"] = abs(pad.x_offset)
|
||||
data["abs_y"] = abs(pad.y_offset)
|
||||
data["north_south"] = pad.y_offset > 0 ? "N":"S"
|
||||
data["east_west"] = pad.x_offset > 0 ? "E":"W"
|
||||
data["range"] = pad.range
|
||||
data["x"] = pad.x_offset
|
||||
data["y"] = pad.y_offset
|
||||
return data
|
||||
|
||||
/obj/item/launchpad_remote/proc/teleport(mob/user, obj/machinery/launchpad/pad)
|
||||
@@ -289,76 +318,33 @@
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("right")
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
if("set_pos")
|
||||
var/new_x = text2num(params["x"])
|
||||
var/new_y = text2num(params["y"])
|
||||
pad.set_offset(new_x, new_y)
|
||||
. = TRUE
|
||||
|
||||
if("left")
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
if("move_pos")
|
||||
var/plus_x = text2num(params["x"])
|
||||
var/plus_y = text2num(params["y"])
|
||||
pad.set_offset(
|
||||
x = pad.x_offset + plus_x,
|
||||
y = pad.y_offset + plus_y
|
||||
)
|
||||
. = TRUE
|
||||
|
||||
if("up")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
. = TRUE
|
||||
|
||||
if("down")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
. = TRUE
|
||||
|
||||
if("up-right")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
. = TRUE
|
||||
|
||||
if("up-left")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
. = TRUE
|
||||
|
||||
if("down-right")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
. = TRUE
|
||||
|
||||
if("down-left")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
. = TRUE
|
||||
|
||||
if("reset")
|
||||
pad.y_offset = 0
|
||||
pad.x_offset = 0
|
||||
. = TRUE
|
||||
|
||||
if("rename")
|
||||
. = TRUE
|
||||
var/new_name = stripped_input(usr, "How do you want to rename the launchpad?", "Launchpad", pad.display_name, 15)
|
||||
var/new_name = params["name"]
|
||||
if(!new_name)
|
||||
return
|
||||
pad.display_name = new_name
|
||||
|
||||
if("remove")
|
||||
. = TRUE
|
||||
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
pad = null
|
||||
|
||||
if("launch")
|
||||
sending = TRUE
|
||||
teleport(usr, pad)
|
||||
. = TRUE
|
||||
|
||||
if("pull")
|
||||
sending = FALSE
|
||||
teleport(usr, pad)
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
if(speed <= 0)
|
||||
speed = 1
|
||||
if("setpath")
|
||||
var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newpath = stripped_input(usr, "Please define a new path!", "New Path", path, MAX_MESSAGE_LEN)
|
||||
if(newpath && newpath != "")
|
||||
moving = 0 // stop moving
|
||||
path = newpath
|
||||
@@ -368,13 +368,19 @@
|
||||
// Generates the rpath variable using the path string, think of this as "string2list"
|
||||
// Doesn't use params2list() because of the akward way it stacks entities
|
||||
rpath = list() // clear rpath
|
||||
var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
|
||||
var/maximum_characters = 50
|
||||
|
||||
for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
|
||||
var/lentext = length(path)
|
||||
var/nextchar = ""
|
||||
var/charcount = 0
|
||||
|
||||
var/nextchar = copytext(path, i, i+1) // find next character
|
||||
|
||||
if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
|
||||
rpath += copytext(path, i, i+1) // else, add to list
|
||||
for(var/i = 1, i <= lentext, i += length(nextchar)) // iterates through all characters in path
|
||||
nextchar = path[i] // find next character
|
||||
|
||||
if(nextchar in list(";", "&", "*", " ")) // if char is a separator, ignore
|
||||
continue
|
||||
rpath += nextchar // else, add to list
|
||||
// there doesn't HAVE to be separators but it makes paths syntatically visible
|
||||
charcount++
|
||||
if(charcount >= maximum_characters)
|
||||
break
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var/index = findtext(e, "=") // format is "key=value"
|
||||
if(index)
|
||||
var/key = copytext(e, 1, index)
|
||||
var/val = copytext(e, index+1)
|
||||
var/val = copytext(e, index + length(e[index]))
|
||||
codes[key] = val
|
||||
else
|
||||
codes[e] = "1"
|
||||
@@ -167,7 +167,7 @@ Transponder Codes:<UL>"}
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["locedit"])
|
||||
var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newloc = stripped_input(usr, "Enter New Location", "Navigation Beacon", location, MAX_MESSAGE_LEN)
|
||||
if(newloc)
|
||||
location = newloc
|
||||
updateDialog()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -348,6 +348,26 @@
|
||||
spark_system.start() //creates some sparks because they look cool
|
||||
qdel(cover) //deletes the cover - no need on keeping it there!
|
||||
|
||||
//turret healing
|
||||
/obj/machinery/porta_turret/examine(mob/user)
|
||||
. = ..()
|
||||
if(obj_integrity < max_integrity)
|
||||
. += "<span class='notice'>Use a welder to fix it.</span>"
|
||||
|
||||
/obj/machinery/porta_turret/welder_act(mob/living/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is welding the turret.", \
|
||||
"<span class='notice'>You begin repairing the turret...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
obj_integrity = max_integrity
|
||||
user.visible_message("[user.name] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing the turret.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The turret doesn't need repairing.</span>")
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/process()
|
||||
@@ -672,6 +692,7 @@
|
||||
lethal_projectile_sound = 'sound/weapons/laser.ogg'
|
||||
desc = "An energy blaster auto-turret."
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy/heavy
|
||||
icon_state = "standard_stun"
|
||||
base_icon_state = "standard"
|
||||
@@ -683,6 +704,11 @@
|
||||
lethal_projectile_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
desc = "An energy blaster auto-turret."
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy/pirate
|
||||
max_integrity = 260
|
||||
integrity_failure = 20
|
||||
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/setup()
|
||||
return
|
||||
@@ -839,7 +865,7 @@
|
||||
|
||||
/obj/machinery/turretid/examine(mob/user)
|
||||
. = ..()
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
if(hasSiliconAccessInArea(user) && (!stat & BROKEN))
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>"
|
||||
|
||||
@@ -854,7 +880,7 @@
|
||||
to_chat(user, "You link \the [M.buffer] with \the [src]")
|
||||
return
|
||||
|
||||
if (issilicon(user))
|
||||
if (hasSiliconAccessInArea(user))
|
||||
return attack_hand(user)
|
||||
|
||||
if ( get_dist(src, user) == 0 ) // trying to unlock the interface
|
||||
@@ -895,7 +921,7 @@
|
||||
/obj/machinery/turretid/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if ( get_dist(src, user) > 0 )
|
||||
if ( !(issilicon(user) || IsAdminGhost(user)) )
|
||||
if ( !(hasSiliconAccessInArea(user) || IsAdminGhost(user)) )
|
||||
to_chat(user, "<span class='notice'>You are too far away.</span>")
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
@@ -903,10 +929,10 @@
|
||||
|
||||
var/t = ""
|
||||
|
||||
if(locked && !(issilicon(user) || IsAdminGhost(user)))
|
||||
if(locked && !(hasSiliconAccessInArea(user) || IsAdminGhost(user)))
|
||||
t += "<div class='notice icon'>Swipe ID card to unlock interface</div>"
|
||||
else
|
||||
if(!issilicon(user) && !IsAdminGhost(user))
|
||||
if(!hasSiliconAccessInArea(user) && !IsAdminGhost(user))
|
||||
t += "<div class='notice icon'>Swipe ID card to lock interface</div>"
|
||||
t += "Turrets [enabled?"activated":"deactivated"] - <A href='?src=[REF(src)];toggleOn=1'>[enabled?"Disable":"Enable"]?</a><br>"
|
||||
t += "Currently set for [lethal?"lethal":"stun repeatedly"] - <A href='?src=[REF(src)];toggleLethal=1'>Change to [lethal?"Stun repeatedly":"Lethal"]?</a><br>"
|
||||
@@ -920,7 +946,7 @@
|
||||
if(..())
|
||||
return
|
||||
if (locked)
|
||||
if(!(issilicon(usr) || IsAdminGhost(usr)))
|
||||
if(!(hasSiliconAccessInArea(usr) || IsAdminGhost(usr)))
|
||||
to_chat(usr, "Control panel is locked!")
|
||||
return
|
||||
if (href_list["toggleOn"])
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/ammo_box/magazine/recharge,
|
||||
/obj/item/modular_computer,
|
||||
/obj/item/gun/ballistic/automatic/magrifle_e,
|
||||
/obj/item/gun/ballistic/automatic/pistol/mag_e))
|
||||
/obj/item/gun/ballistic/automatic/magrifle))
|
||||
|
||||
/obj/machinery/recharger/RefreshParts()
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
@@ -70,7 +69,7 @@
|
||||
|
||||
//Checks to make sure he's not in space doing it, and that the area got proper power.
|
||||
var/area/a = get_area(src)
|
||||
if(!isarea(a) || a.power_equip == 0)
|
||||
if(!a || !a.powered(EQUIP))
|
||||
to_chat(user, "<span class='notice'>[src] blinks red as you try to insert [G].</span>")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -263,10 +263,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(reject_bad_text(href_list["write"]))
|
||||
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
|
||||
|
||||
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
|
||||
if(href_list["write"])
|
||||
dpt = ckey(reject_bad_text(href_list["write"])) //write contains the string of the receiving department's name
|
||||
var/new_message = stripped_input(usr, "Write your message:", "Awaiting Input", "", MAX_MESSAGE_LEN)
|
||||
if(new_message)
|
||||
message = new_message
|
||||
screen = 9
|
||||
@@ -282,7 +281,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
priority = -1
|
||||
|
||||
if(href_list["writeAnnouncement"])
|
||||
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
|
||||
var/new_message = reject_bad_text(stripped_input(usr, "Write your message:", "Awaiting Input", "", MAX_MESSAGE_LEN))
|
||||
if(new_message)
|
||||
message = new_message
|
||||
if (text2num(href_list["priority"]) < 2)
|
||||
@@ -438,9 +437,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
return
|
||||
|
||||
/obj/machinery/requests_console/say_mod(input, message_mode)
|
||||
var/ending = copytext(input, length(input) - 2)
|
||||
if (ending == "!!!")
|
||||
. = "blares"
|
||||
if(spantext_char(input, "!", -3))
|
||||
return "blares"
|
||||
else
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(locked && !issilicon(user))
|
||||
if(locked && !hasSiliconAccessInArea(user))
|
||||
to_chat(user, "<span class='warning'>The machine is locked, you are unable to use it!</span>")
|
||||
return
|
||||
if(panel_open)
|
||||
@@ -370,7 +370,7 @@
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be firmly secured to the floor first!</span>")
|
||||
return
|
||||
if(locked && !issilicon(user))
|
||||
if(locked && !hasSiliconAccessInArea(user))
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return
|
||||
if(!power)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define SD_AI_EMOTE 1 // 1 = AI emoticon
|
||||
#define SD_AI_BSOD 2 // 2 = Blue screen of death
|
||||
|
||||
/// Status display which can show images and scrolling text.
|
||||
/// Status display which can show images and scrolling text. !!!USE /obj/machinery/status_display/evac NOT THIS!!!
|
||||
/obj/machinery/status_display
|
||||
name = "status display"
|
||||
desc = null
|
||||
@@ -55,14 +55,14 @@
|
||||
/// Call with no arguments to disable.
|
||||
/obj/machinery/status_display/proc/set_message(m1, m2)
|
||||
if(m1)
|
||||
index1 = (length(m1) > CHARS_PER_LINE)
|
||||
index1 = (length_char(m1) > CHARS_PER_LINE)
|
||||
message1 = m1
|
||||
else
|
||||
message1 = ""
|
||||
index1 = 0
|
||||
|
||||
if(m2)
|
||||
index2 = (length(m2) > CHARS_PER_LINE)
|
||||
index2 = (length_char(m2) > CHARS_PER_LINE)
|
||||
message2 = m2
|
||||
else
|
||||
message2 = ""
|
||||
@@ -77,19 +77,19 @@
|
||||
|
||||
var/line1 = message1
|
||||
if(index1)
|
||||
line1 = copytext("[message1]|[message1]", index1, index1+CHARS_PER_LINE)
|
||||
var/message1_len = length(message1)
|
||||
line1 = copytext_char("[message1]|[message1]", index1, index1+CHARS_PER_LINE)
|
||||
var/message1_len = length_char(message1)
|
||||
index1 += SCROLL_SPEED
|
||||
if(index1 > message1_len)
|
||||
index1 -= message1_len
|
||||
if(index1 > message1_len + 1)
|
||||
index1 -= (message1_len + 1)
|
||||
|
||||
var/line2 = message2
|
||||
if(index2)
|
||||
line2 = copytext("[message2]|[message2]", index2, index2+CHARS_PER_LINE)
|
||||
line2 = copytext_char("[message2]|[message2]", index2, index2+CHARS_PER_LINE)
|
||||
var/message2_len = length(message2)
|
||||
index2 += SCROLL_SPEED
|
||||
if(index2 > message2_len)
|
||||
index2 -= message2_len
|
||||
if(index2 > message2_len + 1)
|
||||
index2 -= (message2_len + 1)
|
||||
|
||||
update_display(line1, line2)
|
||||
if (!index1 && !index2)
|
||||
@@ -130,7 +130,7 @@
|
||||
var/line1 = "-[shuttle.getModeStr()]-"
|
||||
var/line2 = shuttle.getTimerStr()
|
||||
|
||||
if(length(line2) > CHARS_PER_LINE)
|
||||
if(length_char(line2) > CHARS_PER_LINE)
|
||||
line2 = "error"
|
||||
update_display(line1, line2)
|
||||
else
|
||||
@@ -242,7 +242,7 @@
|
||||
else
|
||||
line1 = "CARGO"
|
||||
line2 = SSshuttle.supply.getTimerStr()
|
||||
if(length(line2) > CHARS_PER_LINE)
|
||||
if(length_char(line2) > CHARS_PER_LINE)
|
||||
line2 = "Error"
|
||||
update_display(line1, line2)
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
for(var/atom/movable/AM in things_to_clear) //Scorches away blood and forensic evidence, although the SSU itself is unaffected
|
||||
SEND_SIGNAL(AM, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG)
|
||||
AM.clean_blood()
|
||||
AM.fingerprints = list()
|
||||
AM.fingerprints = null
|
||||
var/datum/component/radioactive/contamination = AM.GetComponent(/datum/component/radioactive)
|
||||
if(contamination)
|
||||
qdel(contamination)
|
||||
@@ -390,14 +390,24 @@
|
||||
data["uv_super"] = uv_super
|
||||
if(helmet)
|
||||
data["helmet"] = helmet.name
|
||||
else
|
||||
data["helmet"] = null
|
||||
if(suit)
|
||||
data["suit"] = suit.name
|
||||
else
|
||||
data["suit"] = null
|
||||
if(mask)
|
||||
data["mask"] = mask.name
|
||||
else
|
||||
data["mask"] = null
|
||||
if(storage)
|
||||
data["storage"] = storage.name
|
||||
else
|
||||
data["storage"] = null
|
||||
if(occupant)
|
||||
data["occupied"] = 1
|
||||
data["occupied"] = TRUE
|
||||
else
|
||||
data["occupied"] = FALSE
|
||||
return data
|
||||
|
||||
/obj/machinery/suit_storage_unit/ui_act(action, params)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
try_detonate(TRUE)
|
||||
//Counter terrorists win
|
||||
else if(!active || defused)
|
||||
if(defused && payload in src)
|
||||
if(defused && (payload in src))
|
||||
payload.defuse()
|
||||
countdown.stop()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
set waitfor = FALSE
|
||||
|
||||
// Perform final composition steps on the message.
|
||||
var/message = copytext(data["message"], 1, MAX_BROADCAST_LEN)
|
||||
var/message = copytext_char(data["message"], 1, MAX_BROADCAST_LEN)
|
||||
if(!message)
|
||||
return
|
||||
var/compression = data["compression"]
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
|
||||
|
||||
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
|
||||
if(newnet && ((usr in range(1, src)) || hasSiliconAccessInArea(usr)))
|
||||
if(length(newnet) > 15)
|
||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr))
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr))
|
||||
//Authenticate
|
||||
if (href_list["auth"])
|
||||
if(LINKED_SERVER_NONRESPONSIVE)
|
||||
@@ -421,7 +421,7 @@
|
||||
"name" = "[customsender]",
|
||||
"job" = "[customjob]",
|
||||
"message" = custommessage,
|
||||
"emoji_message" = emoji_parse(custommessage),
|
||||
"emojis" = TRUE,
|
||||
"targets" = list("[customrecepient.owner] ([customrecepient.ownjob])")
|
||||
))
|
||||
// this will log the signal and transmit it to the target
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
if(href_list["network"])
|
||||
|
||||
var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network)
|
||||
if(newnet && ((usr in range(1, src)) || issilicon(usr)))
|
||||
if(newnet && ((usr in range(1, src)) || hasSiliconAccessInArea(usr)))
|
||||
if(length(newnet) > 15)
|
||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/machinery/telecomms/ui_interact(mob/user)
|
||||
. = ..()
|
||||
// You need a multitool to use this, or be silicon
|
||||
if(!issilicon(user))
|
||||
if(!hasSiliconAccessInArea(user))
|
||||
// istype returns false if the value is null
|
||||
if(!istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
return
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
var/obj/item/multitool/P = null
|
||||
// Let's double check
|
||||
if(!issilicon(user) && istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
if(!hasSiliconAccessInArea(user) && istype(user.get_active_held_item(), /obj/item/multitool))
|
||||
P = user.get_active_held_item()
|
||||
else if(isAI(user))
|
||||
var/mob/living/silicon/ai/U = user
|
||||
@@ -162,7 +162,7 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(!issilicon(usr))
|
||||
if(!hasSiliconAccessInArea(usr))
|
||||
if(!istype(usr.get_active_held_item(), /obj/item/multitool))
|
||||
return
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
|
||||
if("id")
|
||||
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
|
||||
var/newid = reject_bad_text(stripped_input(usr, "Specify the new ID for this machine", src, id, MAX_MESSAGE_LEN))
|
||||
if(newid && canAccess(usr))
|
||||
id = newid
|
||||
temp = "<font color = #666633>-% New ID assigned: \"[id]\" %-</font color>"
|
||||
@@ -270,6 +270,6 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/telecomms/proc/canAccess(mob/user)
|
||||
if(issilicon(user) || in_range(user, src))
|
||||
if(hasSiliconAccessInArea(user) || in_range(user, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -106,11 +106,10 @@
|
||||
return "Everyone"
|
||||
return data["targets"][1]
|
||||
|
||||
/datum/signal/subspace/pda/proc/format_message(emojify = FALSE)
|
||||
var/message = emojify ? data["emoji_message"] : data["message"]
|
||||
/datum/signal/subspace/pda/proc/format_message()
|
||||
if (logged && data["photo"])
|
||||
return "\"[message]\" (<a href='byond://?src=[REF(logged)];photo=1'>Photo</a>)"
|
||||
return "\"[message]\""
|
||||
return "\"[data["message"]]\" (<a href='byond://?src=[REF(logged)];photo=1'>Photo</a>)"
|
||||
return "\"[data["message"]]\""
|
||||
|
||||
/datum/signal/subspace/pda/broadcast()
|
||||
if (!logged) // Can only go through if a message server logs it
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
for(var/obj/machinery/telecomms/hub/H in links)
|
||||
for(var/obj/machinery/telecomms/relay/R in H.links)
|
||||
if(R.can_receive(signal) && R.z in signal.levels)
|
||||
if(R.can_receive(signal) && (R.z in signal.levels))
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/machinery/transformer/examine(mob/user)
|
||||
. = ..()
|
||||
if(cooldown && (issilicon(user) || isobserver(user)))
|
||||
if(cooldown && (hasSiliconAccessInArea(user) || isobserver(user)))
|
||||
. += "It will be ready in [DisplayTimeText(cooldown_timer - world.time)]."
|
||||
|
||||
/obj/machinery/transformer/Destroy()
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
internal_damage_threshold = 50
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 15, "energy" = 20, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
|
||||
var/spawn_tracked = TRUE
|
||||
|
||||
/obj/mecha/combat/Initialize()
|
||||
. = ..()
|
||||
if(spawn_tracked)
|
||||
trackers += new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
/obj/mecha/combat/proc/max_ammo() //Max the ammo stored for Nuke Ops mechs, or anyone else that calls this
|
||||
for(var/obj/item/I in equipment)
|
||||
if(istype(I, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/))
|
||||
var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun = I
|
||||
gun.projectiles_cache = gun.projectiles_cache_max
|
||||
@@ -30,7 +30,6 @@
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax/dark
|
||||
max_equip = 4
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/gygax/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
@@ -42,6 +41,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
|
||||
if(C)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
force = 45
|
||||
max_equip = 4
|
||||
bumpsmash = 1
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
@@ -41,6 +40,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
@@ -68,6 +68,7 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
@@ -90,5 +91,6 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
max_ammo()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
internals_req_access = list()
|
||||
add_req_access = 0
|
||||
wreckage = /obj/structure/mecha_wreckage/durand/neovgre
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/neovgre/GrantActions(mob/living/user, human_occupant = 0) //No Eject action for you sonny jim, your life for Ratvar!
|
||||
internals_action.Grant(user, src)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
stepsound = null
|
||||
turnsound = null
|
||||
opacity = 0
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/reticence/loaded/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure", color="red")
|
||||
mecha_log_message("Critical failure", color="red")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis)
|
||||
@@ -116,7 +116,7 @@
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
forceMove(M)
|
||||
M.log_message("[src] initialized.")
|
||||
M.mecha_log_message("[src] initialized.")
|
||||
if(!M.selected && selectable)
|
||||
M.selected = src
|
||||
src.update_chassis_page()
|
||||
@@ -129,7 +129,7 @@
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
update_chassis_page()
|
||||
chassis.log_message("[src] removed from equipment.")
|
||||
chassis.mecha_log_message("[src] removed from equipment.")
|
||||
chassis = null
|
||||
set_ready_state(1)
|
||||
return
|
||||
@@ -150,18 +150,14 @@
|
||||
chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/log_message(message, message_type=LOG_GAME, color=null, log_globally)
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/mecha_log_message(message, color)
|
||||
log_message(message, LOG_GAME, color) //pass to default admin logging too
|
||||
if(chassis)
|
||||
chassis.log_message("([src]) [message]", message_type, color)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
chassis.mecha_log_message(message, color) //and pass to our chassis
|
||||
|
||||
//Used for reloading weapons/tools etc. that use some form of resource
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
|
||||
return 0
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
update_equip_info()
|
||||
occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>")
|
||||
chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>")
|
||||
log_message("[target] loaded. Life support functions engaged.")
|
||||
mecha_log_message("[target] loaded. Life support functions engaged.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
|
||||
if(target.buckled)
|
||||
@@ -85,7 +85,7 @@
|
||||
return
|
||||
patient.forceMove(get_turf(src))
|
||||
occupant_message("[patient] ejected. Life support functions disabled.")
|
||||
log_message("[patient] ejected. Life support functions disabled.")
|
||||
mecha_log_message("[patient] ejected. Life support functions disabled.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
patient = null
|
||||
update_equip_info()
|
||||
@@ -108,16 +108,17 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(afilter.get("eject"))
|
||||
if(href_list["eject"])
|
||||
go_out()
|
||||
if(afilter.get("view_stats"))
|
||||
if(href_list["view_stats"])
|
||||
chassis.occupant << browse(get_patient_stats(),"window=msleeper")
|
||||
onclose(chassis.occupant, "msleeper")
|
||||
return
|
||||
if(afilter.get("inject"))
|
||||
inject_reagent(afilter.getType("inject", /datum/reagent),afilter.getObj("source"))
|
||||
return
|
||||
if(href_list["inject"])
|
||||
var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG = locate() in chassis
|
||||
var/datum/reagent/R = locate(href_list["inject"]) in SG.reagents.reagent_list
|
||||
if (istype(R))
|
||||
inject_reagent(R, SG)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_stats()
|
||||
if(!patient)
|
||||
@@ -193,7 +194,7 @@
|
||||
var/to_inject = min(R.volume, inject_amount)
|
||||
if(to_inject && patient.reagents.get_reagent_amount(R.type) + to_inject <= inject_amount*2)
|
||||
occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
log_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
mecha_log_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
log_combat(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
|
||||
SG.reagents.trans_id_to(patient,R.type,to_inject)
|
||||
update_equip_info()
|
||||
@@ -216,7 +217,7 @@
|
||||
return
|
||||
if(!chassis.has_charge(energy_drain))
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
occupant_message("[src] deactivated - no power.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -312,7 +313,7 @@
|
||||
mechsyringe.icon = 'icons/obj/chemical.dmi'
|
||||
mechsyringe.icon_state = "syringeproj"
|
||||
playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
|
||||
log_message("Launched [mechsyringe] from [src], targeting [target].")
|
||||
mecha_log_message("Launched [mechsyringe] from [src], targeting [target].")
|
||||
var/mob/originaloccupant = chassis.occupant
|
||||
spawn(0)
|
||||
src = null //if src is deleted, still process the syringe
|
||||
@@ -354,19 +355,18 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/afilter = new (href,href_list)
|
||||
if(afilter.get("toggle_mode"))
|
||||
if (href_list["toggle_mode"])
|
||||
mode = !mode
|
||||
update_equip_info()
|
||||
return
|
||||
if(afilter.get("select_reagents"))
|
||||
if (href_list["select_reagents"])
|
||||
processed_reagents.len = 0
|
||||
var/m = 0
|
||||
var/message
|
||||
for(var/i=1 to known_reagents.len)
|
||||
if(m>=synth_speed)
|
||||
break
|
||||
var/reagent = afilter.get("reagent_[i]")
|
||||
var/reagent = text2path(href_list["reagent_[i]"])
|
||||
if(reagent && (reagent in known_reagents))
|
||||
message = "[m ? ", " : null][known_reagents[reagent]]"
|
||||
processed_reagents += reagent
|
||||
@@ -375,20 +375,18 @@
|
||||
message += " added to production"
|
||||
START_PROCESSING(SSobj, src)
|
||||
occupant_message(message)
|
||||
occupant_message("Reagent processing started.")
|
||||
log_message("Reagent processing started.")
|
||||
occupant_message("<span class='notice'>Reagent processing started.</span>")
|
||||
mecha_log_message("Reagent processing started.")
|
||||
return
|
||||
if(afilter.get("show_reagents"))
|
||||
if (href_list["show_reagents"])
|
||||
chassis.occupant << browse(get_reagents_page(),"window=msyringegun")
|
||||
if(afilter.get("purge_reagent"))
|
||||
var/reagent = afilter.get("purge_reagent")
|
||||
if (href_list["purge_reagent"])
|
||||
var/reagent = href_list["purge_reagent"]
|
||||
if(reagent)
|
||||
reagents.del_reagent(reagent)
|
||||
return
|
||||
if(afilter.get("purge_all"))
|
||||
if (href_list["purge_all"])
|
||||
reagents.clear_reagents()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_page()
|
||||
var/output = {"<html>
|
||||
@@ -511,7 +509,7 @@
|
||||
return
|
||||
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
|
||||
occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
|
||||
log_message("Reagent processing stopped.")
|
||||
mecha_log_message("Reagent processing stopped.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/amount = synth_speed / processed_reagents.len
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
if(do_after_cooldown(target))
|
||||
set_ready_state(FALSE)
|
||||
log_message("Started drilling [target]")
|
||||
mecha_log_message("Started drilling [target]")
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
T.drill_act(src)
|
||||
@@ -61,13 +61,13 @@
|
||||
|
||||
/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(drill.do_after_mecha(src, 60 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
|
||||
/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(drill.drill_level >= DRILL_HARDENED)
|
||||
if(drill.do_after_mecha(src, 120 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
else
|
||||
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")
|
||||
@@ -76,14 +76,14 @@
|
||||
for(var/turf/closed/mineral/M in range(drill.chassis,1))
|
||||
if(get_dir(drill.chassis,M)&drill.chassis.dir)
|
||||
M.gets_drilled()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
/turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
for(var/turf/open/floor/plating/asteroid/M in range(1, drill.chassis))
|
||||
if((get_dir(drill.chassis,M)&drill.chassis.dir) && !M.dug)
|
||||
M.getDug()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.mecha_log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
|
||||
|
||||
@@ -216,12 +216,12 @@
|
||||
if(equip_ready)
|
||||
START_PROCESSING(SSobj, src)
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
set_ready_state(0)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid")
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
set_ready_state(1)
|
||||
chassis.add_overlay(droid_overlay)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
@@ -283,7 +283,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
|
||||
if(equip_ready) //disabled
|
||||
return
|
||||
var/area/A = get_area(chassis)
|
||||
var/area/A = get_base_area(chassis)
|
||||
var/pow_chan = get_power_channel(A)
|
||||
if(pow_chan)
|
||||
return 1000 //making magic
|
||||
@@ -304,11 +304,11 @@
|
||||
if(equip_ready) //inactive
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_ready_state(0)
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
|
||||
if(!chassis)
|
||||
@@ -328,7 +328,7 @@
|
||||
occupant_message("No powercell detected.")
|
||||
return
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
var/area/A = get_area(chassis)
|
||||
var/area/A = get_base_area(chassis)
|
||||
if(A)
|
||||
var/pow_chan
|
||||
for(var/c in list(EQUIP,ENVIRON,LIGHT))
|
||||
@@ -379,11 +379,11 @@
|
||||
if(equip_ready) //inactive
|
||||
set_ready_state(0)
|
||||
START_PROCESSING(SSobj, src)
|
||||
log_message("Activated.")
|
||||
mecha_log_message("Activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
@@ -440,14 +440,14 @@
|
||||
return
|
||||
if(fuel.amount<=0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
log_message("Deactivated - no fuel.")
|
||||
mecha_log_message("Deactivated - no fuel.")
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge))
|
||||
set_ready_state(1)
|
||||
occupant_message("No powercell detected.")
|
||||
log_message("Deactivated.")
|
||||
mecha_log_message("Deactivated.")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/use_fuel = fuel_per_cycle_idle
|
||||
|
||||
@@ -34,6 +34,19 @@
|
||||
return
|
||||
if(!cargo_holder)
|
||||
return
|
||||
if(ismecha(target))
|
||||
var/obj/mecha/M = target
|
||||
var/have_ammo
|
||||
for(var/obj/item/mecha_ammo/box in cargo_holder.cargo)
|
||||
if(istype(box, /obj/item/mecha_ammo) && box.rounds)
|
||||
have_ammo = TRUE
|
||||
if(M.ammo_resupply(box, chassis.occupant, TRUE))
|
||||
return
|
||||
if(have_ammo)
|
||||
to_chat(chassis.occupant, "No further supplies can be provided to [M].")
|
||||
else
|
||||
to_chat(chassis.occupant, "No providable supplies found in cargo hold")
|
||||
return
|
||||
if(isobj(target))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
@@ -45,7 +58,7 @@
|
||||
O.forceMove(chassis)
|
||||
O.anchored = FALSE
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
@@ -105,7 +118,7 @@
|
||||
O.forceMove(chassis)
|
||||
O.anchored = FALSE
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
@@ -388,7 +401,7 @@
|
||||
if(href_list["toggle"])
|
||||
set_ready_state(!equip_ready)
|
||||
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
|
||||
log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||
mecha_log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||
return
|
||||
if(href_list["cut"])
|
||||
if(cable && cable.amount)
|
||||
@@ -411,7 +424,7 @@
|
||||
if(!cable || cable.amount<1)
|
||||
set_ready_state(1)
|
||||
occupant_message("Cable depleted, [src] deactivated.")
|
||||
log_message("Cable depleted, [src] deactivated.")
|
||||
mecha_log_message("Cable depleted, [src] deactivated.")
|
||||
return
|
||||
if(cable.amount < amount)
|
||||
occupant_message("No enough cable to finish the task.")
|
||||
|
||||
94
code/game/mecha/equipment/weapons/mecha_ammo.dm
Normal file
94
code/game/mecha/equipment/weapons/mecha_ammo.dm
Normal file
@@ -0,0 +1,94 @@
|
||||
/obj/item/mecha_ammo
|
||||
name = "generic ammo box"
|
||||
desc = "A box of ammo for an unknown weapon."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon = 'icons/mecha/mecha_ammo.dmi'
|
||||
icon_state = "empty"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
var/rounds = 0
|
||||
var/round_term = "round"
|
||||
var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage.
|
||||
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
|
||||
var/ammo_type
|
||||
|
||||
/obj/item/mecha_ammo/proc/update_name()
|
||||
if(!rounds)
|
||||
name = "empty ammo box"
|
||||
desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
|
||||
icon_state = "empty"
|
||||
|
||||
/obj/item/mecha_ammo/attack_self(mob/user)
|
||||
..()
|
||||
if(rounds)
|
||||
to_chat(user, "<span class='warning'>You cannot flatten the ammo box until it's empty!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
|
||||
var/I = new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(I)
|
||||
|
||||
/obj/item/mecha_ammo/examine(mob/user)
|
||||
. = ..()
|
||||
if(rounds)
|
||||
. += "There [rounds > 1?"are":"is"] [rounds] [round_term][rounds > 1?"s":""] left."
|
||||
|
||||
/obj/item/mecha_ammo/incendiary
|
||||
name = "incendiary ammo"
|
||||
desc = "A box of incendiary ammunition for use with exosuit weapons."
|
||||
icon_state = "incendiary"
|
||||
rounds = 24
|
||||
ammo_type = "incendiary"
|
||||
|
||||
/obj/item/mecha_ammo/scattershot
|
||||
name = "scattershot ammo"
|
||||
desc = "A box of scaled-up buckshot, for use in exosuit shotguns."
|
||||
icon_state = "scattershot"
|
||||
rounds = 40
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_ammo/lmg
|
||||
name = "machine gun ammo"
|
||||
desc = "A box of linked ammunition, designed for the Ultra AC 2 exosuit weapon."
|
||||
icon_state = "lmg"
|
||||
rounds = 300
|
||||
ammo_type = "lmg"
|
||||
|
||||
/obj/item/mecha_ammo/missiles_br
|
||||
name = "breaching missiles"
|
||||
desc = "A box of large missiles, ready for loading into a BRM-6 exosuit missile rack."
|
||||
icon_state = "missile_br"
|
||||
rounds = 6
|
||||
round_term = "missile"
|
||||
direct_load = TRUE
|
||||
load_audio = "sound/weapons/bulletinsert.ogg"
|
||||
ammo_type = "missiles_br"
|
||||
|
||||
/obj/item/mecha_ammo/missiles_he
|
||||
name = "anti-armor missiles"
|
||||
desc = "A box of large missiles, ready for loading into an SRM-8 exosuit missile rack."
|
||||
icon_state = "missile_he"
|
||||
rounds = 8
|
||||
round_term = "missile"
|
||||
direct_load = TRUE
|
||||
load_audio = "sound/weapons/bulletinsert.ogg"
|
||||
ammo_type = "missiles_he"
|
||||
|
||||
|
||||
/obj/item/mecha_ammo/flashbang
|
||||
name = "launchable flashbangs"
|
||||
desc = "A box of smooth flashbangs, for use with a large exosuit launcher. Cannot be primed by hand."
|
||||
icon_state = "flashbang"
|
||||
rounds = 6
|
||||
round_term = "grenade"
|
||||
ammo_type = "flashbang"
|
||||
|
||||
/obj/item/mecha_ammo/clusterbang
|
||||
name = "launchable flashbang clusters"
|
||||
desc = "A box of clustered flashbangs, for use with a specialized exosuit cluster launcher. Cannot be primed by hand."
|
||||
icon_state = "clusterbang"
|
||||
rounds = 3
|
||||
round_term = "cluster"
|
||||
direct_load = TRUE
|
||||
ammo_type = "clusterbang"
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
if(kickback)
|
||||
chassis.newtonian_move(turn(chassis.dir,180))
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
chassis.mecha_log_message("Fired from [src.name], targeting [target].")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
else
|
||||
M.Jitter(500)
|
||||
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
mecha_log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
|
||||
@@ -196,7 +196,11 @@
|
||||
name = "general ballistic weapon"
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
var/projectiles
|
||||
var/projectiles_cache //ammo to be loaded in, if possible.
|
||||
var/projectiles_cache_max
|
||||
var/projectile_energy_cost
|
||||
var/disabledreload //For weapons with no cache (like the rockets) which are reloaded by hand
|
||||
var/ammo_type
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
|
||||
return min(projectiles, projectiles_per_shot)
|
||||
@@ -209,19 +213,31 @@
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
return "[..()] \[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
return "[..()] \[[src.projectiles][projectiles_cache_max &&!projectile_energy_cost?"/[projectiles_cache]":""]\][!disabledreload &&(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
log_message("Rearmed [src.name].")
|
||||
return 1
|
||||
|
||||
if(projectile_energy_cost)
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
|
||||
else
|
||||
if(!projectiles_cache)
|
||||
return FALSE
|
||||
if(projectiles_to_add <= projectiles_cache)
|
||||
projectiles = projectiles + projectiles_to_add
|
||||
projectiles_cache = projectiles_cache - projectiles_to_add
|
||||
else
|
||||
projectiles = projectiles + projectiles_cache
|
||||
projectiles_cache = 0
|
||||
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/needs_rearm()
|
||||
@@ -249,8 +265,10 @@
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
projectiles_cache = 24
|
||||
projectiles_cache_max = 96
|
||||
harmful = TRUE
|
||||
ammo_type = "incendiary"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
@@ -270,10 +288,12 @@
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/scattershot
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
projectiles_cache = 40
|
||||
projectiles_cache_max = 160
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
|
||||
name = "\improper Melon Seed \"Scattershot\""
|
||||
@@ -282,10 +302,12 @@
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/seed
|
||||
projectiles = 20
|
||||
projectile_energy_cost = 25
|
||||
projectiles_cache = 20
|
||||
projectiles_cache_max = 160
|
||||
projectiles_per_shot = 10
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
ammo_type = "scattershot"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "\improper Ultra AC 2"
|
||||
@@ -294,23 +316,42 @@
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/lmg
|
||||
projectiles = 300
|
||||
projectile_energy_cost = 20
|
||||
projectiles_cache = 300
|
||||
projectiles_cache_max = 1200
|
||||
projectiles_per_shot = 3
|
||||
variance = 6
|
||||
randomspread = 1
|
||||
projectile_delay = 2
|
||||
harmful = TRUE
|
||||
ammo_type = "lmg"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
|
||||
desc = "A weapon for combat exosuits. Launches light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_he
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
ammo_type = "missiles_he"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching
|
||||
name = "\improper BRM-6 missile rack"
|
||||
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
|
||||
icon_state = "mecha_missilerack_six"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_br
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
ammo_type = "missiles_br"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
@@ -323,7 +364,7 @@
|
||||
return
|
||||
var/obj/O = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
mecha_log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
|
||||
@@ -341,10 +382,12 @@
|
||||
projectile = /obj/item/grenade/flashbang
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
projectiles_cache = 6
|
||||
projectiles_cache_max = 24
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 800
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
ammo_type = "flashbang"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/grenade/flashbang/F)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -356,9 +399,12 @@
|
||||
name = "\improper SOB-3 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
|
||||
projectiles = 3
|
||||
projectiles_cache = 0
|
||||
projectiles_cache_max = 0
|
||||
disabledreload = TRUE
|
||||
projectile = /obj/item/grenade/clusterbuster
|
||||
projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher.
|
||||
equip_cooldown = 90
|
||||
ammo_type = "clusterbang"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
name = "banana mortar"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mech_bay_power_console", "Mech Bay Power Control Console", 400, 170, master_ui, state)
|
||||
ui = new(user, src, ui_key, "mech_bay_power_console", "Mech Bay Power Control Console", 400, 200, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/ui_act(action, params)
|
||||
@@ -101,7 +101,7 @@
|
||||
if(recharge_port && !QDELETED(recharge_port))
|
||||
data["recharge_port"] = list("mech" = null)
|
||||
if(recharge_port.recharging_mech && !QDELETED(recharge_port.recharging_mech))
|
||||
data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "maxhealth" = recharge_port.recharging_mech.max_integrity, "cell" = null)
|
||||
data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "maxhealth" = recharge_port.recharging_mech.max_integrity, "cell" = null, "name" = recharge_port.recharging_mech.name,)
|
||||
if(recharge_port.recharging_mech.cell && !QDELETED(recharge_port.recharging_mech.cell))
|
||||
data["recharge_port"]["mech"]["cell"] = list(
|
||||
"critfail" = recharge_port.recharging_mech.cell.crit_fail,
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"H.O.N.K",
|
||||
"Phazon",
|
||||
"Exosuit Equipment",
|
||||
"Exosuit Ammunition",
|
||||
"Cyborg Upgrade Modules",
|
||||
"Misc"
|
||||
)
|
||||
@@ -317,9 +318,8 @@
|
||||
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = afilter.getStr("part_set")
|
||||
var/tpart_set = href_list["part_set"]
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
@@ -327,7 +327,7 @@
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = afilter.getStr("part")
|
||||
var/T = href_list["part"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
@@ -338,7 +338,7 @@
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = afilter.getStr("add_to_queue")
|
||||
var/T = href_list["add_to_queue"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
@@ -347,10 +347,10 @@
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(afilter.getNum("remove_from_queue"))
|
||||
remove_from_queue(text2num(href_list["remove_from_queue"]))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(afilter.get("partset_to_queue"))
|
||||
add_part_set_to_queue(href_list["partset_to_queue"])
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(0)
|
||||
@@ -364,8 +364,8 @@
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = afilter.getNum("index")
|
||||
var/new_index = index + afilter.getNum("queue_move")
|
||||
var/index = text2num(href_list["index"])
|
||||
var/new_index = index + text2num(href_list["queue_move"])
|
||||
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
|
||||
if(ISINRANGE(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
@@ -376,7 +376,7 @@
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = afilter.getStr("part_desc")
|
||||
var/T = href_list["part_desc"]
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
@@ -416,7 +416,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
|
||||
return copytext(ID,2)
|
||||
return copytext_char(ID,2)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
|
||||
if(panel_open)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
add_cell()
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
log_message("[src.name] created.")
|
||||
mecha_log_message("[src.name] created.")
|
||||
GLOB.mechas_list += src //global mech list
|
||||
prepare_huds()
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
@@ -493,7 +493,7 @@
|
||||
events.fireEvent("onMove",get_turf(src))
|
||||
if (internal_tank.disconnect()) // Something moved us and broke connection
|
||||
occupant_message("<span class='warning'>Air port connection teared off!</span>")
|
||||
log_message("Lost connection to gas port.")
|
||||
mecha_log_message("Lost connection to gas port.")
|
||||
|
||||
/obj/mecha/Process_Spacemove(var/movement_dir = 0)
|
||||
. = ..()
|
||||
@@ -822,7 +822,7 @@
|
||||
return
|
||||
if(!ishuman(user)) // no silicons or drones in mechas.
|
||||
return
|
||||
log_message("[user] tries to move in.")
|
||||
mecha_log_message("[user] tries to move in.")
|
||||
if (occupant)
|
||||
to_chat(usr, "<span class='warning'>The [name] is already occupied!</span>")
|
||||
log_append_to_last("Permission denied.")
|
||||
@@ -867,7 +867,7 @@
|
||||
return
|
||||
|
||||
/obj/mecha/proc/moved_inside(mob/living/carbon/human/H)
|
||||
if(H && H.client && H in range(1))
|
||||
if(H?.client && (H in range(1)))
|
||||
occupant = H
|
||||
H.forceMove(src)
|
||||
H.update_mouse_pointer()
|
||||
@@ -932,7 +932,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
setDir(dir_in)
|
||||
log_message("[mmi_as_oc] moved in as pilot.")
|
||||
mecha_log_message("[mmi_as_oc] moved in as pilot.")
|
||||
if(!internal_damage)
|
||||
SEND_SOUND(occupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
GrantActions(brainmob)
|
||||
@@ -983,7 +983,7 @@
|
||||
var/mob/living/L = occupant
|
||||
occupant = null //we need it null when forceMove calls Exited().
|
||||
if(mob_container.forceMove(newloc))//ejecting mob container
|
||||
log_message("[mob_container] moved out.")
|
||||
mecha_log_message("[mob_container] moved out.")
|
||||
L << browse(null, "window=exosuit")
|
||||
|
||||
if(istype(mob_container, /obj/item/mmi))
|
||||
@@ -1028,10 +1028,10 @@
|
||||
to_chat(occupant, "[icon2html(src, occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/mecha/log_message(message as text, message_type=LOG_GAME, color=null, log_globally)
|
||||
/obj/mecha/proc/mecha_log_message(message, color)
|
||||
log.len++
|
||||
log[log.len] = list("time"="[STATION_TIME_TIMESTAMP("hh:mm:ss")]","date","year"="[GLOB.year_integer]","message"="[color?"<font color='[color]'>":null][message][color?"</font>":null]")
|
||||
..()
|
||||
log[log.len] = list("time"="[STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]","date","year"="[GLOB.year_integer]","message"="[color?"<font color='[color]'>":null][message][color?"</font>":null]")
|
||||
log_message(message, LOG_GAME, color) //also do the normal admin logs I guess.
|
||||
return log.len
|
||||
|
||||
/obj/mecha/proc/log_append_to_last(message as text,red=null)
|
||||
@@ -1070,3 +1070,53 @@
|
||||
if(occupant_sight_flags)
|
||||
if(user == occupant)
|
||||
user.sight |= occupant_sight_flags
|
||||
|
||||
///////////////////////
|
||||
////// Ammo stuff /////
|
||||
///////////////////////
|
||||
|
||||
/obj/mecha/proc/ammo_resupply(var/obj/item/mecha_ammo/A, mob/user,var/fail_chat_override = FALSE)
|
||||
if(!A.rounds)
|
||||
if(!fail_chat_override)
|
||||
to_chat(user, "<span class='warning'>This box of ammo is empty!</span>")
|
||||
return FALSE
|
||||
var/ammo_needed
|
||||
var/found_gun
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/gun in equipment)
|
||||
ammo_needed = 0
|
||||
|
||||
if(istype(gun, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic) && gun.ammo_type == A.ammo_type)
|
||||
found_gun = TRUE
|
||||
if(A.direct_load)
|
||||
ammo_needed = initial(gun.projectiles) - gun.projectiles
|
||||
else
|
||||
ammo_needed = gun.projectiles_cache_max - gun.projectiles_cache
|
||||
|
||||
if(ammo_needed)
|
||||
if(ammo_needed < A.rounds)
|
||||
if(A.direct_load)
|
||||
gun.projectiles = gun.projectiles + ammo_needed
|
||||
else
|
||||
gun.projectiles_cache = gun.projectiles_cache + ammo_needed
|
||||
playsound(get_turf(user),A.load_audio,50,1)
|
||||
to_chat(user, "<span class='notice'>You add [ammo_needed] [A.round_term][ammo_needed > 1?"s":""] to the [gun.name]</span>")
|
||||
A.rounds = A.rounds - ammo_needed
|
||||
A.update_name()
|
||||
return TRUE
|
||||
|
||||
else
|
||||
if(A.direct_load)
|
||||
gun.projectiles = gun.projectiles + A.rounds
|
||||
else
|
||||
gun.projectiles_cache = gun.projectiles_cache + A.rounds
|
||||
playsound(get_turf(user),A.load_audio,50,1)
|
||||
to_chat(user, "<span class='notice'>You add [A.rounds] [A.round_term][A.rounds > 1?"s":""] to the [gun.name]</span>")
|
||||
A.rounds = 0
|
||||
A.update_name()
|
||||
return TRUE
|
||||
if(!fail_chat_override)
|
||||
if(found_gun)
|
||||
to_chat(user, "<span class='notice'>You can't fit any more ammo of this type!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>None of the equipment on this exosuit can use this ammo!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
chassis.use_internal_tank = !chassis.use_internal_tank
|
||||
button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
|
||||
chassis.occupant_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
chassis.log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
chassis.mecha_log_message("Now taking air from [chassis.use_internal_tank?"internal airtank":"environment"].")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_cycle_equip
|
||||
@@ -114,7 +114,7 @@
|
||||
chassis.set_light(-chassis.lights_power)
|
||||
button_icon_state = "mech_lights_off"
|
||||
chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
chassis.log_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
chassis.mecha_log_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_view_stats
|
||||
@@ -147,7 +147,7 @@
|
||||
strafe = !strafe
|
||||
|
||||
occupant_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
log_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
mecha_log_message("Toggled strafing mode [strafe?"on":"off"].")
|
||||
strafing_action.UpdateButtonIcon()
|
||||
|
||||
//////////////////////////////////////// Specific Ability Actions ///////////////////////////////////////////////
|
||||
@@ -163,7 +163,7 @@
|
||||
if(chassis.get_charge() > 0)
|
||||
chassis.thrusters_active = !chassis.thrusters_active
|
||||
button_icon_state = "mech_thrusters_[chassis.thrusters_active ? "on" : "off"]"
|
||||
chassis.log_message("Toggled thrusters.")
|
||||
chassis.mecha_log_message("Toggled thrusters.")
|
||||
chassis.occupant_message("<font color='[chassis.thrusters_active ?"blue":"red"]'>Thrusters [chassis.thrusters_active ?"en":"dis"]abled.")
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
else
|
||||
chassis.deflect_chance = initial(chassis.deflect_chance)
|
||||
chassis.occupant_message("<span class='danger'>You disable [chassis] defence mode.</span>")
|
||||
chassis.log_message("Toggled defence mode.")
|
||||
chassis.mecha_log_message("Toggled defence mode.")
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/mecha/mech_overload_mode
|
||||
@@ -200,7 +200,7 @@
|
||||
else
|
||||
chassis.leg_overload_mode = !chassis.leg_overload_mode
|
||||
button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
|
||||
chassis.log_message("Toggled leg actuators overload.")
|
||||
chassis.mecha_log_message("Toggled leg actuators overload.")
|
||||
if(chassis.leg_overload_mode)
|
||||
chassis.leg_overload_mode = 1
|
||||
chassis.bumpsmash = 1
|
||||
@@ -240,7 +240,7 @@
|
||||
if(owner.client)
|
||||
chassis.zoom_mode = !chassis.zoom_mode
|
||||
button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
|
||||
chassis.log_message("Toggled zoom mode.")
|
||||
chassis.mecha_log_message("Toggled zoom mode.")
|
||||
chassis.occupant_message("<font color='[chassis.zoom_mode?"blue":"red"]'>Zoom mode [chassis.zoom_mode?"en":"dis"]abled.</font>")
|
||||
if(chassis.zoom_mode)
|
||||
owner.client.change_view(12)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -126,10 +126,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "The scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
@@ -137,21 +167,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -159,14 +189,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -222,36 +252,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures [I].", "<span class='notice'>You secure [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I].", "<span class='notice'>You install [I].</span>")
|
||||
else
|
||||
user.visible_message("[user] unsecures the capacitor from [parent].", "<span class='notice'>You unsecure the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -629,7 +679,7 @@
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -639,10 +689,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "The scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "The capacitor is secured."
|
||||
),
|
||||
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -650,21 +730,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//18
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -672,7 +752,7 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//19
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -680,14 +760,14 @@
|
||||
"desc" = "External armor is being installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//20
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//17
|
||||
//21
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -744,41 +824,61 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] starts to install the external armor layer to [parent].", "<span class='notice'>You install the external armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external reinforced armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the external armor from [parent].", "<span class='notice'>You remove the external armor from [parent].</span>")
|
||||
if(16)
|
||||
if(21)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries external armor layer from [parent].", "<span class='notice'>You pry external armor layer from [parent].</span>")
|
||||
if(17)
|
||||
if(22)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
@@ -796,6 +896,7 @@
|
||||
/obj/item/mecha_parts/part/honker_head
|
||||
)
|
||||
|
||||
|
||||
/datum/component/construction/mecha/honker
|
||||
result = /obj/mecha/combat/honker
|
||||
steps = list(
|
||||
@@ -837,41 +938,70 @@
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//6
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//8
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//10
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE
|
||||
),
|
||||
|
||||
//9
|
||||
//12
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//10
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/clothing/mask/gas/clown_hat,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//11
|
||||
//14
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
|
||||
//12
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/clothing/shoes/clown_shoes,
|
||||
"action" = ITEM_DELETE
|
||||
),
|
||||
|
||||
//13
|
||||
//16
|
||||
list(
|
||||
"key" = /obj/item/bikehorn
|
||||
),
|
||||
)
|
||||
|
||||
// HONK doesn't have any construction step icons, so we just set an icon once.
|
||||
/datum/component/construction/mecha/honker/update_parent(step_index)
|
||||
if(step_index == 1)
|
||||
var/atom/parent_atom = parent
|
||||
parent_atom.icon = 'icons/mecha/mech_construct.dmi'
|
||||
parent_atom.icon_state = "honker_chassis"
|
||||
..()
|
||||
// HONK doesn't have any construction step icons, so we just set an icon once.
|
||||
/datum/component/construction/mecha/honker/update_parent(step_index)
|
||||
if(step_index == 1)
|
||||
var/atom/parent_atom = parent
|
||||
@@ -898,8 +1028,12 @@
|
||||
if(8)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(10)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(12)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
if(14)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
if(16)
|
||||
user.visible_message("[user] puts [I] on [parent].", "<span class='notice'>You put [I] on [parent].</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -1626,10 +1760,9 @@
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Peripherals control module is installed."
|
||||
),
|
||||
|
||||
//9
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"key" = /obj/item/stock_parts/scanning_module,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Peripherals control module is secured."
|
||||
@@ -1639,10 +1772,40 @@
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
"desc" = "Scanner module is installed."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/capacitor,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Scanner module is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Capacitor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
list(
|
||||
"key" = /obj/item/stock_parts/cell,
|
||||
"action" = ITEM_MOVE_INSIDE,
|
||||
"back_key" = TOOL_SCREWDRIVER,
|
||||
"desc" = "Capacitor is secured."
|
||||
),
|
||||
|
||||
//11
|
||||
list(
|
||||
"key" = TOOL_SCREWDRIVER,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "The power cell is installed."
|
||||
),
|
||||
|
||||
//12
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
@@ -1650,21 +1813,21 @@
|
||||
"desc" = "The power cell is secured."
|
||||
),
|
||||
|
||||
//12
|
||||
//13
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "Internal armor is installed."
|
||||
),
|
||||
|
||||
//13
|
||||
//14
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
"desc" = "Internal armor is wrenched."
|
||||
),
|
||||
|
||||
//14
|
||||
//15
|
||||
list(
|
||||
"key" = /obj/item/stack/sheet/plasteel,
|
||||
"amount" = 5,
|
||||
@@ -1672,14 +1835,14 @@
|
||||
"desc" = "Internal armor is welded."
|
||||
),
|
||||
|
||||
//15
|
||||
//16
|
||||
list(
|
||||
"key" = TOOL_WRENCH,
|
||||
"back_key" = TOOL_CROWBAR,
|
||||
"desc" = "External armor is installed."
|
||||
),
|
||||
|
||||
//16
|
||||
//17
|
||||
list(
|
||||
"key" = TOOL_WELDER,
|
||||
"back_key" = TOOL_WRENCH,
|
||||
@@ -1736,36 +1899,56 @@
|
||||
else
|
||||
user.visible_message("[user] unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>")
|
||||
if(10)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the scanner module.", "<span class='notice'>You secure the scanner module.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the scanner module from [parent].", "<span class='notice'>You remove the scanner module from [parent].</span>")
|
||||
if(11)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] to [parent].", "<span class='notice'>You install [I] to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the scanner module.", "<span class='notice'>You unfasten the scanner module.</span>")
|
||||
if(12)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the capacitor.", "<span class='notice'>You secure the capacitor.</span>")
|
||||
else
|
||||
user.visible_message("[user] removes the capacitor from [parent].", "<span class='notice'>You remove the capacitor from [parent].</span>")
|
||||
if(13)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs [I] into [parent].", "<span class='notice'>You install [I] into [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the capacitor.", "<span class='notice'>You unfasten the capacitor.</span>")
|
||||
if(14)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the power cell.", "<span class='notice'>You secure the power cell.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the power cell from [parent].", "<span class='notice'>You pry the power cell from [parent].</span>")
|
||||
if(11)
|
||||
if(15)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the internal armor layer to [parent].", "<span class='notice'>You install the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the power cell.", "<span class='notice'>You unfasten the power cell.</span>")
|
||||
if(12)
|
||||
if(16)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries internal armor layer from [parent].", "<span class='notice'>You pry internal armor layer from [parent].</span>")
|
||||
if(13)
|
||||
if(17)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the internal armor layer to [parent].", "<span class='notice'>You weld the internal armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>")
|
||||
if(14)
|
||||
if(18)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] installs the external armor layer to [parent].", "<span class='notice'>You install the external reinforced armor layer to [parent].</span>")
|
||||
else
|
||||
user.visible_message("[user] cuts the internal armor layer from [parent].", "<span class='notice'>You cut the internal armor layer from [parent].</span>")
|
||||
if(15)
|
||||
if(19)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>")
|
||||
else
|
||||
user.visible_message("[user] pries the external armor layer from [parent].", "<span class='notice'>You pry the external armor layer from [parent].</span>")
|
||||
if(16)
|
||||
if(20)
|
||||
if(diff==FORWARD)
|
||||
user.visible_message("[user] welds the external armor layer to [parent].", "<span class='notice'>You weld the external armor layer to [parent].</span>")
|
||||
else
|
||||
|
||||
@@ -39,21 +39,24 @@
|
||||
/obj/machinery/computer/mecha/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("send_message")
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["send_message"])
|
||||
if (!istype(MT))
|
||||
return
|
||||
var/message = stripped_input(usr,"Input message","Transmit message")
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
M.occupant_message(message)
|
||||
return
|
||||
if(href_list["shock"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("shock")
|
||||
MT.shock()
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["shock"])
|
||||
if (istype(MT))
|
||||
MT.shock()
|
||||
if(href_list["get_log"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("get_log")
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = locate(href_list["get_log"])
|
||||
if(istype(MT))
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
if(href_list["return"])
|
||||
screen = 0
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
log_message("Attack by hand/paw. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by hand/paw. Attacker - [user].", color="red")
|
||||
log_append_to_last("Armor saved.")
|
||||
|
||||
/obj/mecha/attack_paw(mob/user as mob)
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
|
||||
/obj/mecha/attack_alien(mob/living/user)
|
||||
log_message("Attack by alien. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by alien. Attacker - [user].", color="red")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
attack_generic(user, 15, BRUTE, "melee", 0)
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/simple_animal/user)
|
||||
log_message("Attack by simple animal. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by simple animal. Attacker - [user].", color="red")
|
||||
if(!user.melee_damage_upper && !user.obj_damage)
|
||||
user.emote("custom", message = "[user.friendly] [src].")
|
||||
return 0
|
||||
@@ -99,7 +99,7 @@
|
||||
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
log_message("Attack by hulk. Attacker - [user].", color="red")
|
||||
mecha_log_message("Attack by hulk. Attacker - [user].", color="red")
|
||||
log_combat(user, src, "punched", "hulk powers")
|
||||
|
||||
/obj/mecha/blob_act(obj/structure/blob/B)
|
||||
@@ -109,16 +109,16 @@
|
||||
return
|
||||
|
||||
/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
|
||||
log_message("Hit by [AM].", color="red")
|
||||
mecha_log_message("Hit by [AM].", color="red")
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper
|
||||
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
|
||||
mecha_log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/ex_act(severity, target)
|
||||
log_message("Affected by explosion of severity: [severity].", color="red")
|
||||
mecha_log_message("Affected by explosion of severity: [severity].", color="red")
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_append_to_last("Armor saved, changing severity to [severity].")
|
||||
@@ -148,7 +148,7 @@
|
||||
if(get_charge())
|
||||
use_power((cell.charge/3)/(severity*2))
|
||||
take_damage(30 / severity, BURN, "energy", 1)
|
||||
log_message("EMP detected", color="red")
|
||||
mecha_log_message("EMP detected", color="red")
|
||||
|
||||
if(istype(src, /obj/mecha/combat))
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse-disable.dmi'
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature>max_temperature)
|
||||
log_message("Exposed to dangerous temperature.", color="red")
|
||||
mecha_log_message("Exposed to dangerous temperature.", color="red")
|
||||
take_damage(5, BURN, 0, 1)
|
||||
|
||||
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
@@ -172,6 +172,10 @@
|
||||
to_chat(user, "[src]-[W] interface initialization failed.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_ammo))
|
||||
ammo_resupply(W, user)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
var/obj/item/mecha_parts/mecha_equipment/E = W
|
||||
spawn()
|
||||
@@ -232,7 +236,7 @@
|
||||
cell = null
|
||||
state = 4
|
||||
to_chat(user, "<span class='notice'>You unscrew and pry out the powercell.</span>")
|
||||
log_message("Powercell removed")
|
||||
mecha_log_message("Powercell removed")
|
||||
else if(state==4 && cell)
|
||||
state=3
|
||||
to_chat(user, "<span class='notice'>You screw the cell in place.</span>")
|
||||
@@ -246,7 +250,7 @@
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
to_chat(user, "<span class='notice'>You install the powercell.</span>")
|
||||
cell = C
|
||||
log_message("Powercell installed")
|
||||
mecha_log_message("Powercell installed")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
|
||||
return
|
||||
@@ -280,7 +284,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/mecha/attacked_by(obj/item/I, mob/living/user)
|
||||
log_message("Attacked by [I]. Attacker - [user]")
|
||||
mecha_log_message("Attacked by [I]. Attacker - [user]")
|
||||
..()
|
||||
|
||||
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
|
||||
|
||||
@@ -221,101 +221,99 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
|
||||
if(in_range(src, usr))
|
||||
var/obj/item/card/id/id_card
|
||||
if (href_list["id_card"])
|
||||
id_card = locate(href_list["id_card"])
|
||||
if (!istype(id_card))
|
||||
return
|
||||
|
||||
if(href_list["req_access"] && add_req_access)
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
to_chat(user, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
to_chat(user, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(afilter.getObj("id_card"),user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
to_chat(usr, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
to_chat(usr, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(id_card, usr)
|
||||
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
var/mob/user = afilter.getMob("user")
|
||||
if(user)
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
to_chat(usr, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
|
||||
if(href_list["add_req_access"] && add_req_access && afilter.getObj("id_card"))
|
||||
operation_req_access += afilter.getNum("add_req_access")
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
if(href_list["add_req_access"] && add_req_access)
|
||||
operation_req_access += text2num(href_list["add_req_access"])
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["del_req_access"] && add_req_access && afilter.getObj("id_card"))
|
||||
operation_req_access -= afilter.getNum("del_req_access")
|
||||
output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user"))
|
||||
if(href_list["del_req_access"] && add_req_access)
|
||||
operation_req_access -= text2num(href_list["add_req_access"])
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["finish_req_access"])
|
||||
add_req_access = 0
|
||||
var/mob/user = afilter.getMob("user")
|
||||
user << browse(null,"window=exosuit_add_access")
|
||||
usr << browse(null,"window=exosuit_add_access")
|
||||
|
||||
if(usr != occupant)
|
||||
return
|
||||
|
||||
if(href_list["update_content"])
|
||||
send_byjax(src.occupant,"exosuit.browser","content",src.get_stats_part())
|
||||
send_byjax(usr,"exosuit.browser","content",src.get_stats_part())
|
||||
|
||||
if(href_list["select_equip"])
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = afilter.getObj("select_equip")
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = locate(href_list["select_equip"]) in src
|
||||
if(equip && equip.selectable)
|
||||
src.selected = equip
|
||||
src.occupant_message("You switch to [equip]")
|
||||
src.visible_message("[src] raises [equip]")
|
||||
send_byjax(src.occupant,"exosuit.browser","eq_list",src.get_equipment_list())
|
||||
selected = equip
|
||||
occupant_message("You switch to [equip]")
|
||||
visible_message("[src] raises [equip]")
|
||||
send_byjax(usr, "exosuit.browser","eq_list", get_equipment_list())
|
||||
|
||||
if(href_list["rmictoggle"])
|
||||
radio.broadcasting = !radio.broadcasting
|
||||
send_byjax(src.occupant,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
send_byjax(usr,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rspktoggle"])
|
||||
radio.listening = !radio.listening
|
||||
send_byjax(src.occupant,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
send_byjax(usr,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rfreq"])
|
||||
var/new_frequency = (radio.frequency + afilter.getNum("rfreq"))
|
||||
var/new_frequency = (radio.frequency + text2num(href_list["rfreq"]))
|
||||
if (!radio.freerange || (radio.frequency < MIN_FREE_FREQ || radio.frequency > MAX_FREE_FREQ))
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
radio.set_frequency(new_frequency)
|
||||
send_byjax(src.occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
send_byjax(usr,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
|
||||
if (href_list["view_log"])
|
||||
src.occupant << browse(src.get_log_html(), "window=exosuit_log")
|
||||
onclose(occupant, "exosuit_log")
|
||||
|
||||
if (href_list["change_name"])
|
||||
var/newname = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN)
|
||||
if(newname && trim(newname))
|
||||
name = newname
|
||||
else
|
||||
alert(occupant, "nope.avi")
|
||||
var/userinput = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN)
|
||||
if(!userinput || usr != occupant || usr.incapacitated())
|
||||
return
|
||||
name = userinput
|
||||
return
|
||||
|
||||
if (href_list["toggle_id_upload"])
|
||||
add_req_access = !add_req_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
send_byjax(usr,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(state)
|
||||
occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
|
||||
return
|
||||
maint_access = !maint_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
send_byjax(usr,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
|
||||
if (href_list["toggle_port_connection"])
|
||||
if(internal_tank.connected_port)
|
||||
if(internal_tank.disconnect())
|
||||
occupant_message("Disconnected from the air system port.")
|
||||
log_message("Disconnected from gas port.")
|
||||
mecha_log_message("Disconnected from gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to disconnect from the air system port!</span>")
|
||||
return
|
||||
@@ -323,7 +321,7 @@
|
||||
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate() in loc
|
||||
if(internal_tank.connect(possible_port))
|
||||
occupant_message("Connected to the air system port.")
|
||||
log_message("Connected to gas port.")
|
||||
mecha_log_message("Connected to gas port.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to connect with air system port!</span>")
|
||||
return
|
||||
@@ -341,14 +339,14 @@
|
||||
|
||||
if(href_list["repair_int_control_lost"])
|
||||
occupant_message("Recalibrating coordination system...")
|
||||
log_message("Recalibration of coordination system started.")
|
||||
mecha_log_message("Recalibration of coordination system started.")
|
||||
var/T = loc
|
||||
spawn(100)
|
||||
if(T == loc)
|
||||
clearInternalDamage(MECHA_INT_CONTROL_LOST)
|
||||
occupant_message("<span class='notice'>Recalibration successful.</span>")
|
||||
log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
mecha_log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Recalibration failed!</span>")
|
||||
log_message("Recalibration of coordination system failed with 1 error.", color="red")
|
||||
mecha_log_message("Recalibration of coordination system failed with 1 error.", color="red")
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user