Merge branch 'master' into upstream-merge-33246

This commit is contained in:
LetterJay
2017-12-20 00:27:06 -06:00
committed by GitHub
808 changed files with 14650 additions and 10287 deletions
-1
View File
@@ -20,7 +20,6 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances)
var/list/arguments = args.Copy(2)
new type(arglist(arguments))
/datum/atom_hud/alternate_appearance
var/appearance_key
+19 -24
View File
@@ -200,7 +200,7 @@
loc.handle_atom_del(src)
for(var/atom/movable/AM in contents)
qdel(AM)
loc = null
moveToNullspace()
invisibility = INVISIBILITY_ABSTRACT
if(pulledby)
pulledby.stop_pulling()
@@ -254,6 +254,12 @@
loc = destination
if(!same_loc)
var/turf/oldturf = get_turf(oldloc)
var/turf/destturf = get_turf(destination)
var/old_z = (oldturf ? oldturf.z : null)
var/dest_z = (destturf ? destturf.z : null)
if (old_z != dest_z)
onTransitZ(old_z, dest_z)
destination.Entered(src, oldloc)
if(destarea && old_area != destarea)
destarea.Entered(src, oldloc)
@@ -268,30 +274,18 @@
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
else
. = TRUE
var/atom/oldloc = loc
var/area/old_area = get_area(oldloc)
oldloc.Exited(src, null)
if(old_area)
old_area.Exited(src, null)
if (loc)
var/atom/oldloc = loc
var/area/old_area = get_area(oldloc)
oldloc.Exited(src, null)
if(old_area)
old_area.Exited(src, null)
loc = null
/mob/living/forceMove(atom/destination)
stop_pulling()
if(buckled)
buckled.unbuckle_mob(src, force = TRUE)
if(has_buckled_mobs())
unbuckle_all_mobs(force = TRUE)
. = ..()
if(.)
if(client)
reset_perspective(destination)
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
/mob/living/brain/forceMove(atom/destination)
if(container)
return container.forceMove(destination)
else //something went very wrong.
CRASH("Brainmob without container.")
/atom/movable/proc/onTransitZ(old_z,new_z)
for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
var/atom/movable/AM = item
AM.onTransitZ(old_z,new_z)
//Called whenever an object moves and by mobs when they attempt to move themselves through space
//And when an object or action applies a force on src, see newtonian_move() below
@@ -420,7 +414,7 @@
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
if(!buckled_mob.Move(newloc, direct))
loc = buckled_mob.loc
forceMove(buckled_mob.loc)
last_move = buckled_mob.last_move
inertia_dir = last_move
buckled_mob.inertia_dir = last_move
@@ -522,6 +516,7 @@
. = ..()
. -= "Jump to"
.["Follow"] = "?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(src)]"
.["Get"] = "?_src=holder;[HrefToken()];admingetmovable=[REF(src)]"
/atom/movable/proc/ex_check(ex_id)
if(!ex_id)
+3
View File
@@ -60,6 +60,9 @@
/datum/atom_hud/data/bot_path
hud_icons = list(DIAG_PATH_HUD)
/datum/atom_hud/abductor
hud_icons = list(GLAND_HUD)
/* MED/SEC/DIAG HUD HOOKS */
/*
+28 -23
View File
@@ -4,7 +4,7 @@
w_class = WEIGHT_CLASS_TINY
var/used = 0
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, type = "")
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
return
/obj/item/antag_spawner/proc/equip_antag(mob/target)
@@ -67,18 +67,16 @@
else
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/user)
/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, kind ,datum/mind/user)
new /obj/effect/particle_effect/smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/datum/mind/app_mind = M.mind
var/datum/antagonist/wizard/apprentice/app = new(app_mind)
app.master = user
app.school = school
app.school = kind
var/datum/antagonist/wizard/master_wizard = user.has_antag_datum(/datum/antagonist/wizard)
if(master_wizard)
@@ -107,7 +105,7 @@
if(used)
to_chat(user, "<span class='warning'>[src] is out of power!</span>")
return FALSE
if(!(user.mind in SSticker.mode.syndicates))
if(!user.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
to_chat(user, "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>")
return FALSE
if(user.z != ZLEVEL_CENTCOM)
@@ -127,25 +125,25 @@
return
used = TRUE
var/mob/dead/observer/theghost = pick(nuke_candidates)
spawn_antag(theghost.client, get_turf(src), "syndieborg", user)
spawn_antag(theghost.client, get_turf(src), "syndieborg")
do_sparks(4, TRUE, src)
qdel(src)
else
to_chat(user, "<span class='warning'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>")
/obj/item/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T)
/obj/item/antag_spawner/nuke_ops/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/code = "BOMB-NOT-FOUND"
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
if(nuke)
code = nuke.r_code
M.mind.make_Nuke(null, code, 0, FALSE)
var/newname = M.dna.species.random_name(M.gender,0,SSticker.mode.nukeops_lastname)
M.mind.name = newname
M.real_name = newname
M.name = newname
var/datum/antagonist/nukeop/new_op = new(M.mind)
new_op.send_to_spawnpoint = FALSE
new_op.nukeop_outfit = /datum/outfit/syndicate/no_crystals
var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
if(creator_op)
M.mind.add_antag_datum(new_op,creator_op.nuke_team)
M.mind.special_role = "Nuclear Operative"
//////SYNDICATE BORG
/obj/item/antag_spawner/nuke_ops/borg_tele
@@ -162,8 +160,12 @@
name = "syndicate medical teleporter"
borg_to_spawn = "Medical"
/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T)
/obj/item/antag_spawner/nuke_ops/borg_tele/spawn_antag(client/C, turf/T, kind, datum/mind/user)
var/mob/living/silicon/robot/R
var/datum/antagonist/nukeop/creator_op = user.has_antag_datum(/datum/antagonist/nukeop,TRUE)
if(!creator_op)
return
switch(borg_to_spawn)
if("Medical")
R = new /mob/living/silicon/robot/modules/syndicate/medical(T)
@@ -174,8 +176,8 @@
if(prob(50))
brainfirstname = pick(GLOB.first_names_female)
var/brainopslastname = pick(GLOB.last_names)
if(SSticker.mode.nukeops_lastname) //the brain inside the syndiborg has the same last name as the other ops.
brainopslastname = SSticker.mode.nukeops_lastname
if(creator_op.nuke_team.syndicate_name) //the brain inside the syndiborg has the same last name as the other ops.
brainopslastname = creator_op.nuke_team.syndicate_name
var/brainopsname = "[brainfirstname] [brainopslastname]"
R.mmi.name = "Man-Machine Interface: [brainopsname]"
@@ -185,7 +187,11 @@
R.real_name = R.name
R.key = C.key
R.mind.make_Nuke(null, nuke_code = null,leader=0, telecrystals = TRUE)
var/datum/antagonist/nukeop/new_borg = new(R.mind)
new_borg.send_to_spawnpoint = FALSE
R.mind.add_antag_datum(new_borg,creator_op.nuke_team)
R.mind.special_role = "Syndicate Cyborg"
///////////SLAUGHTER DEMON
@@ -222,8 +228,7 @@
to_chat(user, "<span class='notice'>You can't seem to work up the nerve to shatter the bottle. Perhaps you should try again later.</span>")
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, type = "")
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
+1 -1
View File
@@ -42,7 +42,7 @@
/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume)
..()
if(exposed_temperature)
adjustFireLoss(Clamp(0.01 * exposed_temperature, 1, 5))
adjustFireLoss(CLAMP(0.01 * exposed_temperature, 1, 5))
else
adjustFireLoss(5)
+3 -3
View File
@@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
B.hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_core.obj_integrity)]</font></div>"
/mob/camera/blob/proc/add_points(points)
blob_points = Clamp(blob_points + points, 0, max_blob_points)
blob_points = CLAMP(blob_points + points, 0, max_blob_points)
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_points)]</font></div>"
/mob/camera/blob/say(message)
@@ -215,12 +215,12 @@ GLOBAL_LIST_EMPTY(blob_nodes)
if(placed)
var/obj/structure/blob/B = locate() in range("3x3", NewLoc)
if(B)
loc = NewLoc
forceMove(NewLoc)
else
return 0
else
var/area/A = get_area(NewLoc)
if(isspaceturf(NewLoc) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles
return 0
loc = NewLoc
forceMove(NewLoc)
return 1
+2 -2
View File
@@ -42,7 +42,7 @@
return 0
else if(placement_override == 1)
var/turf/T = pick(GLOB.blobstart)
loc = T //got overrided? you're somewhere random, motherfucker
forceMove(T) //got overrided? you're somewhere random, motherfucker
if(placed && blob_core)
blob_core.forceMove(loc)
else
@@ -74,7 +74,7 @@
var/node_name = input(src, "Choose a node to jump to.", "Node Jump") in nodes
var/obj/structure/blob/node/chosen_node = nodes[node_name]
if(chosen_node)
loc = chosen_node.loc
forceMove(chosen_node.loc)
/mob/camera/blob/proc/createSpecial(price, blobType, nearEquals, needsNode, turf/T)
if(!T)
@@ -207,7 +207,7 @@
to_chat(cyborg, "<span class='brass'>You start to charge from the [sigil_name]...</span>")
if(!do_after(cyborg, 50, target = src, extra_checks = CALLBACK(src, .proc/cyborg_checks, cyborg, TRUE)))
return
var/giving_power = min(Floor(cyborg.cell.maxcharge - cyborg.cell.charge, MIN_CLOCKCULT_POWER), get_clockwork_power()) //give the borg either all our power or their missing power floored to MIN_CLOCKCULT_POWER
var/giving_power = min(FLOOR(cyborg.cell.maxcharge - cyborg.cell.charge, MIN_CLOCKCULT_POWER), get_clockwork_power()) //give the borg either all our power or their missing power floored to MIN_CLOCKCULT_POWER
if(adjust_clockwork_power(-giving_power))
cyborg.visible_message("<span class='warning'>[cyborg] glows a brilliant orange!</span>")
var/previous_color = cyborg.color
@@ -310,7 +310,7 @@
else
if(L.stat == DEAD)
var/revival_cost = revive_cost
if(GLOB.ratvar_awakens)
if(GLOB.ratvar_awakens || L.suiciding) // No cost if Ratvar is summoned or if you're reviving a convert who suicided
revival_cost = 0
var/mob/dead/observer/ghost = L.get_ghost(TRUE)
if(GLOB.clockwork_vitality >= revival_cost && (ghost || (L.mind && L.mind.active)))
@@ -323,6 +323,20 @@
L.visible_message("<span class='warning'>[L] suddenly gets back up, [L.p_their()] body dripping blue ichor!</span>", "<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
GLOB.clockwork_vitality -= revival_cost
break
if(!L.client || L.client.is_afk())
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [L.name], an inactive clock cultist?", "[name]", null, "Clock Cultist", 50, L)
var/mob/dead/observer/theghost = null
if(candidates.len)
to_chat(L, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!")
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
L.ghostize(0)
L.key = theghost.key
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
L.visible_message("<span class='warning'>[L]'s eyes suddenly open wide, gleaming with renewed vigor for the cause!</span>", "<span class='inathneq'>\"[text2ratvar("Awaken!")]\"</span>")
break
var/vitality_for_cycle = 3
if(!GLOB.ratvar_awakens)
if(L.stat == CONSCIOUS)
@@ -90,7 +90,7 @@
if(amount_temp < 2)
to_chat(user, "<span class='warning'>You need at least <b>2</b> floor tiles to convert into power.</span>")
return TRUE
if(IsOdd(amount_temp))
if(ISODD(amount_temp))
amount_temp--
no_delete = TRUE
use(amount_temp)
@@ -239,7 +239,7 @@
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
break
obj_integrity = Clamp(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
obj_integrity = CLAMP(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
adjust_clockwork_power(-repair_values["power_required"])
playsound(src, 'sound/machines/click.ogg', 50, 1)
@@ -10,12 +10,15 @@
for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects)
T.update_icon()
var/power_overwhelming = GLOB.clockwork_power
var/unlock_message
if(power_overwhelming >= SCRIPT_UNLOCK_THRESHOLD && !GLOB.script_scripture_unlocked)
GLOB.script_scripture_unlocked = TRUE
hierophant_message("<span class='large_brass bold'>The Ark swells as a key power threshold is reached. Script scriptures are now available.</span>")
unlock_message = "<span class='large_brass bold'>The Ark swells as a key power threshold is reached. Script scriptures are now available.</span>"
if(power_overwhelming >= APPLICATION_UNLOCK_THRESHOLD && !GLOB.application_scripture_unlocked)
GLOB.application_scripture_unlocked = TRUE
hierophant_message("<span class='large_brass bold'>The Ark surges as a key power threshold is reached. Application scriptures are now available.</span>")
unlock_message = "<span class='large_brass bold'>The Ark surges as a key power threshold is reached. Application scriptures are now available.</span>"
if(GLOB.servants_active)
hierophant_message(unlock_message)
return TRUE
/proc/can_access_clockwork_power(atom/movable/access_point, amount) //Returns true if the access point has access to clockwork power (and optionally, a number of watts for it)
@@ -11,6 +11,8 @@
//reports to servants when scripture is locked or unlocked
/proc/scripture_unlock_alert(list/previous_states)
if(!GLOB.servants_active)
return
. = scripture_unlock_check()
for(var/i in .)
if(.[i] != previous_states[i])
@@ -67,7 +67,6 @@
name = "replicant manacles"
desc = "Heavy manacles made out of freezing-cold metal. It looks like brass, but feels much more solid."
icon_state = "brass_manacles"
origin_tech = "materials=2;magnets=5"
flags_1 = DROPDEL_1
/obj/item/restraints/handcuffs/clockwork/dropped(mob/user)
@@ -1,13 +1,13 @@
#define MARAUDER_SLOWDOWN_PERCENTAGE 0.40 //Below this percentage of health, marauders will become slower
#define MARAUDER_SHIELD_REGEN_TIME 100 //In deciseconds, how long it takes for shields to regenerate after breaking
#define MARAUDER_SHIELD_REGEN_TIME 200 //In deciseconds, how long it takes for shields to regenerate after breaking
//Clockwork marauder: A well-rounded frontline construct. Only one can exist for every two human servants.
/mob/living/simple_animal/hostile/clockwork/marauder
name = "clockwork marauder"
desc = "The stalwart apparition of a soldier, blazing with crimson flames. It's armed with a gladius and shield."
icon_state = "clockwork_marauder"
health = 150
maxHealth = 150
health = 120
maxHealth = 120
force_threshold = 8
speed = 0
obj_damage = 40
@@ -39,10 +39,11 @@
speed = initial(speed) + 1 //Yes, this slows them down
else
speed = initial(speed)
if(shield_health != max_shield_health && world.time >= shield_health_regen)
to_chat(src, "<span class='neovgre'>Your shield has recovered. <b>[max_shield_health]</b> blocks remaining!</span>")
if(shield_health < max_shield_health && world.time >= shield_health_regen)
shield_health_regen = world.time + MARAUDER_SHIELD_REGEN_TIME
to_chat(src, "<span class='neovgre'>Your shield has recovered, <b>[shield_health]</b> blocks remaining!</span>")
playsound_local(src, "shatter", 75, TRUE, frequency = -1)
shield_health = max_shield_health
shield_health++
/mob/living/simple_animal/hostile/clockwork/marauder/update_values()
if(GLOB.ratvar_awakens) //Massive attack damage bonuses and health increase, because Ratvar
@@ -97,7 +97,7 @@
if(ishuman(M.current))
human_servants++
construct_limit = human_servants / 4 //1 per 4 human servants, and a maximum of 3 marauders
construct_limit = Clamp(construct_limit, 1, 3)
construct_limit = CLAMP(construct_limit, 1, 3)
/datum/clockwork_scripture/create_object/construct/clockwork_marauder/pre_recital()
channel_time = initial(channel_time)
@@ -60,4 +60,4 @@
break
if(!M)
M = H.apply_status_effect(STATUS_EFFECT_MANIAMOTOR, src)
M.severity = Clamp(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
M.severity = CLAMP(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
@@ -57,5 +57,5 @@
L.confused = min(L.confused + 15, 50)
L.dizziness = min(L.dizziness + 15, 50)
if(L.confused >= 25)
L.Knockdown(Floor(L.confused * 0.8))
L.Knockdown(FLOOR(L.confused * 0.8, 1))
take_damage(max_integrity)
+24 -13
View File
@@ -510,10 +510,10 @@ structure_check() searches for nearby cultist structures required for the invoca
message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod")
..()
//Rite of Resurrection: Requires the corpse of a cultist and that there have been less revives than the number of people GLOB.sacrificed
//Rite of Resurrection: Requires a dead or inactive cultist. When reviving the dead, you can only perform one revival for every sacrifice your cult has carried out.
/obj/effect/rune/raise_dead
cultist_name = "Resurrect Cultist"
cultist_desc = "requires the corpse of a cultist placed upon the rune. Provided there have been sufficient sacrifices, they will be revived."
cultist_name = "Revive Cultist"
cultist_desc = "requires a dead, mindless, or inactive cultist placed upon the rune. Provided there have been sufficient sacrifices, they will be given a new life."
invocation = "Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!" //Depends on the name of the user - see below
icon_state = "1"
color = RUNE_COLOR_MEDIUMRED
@@ -534,16 +534,11 @@ structure_check() searches for nearby cultist structures required for the invoca
return
rune_in_use = TRUE
for(var/mob/living/M in T.contents)
if(iscultist(M) && M.stat == DEAD)
if(iscultist(M) && (M.stat == DEAD || !M.client || M.client.is_afk()))
potential_revive_mobs |= M
if(!potential_revive_mobs.len)
to_chat(user, "<span class='cultitalic'>There are no dead cultists on the rune!</span>")
log_game("Raise Dead rune failed - no corpses to revive")
fail_invoke()
rune_in_use = FALSE
return
if(LAZYLEN(GLOB.sacrificed) <= revives_used)
to_chat(user, "<span class='warning'>You have sacrificed too few people to revive a cultist!</span>")
log_game("Raise Dead rune failed - no cultists to revive")
fail_invoke()
rune_in_use = FALSE
return
@@ -559,9 +554,25 @@ structure_check() searches for nearby cultist structures required for the invoca
else
invocation = initial(invocation)
..()
revives_used++
mob_to_revive.revive(1, 1) //This does remove disabilities and such, but the rune might actually see some use because of it!
mob_to_revive.grab_ghost()
if(mob_to_revive.stat == DEAD)
if(LAZYLEN(GLOB.sacrificed) <= revives_used)
to_chat(user, "<span class='warning'>Your cult must carry out another sacrifice before it can revive a cultist!</span>")
fail_invoke()
rune_in_use = FALSE
return
revives_used++
mob_to_revive.revive(1, 1) //This does remove disabilities and such, but the rune might actually see some use because of it!
mob_to_revive.grab_ghost()
else if(!mob_to_revive.client || mob_to_revive.client.is_afk())
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [mob_to_revive.name], an inactive blood cultist?", "[name]", null, "Blood Cultist", 50, mob_to_revive)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
to_chat(mob_to_revive.mind, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form.")
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(mob_to_revive)]) to replace an AFK player.")
mob_to_revive.ghostize(0)
mob_to_revive.key = theghost.key
to_chat(mob_to_revive, "<span class='cultlarge'>\"PASNAR SAVRAE YAM'TOTH. Arise.\"</span>")
mob_to_revive.visible_message("<span class='warning'>[mob_to_revive] draws in a huge breath, red light shining from [mob_to_revive.p_their()] eyes.</span>", \
"<span class='cultlarge'>You awaken suddenly from the void. You're alive!</span>")
-1
View File
@@ -338,7 +338,6 @@
name = "cult shackles"
desc = "Shackles that bind the wrists with sinister magic."
trashtype = /obj/item/restraints/handcuffs/energy/used
origin_tech = "materials=2;magnets=5"
flags_1 = DROPDEL_1
/obj/item/restraints/handcuffs/energy/cult/used/dropped(mob/user)
+2
View File
@@ -19,6 +19,7 @@
var/probability = 0
var/false_report_weight = 0 //How often will this show up incorrectly in a centcom report?
var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
var/nuke_off_station = 0 //Used for tracking where the nuke hit
var/round_ends_with_antag_death = 0 //flags the "one verse the station" antags as such
var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
@@ -448,6 +449,7 @@
//By default nuke just ends the round
/datum/game_mode/proc/OnNukeExplosion(off_station)
nuke_off_station = off_station
if(off_station < 2)
station_was_nuked = TRUE //Will end the round on next check.
-1
View File
@@ -2,7 +2,6 @@
* Gang Boss Pens
*/
/obj/item/pen/gang
origin_tech = "materials=2;syndicate=3"
var/cooldown
var/last_used = 0
var/charges = 1
-1
View File
@@ -11,7 +11,6 @@
throw_speed = 3
throw_range = 7
flags_1 = CONDUCT_1
origin_tech = "programming=5;bluespace=2;syndicate=5"
var/datum/gang/gang //Which gang uses this?
var/recalling = 0
var/outfits = 2
+1 -1
View File
@@ -25,7 +25,7 @@
if (prob(meteorminutes/2))
wavetype = GLOB.meteors_catastrophic
var/ramp_up_final = Clamp(round(meteorminutes/rampupdelta), 1, 10)
var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
@@ -2,6 +2,8 @@
#define VEST_COMBAT 2
#define GIZMO_SCAN 1
#define GIZMO_MARK 2
#define MIND_DEVICE_MESSAGE 1
#define MIND_DEVICE_CONTROL 2
//AGENT VEST
/obj/item/clothing/suit/armor/abductor/vest
@@ -11,7 +13,6 @@
icon_state = "vest_stealth"
item_state = "armor"
blood_overlay_type = "armor"
origin_tech = "magnets=7;biotech=4;powerstorage=4;abductor=4"
armor = list(melee = 15, bullet = 15, laser = 15, energy = 15, bomb = 15, bio = 15, rad = 15, fire = 70, acid = 70)
actions_types = list(/datum/action/item_action/hands_free/activate)
allowed = list(
@@ -155,7 +156,6 @@
item_state = "silencer"
lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi'
origin_tech = "engineering=7;magnets=4;bluespace=4;abductor=3"
var/mode = GIZMO_SCAN
var/mob/living/marked = null
var/obj/machinery/abductor/console/console
@@ -244,7 +244,6 @@
item_state = "gizmo"
lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi'
origin_tech = "materials=4;programming=7;abductor=3"
/obj/item/device/abductor/silencer/attack(mob/living/M, mob/user)
if(!AbductorCheck(user))
@@ -281,6 +280,84 @@
if(!istype(I, /obj/item/device/radio/headset))
r.broadcasting = 0 //goddamned headset hacks
/obj/item/device/abductor/mind_device
name = "mental interface device"
desc = "A dual-mode tool for directly communicating with sentient brains. It can be used to send a direct message to a target, \
or to send a command to a test subject with a charged gland."
icon_state = "mind_device_message"
item_state = "silencer"
lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi'
var/mode = MIND_DEVICE_MESSAGE
/obj/item/device/abductor/mind_device/attack_self(mob/user)
if(!ScientistCheck(user))
return
if(mode == MIND_DEVICE_MESSAGE)
mode = MIND_DEVICE_CONTROL
icon_state = "mind_device_control"
else
mode = MIND_DEVICE_MESSAGE
icon_state = "mind_device_message"
to_chat(user, "<span class='notice'>You switch the device to [mode==MIND_DEVICE_MESSAGE? "TRANSMISSION": "COMMAND"] MODE</span>")
/obj/item/device/abductor/mind_device/afterattack(atom/target, mob/living/user, flag, params)
if(!ScientistCheck(user))
return
switch(mode)
if(MIND_DEVICE_CONTROL)
mind_control(target, user)
if(MIND_DEVICE_MESSAGE)
mind_message(target, user)
/obj/item/device/abductor/mind_device/proc/mind_control(atom/target, mob/living/user)
if(iscarbon(target))
var/mob/living/carbon/C = target
var/obj/item/organ/heart/gland/G = C.getorganslot("heart")
if(!istype(G))
to_chat(user, "<span class='warning'>Your target does not have an experimental gland!</span>")
return
if(!G.mind_control_uses)
to_chat(user, "<span class='warning'>Your target's gland is spent!</span>")
return
if(G.active_mind_control)
to_chat(user, "<span class='warning'>Your target is already under a mind-controlling influence!</span>")
return
var/command = stripped_input(user, "Enter the command for your target to follow.\
Uses Left: [G.mind_control_uses], Duration: [G.mind_control_duration / 10] seconds","Enter command")
if(!command)
return
if(QDELETED(user) || user.get_active_held_item() != src || loc != user)
return
if(QDELETED(G))
return
G.mind_control(command, user)
to_chat(user, "<span class='notice'>You send the command to your target.</span>")
/obj/item/device/abductor/mind_device/proc/mind_message(atom/target, mob/living/user)
if(isliving(target))
var/mob/living/L = target
if(L.stat == DEAD)
to_chat(user, "<span class='warning'>Your target is dead!</span>")
return
var/message = stripped_input(user, "Write a message to send to your target's brain.","Enter message")
if(!message)
return
if(QDELETED(L) || L.stat == DEAD)
return
to_chat(L, "<span class='italics'>You hear a voice in your head saying: </span><span class='abductor'>[message]</span>")
to_chat(user, "<span class='notice'>You send the message to your target.</span>")
log_talk(user,"[key_name(user)] sent an abductor mind message to [L]/[L.ckey]: '[message]'", LOGSAY)
/obj/item/device/firing_pin/abductor
name = "alien firing pin"
icon_state = "firing_pin_ayy"
@@ -299,7 +376,6 @@
pin = /obj/item/device/firing_pin/abductor
icon_state = "alienpistol"
item_state = "alienpistol"
origin_tech = "combat=4;magnets=7;powerstorage=3;abductor=3"
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
/obj/item/paper/guides/antag/abductor
@@ -346,7 +422,6 @@ Congratulations! You are now trained for invasive xenobiology research!"}
lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi'
slot_flags = SLOT_BELT
origin_tech = "materials=4;combat=4;biotech=7;abductor=4"
force = 7
w_class = WEIGHT_CLASS_NORMAL
actions_types = list(/datum/action/item_action/toggle_mode)
@@ -496,7 +571,6 @@ Congratulations! You are now trained for invasive xenobiology research!"}
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
breakouttime = 450
trashtype = /obj/item/restraints/handcuffs/energy/used
origin_tech = "materials=4;magnets=5;abductor=2"
/obj/item/restraints/handcuffs/energy/used
flags_1 = DROPDEL_1
@@ -524,7 +598,6 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/device/radio/headset/abductor
name = "alien headset"
desc = "An advanced alien headset designed to monitor communications of human space stations. Why does it have a microphone? No one knows."
origin_tech = "magnets=2;abductor=3"
icon = 'icons/obj/abductor.dmi'
icon_state = "abductor_headset"
item_state = "abductor_headset"
@@ -545,35 +618,30 @@ Congratulations! You are now trained for invasive xenobiology research!"}
name = "alien scalpel"
desc = "It's a gleaming sharp knife made out of silvery-green metal."
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/hemostat/alien
name = "alien hemostat"
desc = "You've never seen this before."
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/retractor/alien
name = "alien retractor"
desc = "You're not sure if you want the veil pulled back."
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/circular_saw/alien
name = "alien saw"
desc = "Do the aliens also lose this, and need to find an alien hatchet?"
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/surgicaldrill/alien
name = "alien drill"
desc = "Maybe alien surgeons have finally found a use for the drill."
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/cautery/alien
@@ -581,7 +649,6 @@ Congratulations! You are now trained for invasive xenobiology research!"}
desc = "Why would bloodless aliens have a tool to stop bleeding? \
Unless..."
icon = 'icons/obj/abductor.dmi'
origin_tech = "materials=2;biotech=2;abductor=2"
toolspeed = 0.25
/obj/item/clothing/head/helmet/abductor
@@ -590,7 +657,6 @@ Congratulations! You are now trained for invasive xenobiology research!"}
icon_state = "alienhelmet"
item_state = "alienhelmet"
blockTracking = 1
origin_tech = "materials=7;magnets=4;abductor=3"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
// Operating Table / Beds / Lockers
@@ -4,7 +4,6 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "gland"
status = ORGAN_ROBOTIC
origin_tech = "materials=4;biotech=7;abductor=3"
beating = TRUE
var/cooldown_low = 300
var/cooldown_high = 300
@@ -13,28 +12,68 @@
var/human_only = 0
var/active = 0
var/mind_control_uses = 1
var/mind_control_duration = 1800
var/active_mind_control = FALSE
/obj/item/organ/heart/gland/proc/ownerCheck()
if(ishuman(owner))
return 1
return TRUE
if(!human_only && iscarbon(owner))
return 1
return 0
return TRUE
return FALSE
/obj/item/organ/heart/gland/proc/Start()
active = 1
next_activation = world.time + rand(cooldown_low,cooldown_high)
/obj/item/organ/heart/gland/proc/update_gland_hud()
if(!owner)
return
var/image/holder = owner.hud_list[GLAND_HUD]
var/icon/I = icon(owner.icon, owner.icon_state, owner.dir)
holder.pixel_y = I.Height() - world.icon_size
if(active_mind_control)
holder.icon_state = "hudgland_active"
else if(mind_control_uses)
holder.icon_state = "hudgland_ready"
else
holder.icon_state = "hudgland_spent"
/obj/item/organ/heart/gland/Remove(var/mob/living/carbon/M, special = 0)
/obj/item/organ/heart/gland/proc/mind_control(command, mob/living/user)
if(!ownerCheck() || !mind_control_uses || active_mind_control)
return
mind_control_uses--
to_chat(owner, "<span class='userdanger'>You suddenly feel an irresistible compulsion to follow an order...</span>")
to_chat(owner, "<span class='mind_control'>[command]</span>")
active_mind_control = TRUE
log_admin("[key_name(user)] sent an abductor mind control message to [key_name(owner)]: [command]")
update_gland_hud()
addtimer(CALLBACK(src, .proc/clear_mind_control), mind_control_duration)
/obj/item/organ/heart/gland/proc/clear_mind_control()
if(!ownerCheck() || !active_mind_control)
return
to_chat(owner, "<span class='userdanger'>You feel the compulsion fade, and you completely forget about your previous orders.</span>")
active_mind_control = FALSE
/obj/item/organ/heart/gland/Remove(mob/living/carbon/M, special = 0)
active = 0
if(initial(uses) == 1)
uses = initial(uses)
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
hud.remove_from_hud(owner)
clear_mind_control()
..()
/obj/item/organ/heart/gland/Insert(var/mob/living/carbon/M, special = 0)
/obj/item/organ/heart/gland/Insert(mob/living/carbon/M, special = 0)
..()
if(special != 2 && uses) // Special 2 means abductor surgery
Start()
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
hud.add_to_hud(owner)
update_gland_hud()
/obj/item/organ/heart/gland/on_life()
if(!beating)
@@ -60,6 +99,8 @@
cooldown_high = 400
uses = -1
icon_state = "health"
mind_control_uses = 3
mind_control_duration = 3000
/obj/item/organ/heart/gland/heals/activate()
to_chat(owner, "<span class='notice'>You feel curiously revitalized.</span>")
@@ -72,6 +113,8 @@
cooldown_high = 1200
uses = -1
icon_state = "slime"
mind_control_uses = 1
mind_control_duration = 2400
/obj/item/organ/heart/gland/slime/activate()
to_chat(owner, "<span class='warning'>You feel nauseous!</span>")
@@ -83,11 +126,12 @@
Slime.Leader = owner
/obj/item/organ/heart/gland/mindshock
origin_tech = "materials=4;biotech=4;magnets=6;abductor=3"
cooldown_low = 300
cooldown_high = 300
uses = -1
icon_state = "mindshock"
mind_control_uses = 1
mind_control_duration = 6000
/obj/item/organ/heart/gland/mindshock/activate()
to_chat(owner, "<span class='notice'>You get a headache.</span>")
@@ -105,6 +149,8 @@
uses = -1
human_only = 1
icon_state = "species"
mind_control_uses = 5
mind_control_duration = 300
/obj/item/organ/heart/gland/pop/activate()
to_chat(owner, "<span class='notice'>You feel unlike yourself.</span>")
@@ -112,11 +158,12 @@
owner.set_species(species)
/obj/item/organ/heart/gland/ventcrawling
origin_tech = "materials=4;biotech=5;bluespace=4;abductor=3"
cooldown_low = 1800
cooldown_high = 2400
uses = 1
icon_state = "vent"
mind_control_uses = 4
mind_control_duration = 1800
/obj/item/organ/heart/gland/ventcrawling/activate()
to_chat(owner, "<span class='notice'>You feel very stretchy.</span>")
@@ -128,6 +175,8 @@
cooldown_high = 2400
uses = 1
icon_state = "viral"
mind_control_uses = 1
mind_control_duration = 1800
/obj/item/organ/heart/gland/viral/activate()
to_chat(owner, "<span class='warning'>You feel sick.</span>")
@@ -140,11 +189,12 @@
/obj/item/organ/heart/gland/emp //TODO : Replace with something more interesting
origin_tech = "materials=4;biotech=4;magnets=6;abductor=3"
cooldown_low = 900
cooldown_high = 1600
uses = 10
icon_state = "emp"
mind_control_uses = 1
mind_control_duration = 1800
/obj/item/organ/heart/gland/emp/activate()
to_chat(owner, "<span class='warning'>You feel a spike of pain in your head.</span>")
@@ -155,6 +205,8 @@
cooldown_high = 900
uses = 10
icon_state = "spider"
mind_control_uses = 2
mind_control_duration = 2400
/obj/item/organ/heart/gland/spiderman/activate()
to_chat(owner, "<span class='warning'>You feel something crawling in your skin.</span>")
@@ -168,6 +220,8 @@
icon_state = "egg"
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
mind_control_uses = 2
mind_control_duration = 1800
/obj/item/organ/heart/gland/egg/activate()
to_chat(owner, "<span class='boldannounce'>You lay an egg!</span>")
@@ -179,6 +233,8 @@
cooldown_low = 200
cooldown_high = 400
uses = -1
mind_control_uses = 1
mind_control_duration = 450
/obj/item/organ/heart/gland/bloody/activate()
owner.blood_volume -= 20
@@ -196,6 +252,8 @@
cooldown_high = 600
human_only = 1
uses = 1
mind_control_uses = 1
mind_control_duration = 600
/obj/item/organ/heart/gland/bodysnatch/activate()
to_chat(owner, "<span class='warning'>You feel something moving around inside you...</span>")
@@ -229,15 +287,16 @@
STOP_PROCESSING(SSobj, src)
for(var/mob/M in contents)
src.visible_message("<span class='warning'>[src] hatches!</span>")
M.loc = src.loc
M.forceMove(drop_location())
qdel(src)
/obj/item/organ/heart/gland/plasma
cooldown_low = 1200
cooldown_high = 1800
origin_tech = "materials=4;biotech=4;plasmatech=6;abductor=3"
uses = -1
mind_control_uses = 1
mind_control_duration = 800
/obj/item/organ/heart/gland/plasma/activate()
to_chat(owner, "<span class='warning'>You feel bloated.</span>")
@@ -48,6 +48,7 @@
dat += "<a href='?src=[REF(src)];dispense=vest'>Agent Vest</A><br>"
dat += "<a href='?src=[REF(src)];dispense=silencer'>Radio Silencer</A><br>"
dat += "<a href='?src=[REF(src)];dispense=tool'>Science Tool</A><br>"
dat += "<a href='?src=[REF(src)];dispense=mind_device'>Mental Interface Device</A><br>"
else
dat += "<span class='bad'>NO EXPERIMENT MACHINE DETECTED</span> <br>"
@@ -109,6 +110,8 @@
Dispense(/obj/item/device/abductor/gizmo)
if("vest")
Dispense(/obj/item/clothing/suit/armor/abductor/vest)
if("mind_device")
Dispense(/obj/item/device/abductor/mind_device,cost=2)
updateUsrDialog()
/obj/machinery/abductor/console/proc/TeleporterRetrieve()
@@ -4,8 +4,7 @@
desc = "A shell of swarmer that was completely powered down. It can no longer activate itself."
icon = 'icons/mob/swarmer.dmi'
icon_state = "swarmer_unactivated"
origin_tech = "bluespace=4;materials=4;programming=7"
materials = list(MAT_METAL = 10000, MAT_GLASS = 4000)
materials = list(MAT_METAL=10000, MAT_GLASS=4000)
/obj/effect/mob_spawn/swarmer
name = "unactivated swarmer"
@@ -168,9 +167,13 @@
/turf/closed/indestructible/swarmer_act()
return FALSE
/obj/swarmer_act()
/obj/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
if(resistance_flags & INDESTRUCTIBLE)
return FALSE
for(var/mob/living/L in contents)
if(!issilicon(L) && !isbrain(L))
to_chat(S, "<span class='warning'>An organism has been detected inside this object. Aborting.</span>")
return FALSE
return ..()
/obj/item/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
@@ -375,7 +375,7 @@
return
var/key_of_revenant
message_admins("Revenant ectoplasm was left undestroyed for 1 minute and is reforming into a new revenant.")
loc = get_turf(src) //In case it's in a backpack or someone's hand
forceMove(drop_location()) //In case it's in a backpack or someone's hand
revenant.forceMove(loc)
if(client_to_revive)
for(var/mob/M in GLOB.dead_mob_list)
@@ -79,7 +79,6 @@
desc = "Still it beats furiously, emanating an aura of utter hate."
icon = 'icons/obj/surgery.dmi'
icon_state = "demon_heart-on"
origin_tech = "combat=5;biotech=7"
/obj/item/organ/heart/demon/update_icon()
return //always beating visually
+62 -233
View File
@@ -1,7 +1,3 @@
/datum/game_mode
var/list/datum/mind/syndicates = list()
var/nukeops_lastname = ""
/datum/game_mode/nuclear
name = "nuclear emergency"
config_tag = "nuclear"
@@ -18,12 +14,11 @@
<span class='notice'>Crew</span>: Defend the nuclear authentication disk and ensure that it leaves with you on the emergency shuttle."
var/const/agents_possible = 5 //If we ever need more syndicate agents.
var/nukes_left = 1 // Call 3714-PRAY right now and order more nukes! Limited offer!
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
var/syndies_didnt_escape = 0 //Used for tracking if the syndies got the shuttle off of the z-level
var/list/pre_nukeops = list()
var/datum/objective_team/nuclear/nuke_team
/datum/game_mode/nuclear/pre_setup()
var/n_agents = min(round(num_players() / 10), antag_candidates.len, agents_possible)
for(var/i = 0, i < n_agents, ++i)
@@ -33,120 +28,23 @@
new_op.special_role = "Nuclear Operative"
log_game("[new_op.key] (ckey) has been selected as a nuclear operative")
return TRUE
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
/datum/game_mode/proc/update_synd_icons_added(datum/mind/synd_mind)
var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
opshud.join_hud(synd_mind.current)
set_antag_hud(synd_mind.current, "synd")
/datum/game_mode/proc/update_synd_icons_removed(datum/mind/synd_mind)
var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
opshud.leave_hud(synd_mind.current)
set_antag_hud(synd_mind.current, null)
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
/datum/game_mode/nuclear/post_setup()
var/nuke_code = random_nukecode()
var/agent_number = 1
var/datum/mind/leader = pick(pre_nukeops)
syndicates += pre_nukeops
for(var/i = 1 to pre_nukeops.len)
var/datum/mind/op = pre_nukeops[i]
forge_syndicate_objectives(op)
greet_syndicate(op)
equip_syndicate(op.current)
if(nuke_code)
op.store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
to_chat(op.current, "The nuclear authorization code is: <B>[nuke_code]</B>")
if(op == leader)
op.current.forceMove(pick(GLOB.nukeop_leader_start))
prepare_syndicate_leader(op, nuke_code)
else
op.current.forceMove(GLOB.nukeop_start[((i - 1) % GLOB.nukeop_start.len) + 1])
op.current.real_name = "[syndicate_name()] Operative #[agent_number++]"
update_synd_icons_added(op)
op.current.playsound_local(get_turf(op.current), 'sound/ambience/antag/ops.ogg',100,0)
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
if(nuke)
nuke.r_code = nuke_code
//Assign leader
var/datum/mind/leader_mind = pre_nukeops[1]
var/datum/antagonist/nukeop/L = leader_mind.add_antag_datum(/datum/antagonist/nukeop/leader)
nuke_team = L.nuke_team
//Assign the remaining operatives
for(var/i = 2 to pre_nukeops.len)
var/datum/mind/nuke_mind = pre_nukeops[i]
nuke_mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
return ..()
/datum/game_mode/proc/prepare_syndicate_leader(datum/mind/synd_mind, nuke_code)
var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
addtimer(CALLBACK(src, .proc/nuketeam_name_assign, synd_mind), 1)
synd_mind.current.real_name = "[syndicate_name()] [leader_title]"
to_chat(synd_mind.current, "<B>You are the Syndicate [leader_title] for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.</B>")
to_chat(synd_mind.current, "<B>If you feel you are not up to this task, give your ID to another operative.</B>")
to_chat(synd_mind.current, "<B>In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.</B>")
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
synd_mind.current.put_in_hands(challenge, TRUE)
var/static/id_cache = typecacheof(/obj/item/card/id)
var/list/foundIDs = typecache_filter_list(synd_mind.current.GetAllContents(), id_cache)
if(foundIDs.len)
for(var/i in 1 to foundIDs.len)
var/obj/item/card/id/ID = foundIDs[i]
ID.name = "lead agent card"
ID.access += ACCESS_SYNDICATE_LEADER
else
message_admins("Warning: Nuke Ops spawned without access to leave their spawn area!")
var/obj/item/device/radio/headset/syndicate/alt/A = locate() in synd_mind.current
if(A)
A.command = TRUE
if(nuke_code)
var/obj/item/paper/P = new
P.info = "The nuclear authorization code is: <b>[nuke_code]</b>"
P.name = "nuclear bomb code"
var/mob/living/carbon/human/H = synd_mind.current
H.put_in_hands(P, TRUE)
H.update_icons()
else
nuke_code = "code will be provided later"
return
/datum/game_mode/proc/nuketeam_name_assign(datum/mind/synd_mind)
nukeops_lastname = nukelastname(synd_mind.current)
NukeNameAssign(nukeops_lastname, syndicates)
/datum/game_mode/proc/forge_syndicate_objectives(datum/mind/syndicate)
var/datum/objective/nuclear/syndobj = new
syndobj.owner = syndicate
syndicate.objectives += syndobj
/datum/game_mode/proc/greet_syndicate(datum/mind/syndicate, you_are=1)
if(you_are)
to_chat(syndicate.current, "<span class='notice'>You are a [syndicate_name()] agent!</span>")
syndicate.announce_objectives()
/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob, telecrystals = TRUE)
synd_mob.set_species(/datum/species/human) //Plasamen burn up otherwise, and lizards are vulnerable to asimov AIs
if(telecrystals)
synd_mob.equipOutfit(/datum/outfit/syndicate)
else
synd_mob.equipOutfit(/datum/outfit/syndicate/no_crystals)
return TRUE
/datum/game_mode/nuclear/OnNukeExplosion(off_station)
..()
nukes_left--
var/obj/docking_port/mobile/Shuttle = SSshuttle.getShuttle("syndicate")
syndies_didnt_escape = (Shuttle && (Shuttle.z == ZLEVEL_CENTCOM || Shuttle.z == ZLEVEL_TRANSIT)) ? 0 : 1
nuke_off_station = off_station
/datum/game_mode/nuclear/check_win()
if (nukes_left == 0)
@@ -154,8 +52,8 @@
return ..()
/datum/game_mode/proc/are_operatives_dead()
for(var/datum/mind/operative_mind in syndicates)
if(ishuman(operative_mind.current) && (operative_mind.current.stat!=2))
for(var/datum/mind/operative_mind in get_antagonists(/datum/antagonist/nukeop))
if(ishuman(operative_mind.current) && (operative_mind.current.stat != DEAD))
return FALSE
return TRUE
@@ -164,7 +62,7 @@
return replacementmode.check_finished()
if((SSshuttle.emergency.mode == SHUTTLE_ENDGAME) || station_was_nuked)
return TRUE
if(are_operatives_dead())
if(nuke_team.operatives_dead())
var/obj/machinery/nuclearbomb/N
pass(N) //suppress unused warning
if(N.bomb_set) //snaaaaaaaaaake! It's not over yet!
@@ -172,85 +70,39 @@
..()
/datum/game_mode/nuclear/declare_completion()
var/disk_rescued = 1
for(var/obj/item/disk/nuclear/D in GLOB.poi_list)
if(!D.onCentCom())
disk_rescued = 0
break
var/crew_evacuated = (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)
if(nuke_off_station == NUKE_SYNDICATE_BASE)
SSticker.mode_result = "loss - syndicate nuked - disk secured"
to_chat(world, "<FONT size = 3><B>Humiliating Syndicate Defeat</B></FONT>")
to_chat(world, "<B>The crew of [station_name()] gave [syndicate_name()] operatives back their bomb! The syndicate base was destroyed!</B> Next time, don't lose the nuke!")
SSticker.news_report = NUKE_SYNDICATE_BASE
else if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
SSticker.mode_result = "win - syndicate nuke"
to_chat(world, "<FONT size = 3><B>Syndicate Major Victory!</B></FONT>")
to_chat(world, "<B>[syndicate_name()] operatives have destroyed [station_name()]!</B>")
SSticker.news_report = STATION_NUKED
else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time"
to_chat(world, "<FONT size = 3><B>Total Annihilation</B></FONT>")
to_chat(world, "<B>[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion.</B> Next time, don't lose the disk!")
SSticker.news_report = STATION_NUKED
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
SSticker.mode_result = "halfwin - blew wrong station"
to_chat(world, "<FONT size = 3><B>Crew Minor Victory</B></FONT>")
to_chat(world, "<B>[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].</B> Next time, don't do that!")
SSticker.news_report = NUKE_MISS
else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time"
to_chat(world, "<FONT size = 3><B>[syndicate_name()] operatives have earned Darwin Award!</B></FONT>")
to_chat(world, "<B>[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.</B> Next time, don't do that!")
SSticker.news_report = NUKE_MISS
else if ((disk_rescued || SSshuttle.emergency.mode != SHUTTLE_ENDGAME) && are_operatives_dead())
SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead"
to_chat(world, "<FONT size = 3><B>Crew Major Victory!</B></FONT>")
to_chat(world, "<B>The Research Staff has saved the disk and killed the [syndicate_name()] Operatives</B>")
SSticker.news_report = OPERATIVES_KILLED
else if (disk_rescued)
SSticker.mode_result = "loss - evacuation - disk secured"
to_chat(world, "<FONT size = 3><B>Crew Major Victory</B></FONT>")
to_chat(world, "<B>The Research Staff has saved the disk and stopped the [syndicate_name()] Operatives!</B>")
SSticker.news_report = OPERATIVES_KILLED
else if (!disk_rescued && are_operatives_dead())
SSticker.mode_result = "halfwin - evacuation - disk not secured"
to_chat(world, "<FONT size = 3><B>Neutral Victory!</B></FONT>")
to_chat(world, "<B>The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!</B>")
SSticker.news_report = OPERATIVE_SKIRMISH
else if (!disk_rescued && crew_evacuated)
SSticker.mode_result = "halfwin - detonation averted"
to_chat(world, "<FONT size = 3><B>Syndicate Minor Victory!</B></FONT>")
to_chat(world, "<B>[syndicate_name()] operatives survived the assault but did not achieve the destruction of [station_name()].</B> Next time, don't lose the disk!")
SSticker.news_report = OPERATIVE_SKIRMISH
else if (!disk_rescued && !crew_evacuated)
SSticker.mode_result = "halfwin - interrupted"
to_chat(world, "<FONT size = 3><B>Neutral Victory</B></FONT>")
to_chat(world, "<B>Round was mysteriously interrupted!</B>")
SSticker.news_report = OPERATIVE_SKIRMISH
..()
return
var result = nuke_team.get_result()
switch(result)
if(NUKE_RESULT_FLUKE)
SSticker.mode_result = "loss - syndicate nuked - disk secured"
SSticker.news_report = NUKE_SYNDICATE_BASE
if(NUKE_RESULT_NUKE_WIN)
SSticker.mode_result = "win - syndicate nuke"
SSticker.news_report = STATION_NUKED
if(NUKE_RESULT_NOSURVIVORS)
SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time"
SSticker.news_report = STATION_NUKED
if(NUKE_RESULT_WRONG_STATION)
SSticker.mode_result = "halfwin - blew wrong station"
SSticker.news_report = NUKE_MISS
if(NUKE_RESULT_WRONG_STATION_DEAD)
SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time"
SSticker.news_report = NUKE_MISS
if(NUKE_RESULT_CREW_WIN_SYNDIES_DEAD)
SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead"
SSticker.news_report = OPERATIVES_KILLED
if(NUKE_RESULT_CREW_WIN)
SSticker.mode_result = "loss - evacuation - disk secured"
SSticker.news_report = OPERATIVES_KILLED
if(NUKE_RESULT_DISK_LOST)
SSticker.mode_result = "halfwin - evacuation - disk not secured"
SSticker.news_report = OPERATIVE_SKIRMISH
if(NUKE_RESULT_DISK_STOLEN)
SSticker.mode_result = "halfwin - detonation averted"
SSticker.news_report = OPERATIVE_SKIRMISH
else
SSticker.mode_result = "halfwin - interrupted"
SSticker.news_report = OPERATIVE_SKIRMISH
return ..()
/datum/game_mode/nuclear/generate_report()
return "One of Central Command's trading routes was recently disrupted by a raid carried out by the Gorlex Marauders. They seemed to only be after one ship - a highly-sensitive \
@@ -258,48 +110,16 @@
can activate this explosive is on your station. Ensure that it is protected at all times, and remain alert for possible intruders."
/datum/game_mode/proc/auto_declare_completion_nuclear()
if( syndicates.len || (SSticker && istype(SSticker.mode, /datum/game_mode/nuclear)) )
var/text = "<br><FONT size=3><B>The syndicate operatives were:</B></FONT>"
var/purchases = ""
var/TC_uses = 0
for(var/datum/mind/syndicate in syndicates)
text += printplayer(syndicate)
for(var/datum/component/uplink/H in GLOB.uplinks)
if(H.purchase_log)
purchases += H.purchase_log.generate_render()
else
stack_trace("WARNING: Uplink with no purchase_log in nuclear mode! Owner: [H.owner]")
text += "<br>"
text += "(Syndicates used [TC_uses] TC) [purchases]"
if(TC_uses == 0 && station_was_nuked && !are_operatives_dead())
text += "<BIG>[icon2html('icons/badass.dmi', world, "badass")]</BIG>"
to_chat(world, text)
var/list/nuke_teams = list()
for(var/datum/antagonist/nukeop/N in GLOB.antagonists) //collect all nuke teams
nuke_teams |= N.nuke_team
for(var/datum/objective_team/nuclear/nuke_team in nuke_teams)
nuke_team.roundend_display()
return TRUE
/proc/nukelastname(mob/M) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
var/randomname = pick(GLOB.last_names)
var/newname = copytext(sanitize(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
if (!newname)
newname = randomname
else
if (newname == "Unknown" || newname == "floor" || newname == "wall" || newname == "rwall" || newname == "_")
to_chat(M, "That name is reserved.")
return nukelastname(M)
return capitalize(newname)
/proc/NukeNameAssign(lastname,list/syndicates)
for(var/datum/mind/synd_mind in syndicates)
var/mob/living/carbon/human/H = synd_mind.current
synd_mind.name = H.dna.species.random_name(H.gender,0,lastname)
synd_mind.current.real_name = synd_mind.name
return
/proc/is_nuclear_operative(mob/M)
return M && istype(M) && M.mind && SSticker && SSticker.mode && M.mind in SSticker.mode.syndicates
return M && istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/nukeop)
/datum/outfit/syndicate
name = "Syndicate Operative - Basic"
@@ -315,15 +135,24 @@
backpack_contents = list(/obj/item/storage/box/syndie=1)
var/tc = 25
var/command_radio = FALSE
/datum/outfit/syndicate/leader
name = "Syndicate Leader - Basic"
id = /obj/item/card/id/syndicate/nuke_leader
r_hand = /obj/item/device/nuclear_challenge
command_radio = TRUE
/datum/outfit/syndicate/no_crystals
tc = 0
/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H)
var/obj/item/device/radio/R = H.ears
R.set_frequency(GLOB.SYND_FREQ)
R.freqlock = 1
if(command_radio)
R.command = TRUE
if(tc)
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
+4 -4
View File
@@ -77,16 +77,16 @@
icon = 'icons/obj/machines/nuke_terminal.dmi'
icon_state = "nuclearbomb_base"
anchored = TRUE //stops it being moved
use_tag = TRUE
/obj/machinery/nuclearbomb/syndicate
use_tag = TRUE
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb
/obj/machinery/nuclearbomb/syndicate/get_cinematic_type(off_station)
var/datum/game_mode/nuclear/NM = SSticker.mode
switch(off_station)
if(0)
if(istype(NM) && NM.syndies_didnt_escape)
if(istype(NM) && !NM.nuke_team.syndies_escaped())
return CINEMATIC_ANNIHILATION
else
return CINEMATIC_NUKE_WIN
@@ -353,7 +353,7 @@
var/N = text2num(user_input)
if(!N)
return
timer_set = Clamp(N,minimum_timer_set,maximum_timer_set)
timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set)
. = TRUE
if("safety")
if(auth && yes_code)
@@ -572,4 +572,4 @@ This is here to make the tiles around the station mininuke change when it's arme
user.visible_message("<span class='suicide'>[user] is pretending to go delta! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/machines/alarm.ogg', 30, -1, 1)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
return MANUAL_SUICIDE
return MANUAL_SUICIDE
+2 -2
View File
@@ -71,9 +71,9 @@
target = null
var/list/possible_targets = list()
var/turf/here = get_turf(src)
for(var/V in SSticker.mode.syndicates)
for(var/V in get_antagonists(/datum/antagonist/nukeop))
var/datum/mind/M = V
if(M.current && M.current.stat != DEAD)
if(ishuman(M.current) && M.current.stat != DEAD)
possible_targets |= M.current
var/mob/living/closest_operative = get_closest_atom(/mob/living/carbon/human, possible_targets, here)
if(closest_operative)
+11 -23
View File
@@ -194,10 +194,8 @@
/datum/objective/debrain/check_completion()
if(!target)//If it's a free objective.
return TRUE
if(!target.current || !isbrain(target.current))
return FALSE
var/atom/A = target.current
var/list/datum/mind/owners = get_owners()
@@ -508,12 +506,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/download
/datum/objective/download/proc/gen_amount_goal()
target_amount = rand(10,20)
explanation_text = "Download [target_amount] research level\s."
target_amount = rand(20,40)
explanation_text = "Download [target_amount] research node\s."
return target_amount
/datum/objective/download/check_completion()
var/list/current_tech = list()
var/datum/techweb/checking = new
var/list/datum/mind/owners = get_owners()
for(var/datum/mind/owner in owners)
if(ismob(owner.current))
@@ -522,21 +520,11 @@ GLOBAL_LIST_EMPTY(possible_items_special)
var/mob/living/carbon/human/H = M
if(H && (H.stat != DEAD) && istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
var/obj/item/clothing/suit/space/space_ninja/S = H.wear_suit
for(var/datum/tech/T in S.stored_research)
current_tech[T.id] = T.level? T.level : 0
S.stored_research.copy_research_to(checking)
var/list/otherwise = M.GetAllContents()
for(var/obj/item/disk/tech_disk/TD in otherwise)
for(var/datum/tech/T in TD.tech_stored)
if(!T.id || !T.level)
continue
else if(!current_tech[T.id])
current_tech[T.id] = T.level
else if(T.level > current_tech[T.id])
current_tech[T.id] = T.level
var/total = 0
for(var/i in current_tech)
total += current_tech[i]
return total >= target_amount
TD.stored_research.copy_research_to(checking)
return checking.researched_nodes.len >= target
/datum/objective/capture
@@ -787,7 +775,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/changeling_team_objective/impersonate_department/check_completion()
if(!department_real_names.len || !department_minds.len)
return 1 //Something fucked up, give them a win
return TRUE //Something fucked up, give them a win
var/list/check_names = department_real_names.Copy()
@@ -799,14 +787,14 @@ GLOBAL_LIST_EMPTY(possible_items_special)
if(M.current)
var/turf/mloc = get_turf(M.current)
if(mloc.onCentCom() && (M.current.stat != DEAD))
return 0 //A Non-ling living target got to centcom, fail
return FALSE //A Non-ling living target got to centcom, fail
//Check each staff member has been replaced, by cross referencing changeling minds, changeling current dna, the staff minds and their original DNA names
var/success = 0
changelings:
for(var/datum/mind/changeling in get_antagonists(/datum/antagonist/changeling,TRUE))
if(success >= department_minds.len) //We did it, stop here!
return 1
return TRUE
if(ishuman(changeling.current))
var/mob/living/carbon/human/H = changeling.current
var/turf/cloc = get_turf(changeling.current)
@@ -818,8 +806,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
continue changelings
if(success >= department_minds.len)
return 1
return 0
return TRUE
return FALSE
+9 -10
View File
@@ -137,7 +137,6 @@
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
origin_tech = "bluespace=4;materials=4"
w_class = WEIGHT_CLASS_TINY
var/list/spooky_scaries = list()
var/unlimited = 0
@@ -214,7 +213,7 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
var/mob/living/carbon/human/target = null
var/list/mob/living/carbon/human/possible = list()
var/obj/item/link = null
var/obj/item/linked_item = null
var/cooldown_time = 30 //3s
var/cooldown = 0
max_integrity = 10
@@ -238,10 +237,10 @@
cooldown = world.time +cooldown_time
return
if(!link)
if(!linked_item)
if(I.loc == user && istype(I) && I.w_class <= WEIGHT_CLASS_SMALL)
if (user.transferItemToLoc(I,src))
link = I
linked_item = I
to_chat(user, "You attach [I] to the doll.")
update_targets()
@@ -256,11 +255,11 @@
return
if(user.zone_selected == "chest")
if(link)
if(linked_item)
target = null
link.loc = get_turf(src)
to_chat(user, "<span class='notice'>You remove the [link] from the doll.</span>")
link = null
linked_item.forceMove(drop_location())
to_chat(user, "<span class='notice'>You remove the [linked_item] from the doll.</span>")
linked_item = null
update_targets()
return
@@ -292,10 +291,10 @@
/obj/item/voodoo/proc/update_targets()
possible = list()
if(!link)
if(!linked_item)
return
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(md5(H.dna.uni_identity) in link.fingerprints)
if(md5(H.dna.uni_identity) in linked_item.fingerprints)
possible |= H
/obj/item/voodoo/proc/GiveHint(mob/victim,force=0)
-1
View File
@@ -9,7 +9,6 @@
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefact's power."
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_BELT
origin_tech = "bluespace=4;materials=5"
var/usability = 0
var/reusable = TRUE
+4 -9
View File
@@ -14,9 +14,8 @@
/obj/machinery/bluespace_beacon/Initialize()
. = ..()
var/turf/T = loc
Beacon = new /obj/item/device/radio/beacon
Beacon = new(T)
Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.loc = T
hide(T.intact)
@@ -42,13 +41,9 @@
/obj/machinery/bluespace_beacon/process()
if(!Beacon)
var/turf/T = loc
Beacon = new /obj/item/device/radio/beacon
Beacon = new(T)
Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.forceMove(T)
if(Beacon)
if(Beacon.loc != loc)
Beacon.forceMove(loc)
else if (Beacon.loc != loc)
Beacon.forceMove(loc)
updateicon()
+1 -1
View File
@@ -134,7 +134,7 @@
return
if(storedpda)
storedpda.loc = get_turf(src.loc)
storedpda.forceMove(drop_location())
storedpda = null
update_icon()
else
+25 -25
View File
@@ -27,7 +27,7 @@
var/prod_coeff = 1
var/datum/design/being_built
var/datum/research/files
var/datum/techweb/stored_research
var/list/datum/design/matching_designs
var/selected_category
var/screen = 1
@@ -50,7 +50,7 @@
. = ..()
wires = new /datum/wires/autolathe(src)
files = new /datum/research/autolathe(src)
stored_research = new /datum/techweb/specialized/autounlocking/autolathe
matching_designs = list()
/obj/machinery/autolathe/Destroy()
@@ -85,7 +85,7 @@
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
if (busy)
to_chat(user, "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>")
return 1
return TRUE
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
updateUsrDialog()
@@ -97,16 +97,16 @@
if(panel_open)
if(istype(O, /obj/item/crowbar))
default_deconstruction_crowbar(O)
return 1
return TRUE
else if(is_wire_tool(O))
wires.interact(user)
return 1
return TRUE
if(user.a_intent == INTENT_HARM) //so we can hit the machine
return ..()
if(stat)
return 1
return TRUE
if(istype(O, /obj/item/disk/design_disk))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
@@ -117,10 +117,9 @@
if(do_after(user, 14.4, target = src))
for(var/B in D.blueprints)
if(B)
files.AddDesign2Known(B)
stored_research.add_design(B)
busy = FALSE
return 1
return TRUE
return ..()
@@ -154,7 +153,7 @@
/////////////////
//href protection
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
being_built = stored_research.isDesignResearchedID(href_list["make"])
if(!being_built)
return
@@ -207,8 +206,8 @@
if(href_list["search"])
matching_designs.Cut()
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(findtext(D.name,href_list["to_search"]))
matching_designs.Add(D)
updateUsrDialog()
@@ -261,8 +260,8 @@
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
dat += materials_printout()
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category))
continue
@@ -328,16 +327,16 @@
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
if(D.make_reagents.len)
return 0
return FALSE
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
GET_COMPONENT(materials, /datum/component/material_container)
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return 0
return FALSE
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
return 0
return 1
return FALSE
return TRUE
/obj/machinery/autolathe/proc/get_design_cost(datum/design/D)
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
@@ -362,25 +361,26 @@
/obj/machinery/autolathe/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
return FALSE
if(!prob(prb))
return 0
return FALSE
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7, TRUE))
return 1
return TRUE
else
return 0
return FALSE
/obj/machinery/autolathe/proc/adjust_hacked(state)
hacked = state
for(var/datum/design/D in files.possible_designs)
for(var/id in SSresearch.techweb_designs)
var/datum/design/D = SSresearch.techweb_designs[id]
if((D.build_type & AUTOLATHE) && ("hacked" in D.category))
if(hacked)
files.AddDesign2Known(D)
stored_research.add_design(D)
else
files.known_designs -= D.id
stored_research.remove_design(D)
/obj/machinery/autolathe/hacked/Initialize()
. = ..()
+1 -1
View File
@@ -22,7 +22,7 @@
if(!QDELETED(C))
qdel(circuit)
circuit = C
C.loc = null
C.moveToNullspace()
/obj/machinery/computer/Destroy()
QDEL_NULL(circuit)
+2 -2
View File
@@ -161,7 +161,7 @@
return
log_activity("changed greater than charge filter to \"[new_filter]\"")
if(new_filter)
new_filter = Clamp(new_filter, 0, 100)
new_filter = CLAMP(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
result_filters["Charge Above"] = new_filter
if(href_list["below_filter"])
@@ -171,7 +171,7 @@
return
log_activity("changed lesser than charge filter to \"[new_filter]\"")
if(new_filter)
new_filter = Clamp(new_filter, 0, 100)
new_filter = CLAMP(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
result_filters["Charge Below"] = new_filter
if(href_list["access_filter"])
@@ -211,7 +211,7 @@
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)
target = CLAMP(target, 0, 50 * ONE_ATMOSPHERE)
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
. = TRUE
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
@@ -154,7 +154,10 @@
if(!isturf(eye_user.loc))
return
T = get_turf(T)
loc = T
if (T)
forceMove(T)
else
moveToNullspace()
if(use_static)
GLOB.cameranet.visibility(src)
if(visible_icon)
+17 -17
View File
@@ -337,12 +337,12 @@
if(!num)
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)
if(num)
radduration = Wrap(num, 1, RADIATION_DURATION_MAX+1)
radduration = WRAP(num, 1, RADIATION_DURATION_MAX+1)
if("setstrength")
if(!num)
num = round(input(usr, "Choose pulse strength:", "Input an Integer", null) as num|null)
if(num)
radstrength = Wrap(num, 1, RADIATION_STRENGTH_MAX+1)
radstrength = WRAP(num, 1, RADIATION_STRENGTH_MAX+1)
if("screen")
current_screen = href_list["text"]
if("rejuv")
@@ -353,13 +353,13 @@
if("setbufferlabel")
var/text = sanitize(input(usr, "Input a new label:", "Input an Text", null) as text|null)
if(num && text)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot["label"] = text
if("setbuffer")
if(num && viable_occupant)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = list(
"label"="Buffer[num]:[viable_occupant.real_name]",
"UI"=viable_occupant.dna.uni_identity,
@@ -370,7 +370,7 @@
)
if("clearbuffer")
if(num)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot.Cut()
@@ -387,7 +387,7 @@
apply_buffer(SCANNER_ACTION_MIXED,num)
if("injector")
if(num && injectorready < world.time)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
var/obj/item/dnainjector/timed/I
@@ -405,7 +405,6 @@
powers -= 1 //To prevent just unlocking everything to get all powers to a syringe for max tech
else
I.remove_mutations.Add(HM)
I.origin_tech = "biotech=2;engineering=[max(1,min(6,powers))]" //With 6 powers available this tech level will be 1-6, also safety check if new powers get added
var/time_coeff
for(var/datum/mutation/human/HM in I.add_mutations)
if(!time_coeff)
@@ -437,11 +436,11 @@
injectorready = world.time + INJECTOR_TIMEOUT
if("loaddisk")
if(num && diskette && diskette.fields)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = diskette.fields.Copy()
if("savedisk")
if(num && diskette && !diskette.read_only)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
diskette.name = "data disk \[[buffer_slot["label"]]\]"
@@ -455,8 +454,8 @@
delayed_action = list("action"=text2num(href_list["delayaction"]),"buffer"=num)
if("pulseui","pulsese")
if(num && viable_occupant && connected)
radduration = Wrap(radduration, 1, RADIATION_DURATION_MAX+1)
radstrength = Wrap(radstrength, 1, RADIATION_STRENGTH_MAX+1)
radduration = WRAP(radduration, 1, RADIATION_DURATION_MAX+1)
radstrength = WRAP(radstrength, 1, RADIATION_STRENGTH_MAX+1)
var/locked_state = connected.locked
connected.locked = TRUE
@@ -472,7 +471,7 @@
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)
num = Wrap(num, 1, len+1)
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
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
@@ -488,7 +487,7 @@
viable_occupant.updateappearance(mutations_overlay_update=1)
if("pulsese")
var/len = length(viable_occupant.dna.struc_enzymes)
num = Wrap(num, 1, len+1)
num = WRAP(num, 1, len+1)
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len)
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
@@ -519,10 +518,11 @@
ran = round(ran) //negative, so floor it
else
ran = -round(-ran) //positive, so ceiling it
return num2hex(Wrap(hex2num(input)+ran, 0, 16**length), length)
return num2hex(WRAP(hex2num(input)+ran, 0, 16**length), length)
/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position_we_were_supposed_to_hit, radduration, number_of_blocks)
return Wrap(round(position_we_were_supposed_to_hit + gaussian(0, RADIATION_ACCURACY_MULTIPLIER/radduration), 1), 1, number_of_blocks+1)
/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position, radduration, number_of_blocks)
var/val = round(gaussian(0, RADIATION_ACCURACY_MULTIPLIER/radduration) + position, 1)
return WRAP(val, 1, number_of_blocks+1)
/obj/machinery/computer/scan_consolenew/proc/get_viable_occupant()
var/mob/living/carbon/viable_occupant = null
@@ -533,7 +533,7 @@
return viable_occupant
/obj/machinery/computer/scan_consolenew/proc/apply_buffer(action,buffer_num)
buffer_num = Clamp(buffer_num, 1, NUMBER_OF_BUFFERS)
buffer_num = CLAMP(buffer_num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[buffer_num]
var/mob/living/carbon/viable_occupant = get_viable_occupant()
if(istype(buffer_slot))
@@ -106,7 +106,7 @@
return
if(!new_goal)
new_goal = default_goal
id.goal = Clamp(new_goal, 0, 1000) //maximum 1000 points
id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
if("toggle_open")
if(teleporter.locked)
to_chat(usr, "The teleporter is locked")
+1 -2
View File
@@ -46,8 +46,7 @@
screen = 2
spark_system.set_up(5, 0, src)
src.spark_system.start()
var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
MK.loc = src.loc
var/obj/item/paper/monitorkey/MK = new(loc)
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>%@%(*$%&(&?*(%&/{}</font>"
var/time = 100 * length(src.linkedServer.decryptkey)
+1 -1
View File
@@ -100,7 +100,7 @@
else if(inserted_id)
switch(href_list["id"])
if("eject")
inserted_id.loc = get_turf(src)
inserted_id.forceMove(drop_location())
inserted_id.verb_pickup()
inserted_id = null
if("reset")
@@ -51,7 +51,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
/obj/machinery/computer/telecrystals/uplinker/proc/ejectuplink()
if(uplinkholder)
uplinkholder.loc = get_turf(src.loc)
uplinkholder.forceMove(drop_location())
uplinkholder = null
update_icon()
@@ -154,8 +154,11 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
..()
var/danger = GLOB.joined_player_list.len - SSticker.mode.syndicates.len
danger = Ceiling(danger, 10)
var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
var/danger = GLOB.joined_player_list.len - nukeops.len
// var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
// var/danger = GLOB.joined_player_list.len - nukeops.len
danger = CEILING(danger, 10)
scaleTC(danger)
/obj/machinery/computer/telecrystals/boss/proc/scaleTC(amt)//Its own proc, since it'll probably need a lot of tweaks for balance, use a fancier algorhithm, etc.
@@ -223,4 +226,4 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
src.updateUsrDialog()
return
#undef NUKESCALINGMODIFIER
#undef NUKESCALINGMODIFIER
+5 -5
View File
@@ -157,15 +157,15 @@
if(istype(P, /obj/item/crowbar))
playsound(src.loc, P.usesound, 50, 1)
state = 2
circuit.loc = src.loc
circuit.forceMove(drop_location())
components.Remove(circuit)
circuit = null
if(components.len == 0)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
else
to_chat(user, "<span class='notice'>You remove the circuit board and other components.</span>")
for(var/atom/movable/A in components)
A.loc = src.loc
for(var/atom/movable/AM in components)
AM.forceMove(drop_location())
desc = initial(desc)
req_components = null
components = null
@@ -186,9 +186,9 @@
qdel(O)
new_machine.component_parts = list()
for(var/obj/O in src)
O.loc = null
O.moveToNullspace()
new_machine.component_parts += O
circuit.loc = null
circuit.moveToNullspace()
new_machine.RefreshParts()
qdel(src)
return
+2
View File
@@ -459,6 +459,8 @@
var/sound/song_played = sound(selection.song_path)
for(var/mob/M in range(10,src))
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
continue
if(!(M in rangers))
rangers[M] = TRUE
M.playsound_local(get_turf(M), null, 100, channel = CHANNEL_JUKEBOX, S = song_played)
+1 -1
View File
@@ -33,7 +33,7 @@
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = Clamp(obj_integrity + 20, 0, max_integrity)
obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
else
return ..()
+2 -2
View File
@@ -1036,7 +1036,7 @@
panel_open = TRUE
update_icon(AIRLOCK_OPENING)
visible_message("<span class='warning'>[src]'s panel is blown off in a spray of deadly shrapnel!</span>")
charge.loc = get_turf(src)
charge.forceMove(drop_location())
charge.ex_act(EXPLODE_DEVASTATE)
detonated = 1
charge = null
@@ -1340,7 +1340,7 @@
else
ae = electronics
electronics = null
ae.loc = src.loc
ae.forceMove(drop_location())
qdel(src)
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
+1 -1
View File
@@ -142,7 +142,7 @@
. /= 10
/obj/machinery/door_timer/proc/set_timer(value)
var/new_time = Clamp(value,0,MAX_TIMER)
var/new_time = CLAMP(value,0,MAX_TIMER)
. = new_time == timer_duration //return 1 on no change
timer_duration = new_time
+2 -2
View File
@@ -275,7 +275,7 @@
else
ae = electronics
electronics = null
ae.loc = src.loc
ae.forceMove(drop_location())
qdel(src)
return
@@ -495,4 +495,4 @@
/obj/machinery/door/window/brigdoor/security/holding/southright
dir = SOUTH
icon_state = "rightsecure"
base_state = "rightsecure"
base_state = "rightsecure"
+30 -4
View File
@@ -7,8 +7,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
icon_state = "tdoppler"
density = TRUE
anchored = TRUE
var/integrated = 0
var/max_dist = 100
var/integrated = FALSE
var/max_dist = 150
verb_say = "states coldly"
/obj/machinery/doppler_array/Initialize()
@@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
"Epicenter at: grid ([epicenter.x],[epicenter.y]). Temporal displacement of tachyons: [took] seconds.", \
"Factual: Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range].")
// If the bomb was capped, say it's theoretical size.
// If the bomb was capped, say its theoretical size.
if(devastation_range < orig_dev_range || heavy_impact_range < orig_heavy_range || light_impact_range < orig_light_range)
messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]."
@@ -107,6 +107,32 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
//Portable version, built into EOD equipment. It simply provides an explosion's three damage levels.
/obj/machinery/doppler_array/integrated
name = "integrated tachyon-doppler module"
integrated = 1
integrated = TRUE
max_dist = 21 //Should detect most explosions in hearing range.
use_power = NO_POWER_USE
/obj/machinery/doppler_array/research
name = "tachyon-dopplar research array"
desc = "A specialized tacyhon-dopplar bomb detection array that uses the results of the highest yield of explosions for research."
var/datum/techweb/linked_techweb
/obj/machinery/doppler_array/research/sense_explosion(turf/epicenter, dev, heavy, light, time, orig_dev, orig_heavy, orig_light) //probably needs a way to ignore admin explosives later on
. = ..()
if(!istype(linked_techweb))
say("Warning: No linked research system!")
return
var/point_gain = techweb_scale_bomb(orig_light - 20 - linked_techweb.max_bomb_value)
if(!point_gain)
return
linked_techweb.max_bomb_value = orig_light - 20
linked_techweb.research_points += point_gain
say("Gained [point_gain] points from explosion dataset.")
/obj/machinery/doppler_array/research/science
/obj/machinery/doppler_array/research/science/Initialize()
. = ..()
linked_techweb = SSresearch.science_tech
/proc/techweb_scale_bomb(lightradius)
return (lightradius ** 0.5) * 13000
+1 -1
View File
@@ -237,7 +237,7 @@
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
frame.loc = user.loc
frame.forceMove(user.drop_location())
playsound(src.loc, W.usesound, 50, 1)
qdel(src)
return
-1
View File
@@ -164,7 +164,6 @@ The console is located at computer/gulag_teleporter.dm
/obj/item/circuitboard/machine/gulag_teleporter
name = "labor camp teleporter (Machine Board)"
build_path = /obj/machinery/gulag_teleporter
origin_tech = "programming=3;engineering=4;bluespace=4;materials=4"
req_components = list(
/obj/item/ore/bluespace_crystal = 2,
/obj/item/stock_parts/scanning_module,
+5 -5
View File
@@ -75,7 +75,7 @@ Possible to do for anyone motivated enough:
replay_stop()
if(record_mode)
record_stop()
QDEL_NULL(disk)
holopads -= src
@@ -256,12 +256,12 @@ Possible to do for anyone motivated enough:
temp = ""
if(outgoing_call)
outgoing_call.Disconnect()
else if(href_list["disk_eject"])
if(disk && !replay_mode)
disk.forceMove(drop_location())
disk = null
else if(href_list["replay_stop"])
replay_stop()
else if(href_list["replay_start"])
@@ -424,7 +424,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(masters[user])
var/obj/effect/overlay/holo_pad_hologram/H = masters[user]
step_to(H, new_turf)
H.loc = new_turf
H.forceMove(new_turf)
var/area/holo_area = get_area(src)
var/area/eye_area = new_turf.loc
@@ -505,7 +505,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
current_delay += entry[2]
var/time_delta = world.time - record_start - current_delay
if(time_delta >= 1)
disk.record.entries += list(list(HOLORECORD_DELAY,time_delta))
disk.record.entries += list(list(HOLORECORD_SAY,message))
-1
View File
@@ -242,7 +242,6 @@
icon_state = "blpad-remote"
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
origin_tech = "materials=3;magnets=2;bluespace=4;syndicate=3"
var/sending = TRUE
var/obj/machinery/launchpad/briefcase/pad
+7 -7
View File
@@ -22,7 +22,7 @@
var/busy = FALSE
var/prod_coeff = 1
var/datum/design/being_built
var/datum/research/files
var/datum/techweb/stored_research
var/selected_category
var/screen = 1
var/list/categories = list(
@@ -35,7 +35,7 @@
/obj/machinery/limbgrower/Initialize()
. = ..()
create_reagents(0)
files = new /datum/research/limbgrower(src)
stored_research = new /datum/techweb/specialized/autounlocking/limbgrower
/obj/machinery/limbgrower/interact(mob/user)
if(!is_operational())
@@ -95,7 +95,7 @@
/////////////////
//href protection
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
being_built = stored_research.isDesignResearchedID(href_list["make"]) //check if it's a valid design
if(!being_built)
return
@@ -180,8 +180,8 @@
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
dat += materials_printout()
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category))
continue
if(disabled || !can_build(D))
@@ -222,8 +222,8 @@
/obj/machinery/limbgrower/emag_act(mob/user)
if(emagged)
return
for(var/datum/design/D in files.possible_designs)
for(var/datum/design/D in SSresearch.techweb_designs)
if((D.build_type & LIMBGROWER) && ("special" in D.category))
files.AddDesign2Known(D)
stored_research.add_design(D)
to_chat(user, "<span class='warning'>A warning flashes onto the screen, stating that safety overrides have been deactivated!</span>")
emagged = TRUE
+2 -2
View File
@@ -780,7 +780,7 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/machinery/newscaster/proc/AttachPhoto(mob/user)
if(photo)
if(!photo.sillynewscastervar)
photo.loc = loc
photo.forceMove(drop_location())
if(!issilicon(user))
user.put_in_inactive_hand(photo)
else
@@ -856,7 +856,7 @@ GLOBAL_LIST_EMPTY(allCasters)
NEWSPAPER.wantedBody = GLOB.news_network.wanted_issue.body
if(GLOB.news_network.wanted_issue.img)
NEWSPAPER.wantedPhoto = GLOB.news_network.wanted_issue.img
NEWSPAPER.loc = get_turf(src)
NEWSPAPER.forceMove(drop_location())
NEWSPAPER.creationTime = GLOB.news_network.lastAction
paper_remaining--
+2 -2
View File
@@ -53,9 +53,9 @@
new /obj/item/pipe_meter(loc)
wait = world.time + 15
if(href_list["layer_up"])
piping_layer = Clamp(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
piping_layer = CLAMP(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
if(href_list["layer_down"])
piping_layer = Clamp(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
piping_layer = CLAMP(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
return
/obj/machinery/pipedispenser/attackby(obj/item/W, mob/user, params)
+3 -2
View File
@@ -10,6 +10,7 @@
circuit = /obj/item/circuitboard/machine/recharger
var/obj/item/charging = null
var/recharge_coeff = 1
var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy,
/obj/item/melee/baton,
@@ -78,7 +79,7 @@
add_fingerprint(user)
if(charging)
charging.update_icon()
charging.loc = loc
charging.forceMove(drop_location())
user.put_in_hands(charging)
charging = null
use_power = IDLE_POWER_USE
@@ -90,7 +91,7 @@
/obj/machinery/recharger/attack_tk(mob/user)
if(charging)
charging.update_icon()
charging.loc = loc
charging.forceMove(drop_location())
charging = null
use_power = IDLE_POWER_USE
update_icon()
+1 -1
View File
@@ -137,7 +137,7 @@ Please wait until completion...</TT><BR>
spawn (build_time)
if (!isnull(src.being_built))
src.being_built.loc = get_turf(src)
src.being_built.forceMove(drop_location())
src.being_built = null
src.use_power = IDLE_POWER_USE
operating = FALSE
+1 -1
View File
@@ -256,7 +256,7 @@
use_stored_power(50)
/obj/machinery/shieldwallgen/proc/use_stored_power(amount)
power = Clamp(power - amount, 0, maximum_stored_power)
power = CLAMP(power - amount, 0, maximum_stored_power)
update_activity()
/obj/machinery/shieldwallgen/proc/update_activity()
+3 -3
View File
@@ -121,7 +121,7 @@
settableTemperatureRange = cap * 30
efficiency = (cap + 1) * 10000
targetTemperature = Clamp(targetTemperature,
targetTemperature = CLAMP(targetTemperature,
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
@@ -223,12 +223,12 @@
target= text2num(target) + T0C
. = TRUE
if(.)
targetTemperature = Clamp(round(target),
targetTemperature = CLAMP(round(target),
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
if("eject")
if(panel_open && cell)
cell.loc = get_turf(src)
cell.forceMove(drop_location())
cell = null
. = TRUE
-3
View File
@@ -109,7 +109,6 @@
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
desc = "A label on it reads: <i>Warning: Activating this device will send a special beacon to your location</i>."
origin_tech = "bluespace=6;syndicate=5"
w_class = WEIGHT_CLASS_SMALL
var/droptype = /obj/machinery/power/singularity_beacon/syndicate
@@ -125,9 +124,7 @@
/obj/item/device/sbeacondrop/bomb
desc = "A label on it reads: <i>Warning: Activating this device will send a high-ordinance explosive to your location</i>."
droptype = /obj/machinery/syndicatebomb
origin_tech = "bluespace=5;syndicate=5"
/obj/item/device/sbeacondrop/powersink
desc = "A label on it reads: <i>Warning: Activating this device will send a power draining device to your location</i>."
droptype = /obj/item/device/powersink
origin_tech = "bluespace=4;syndicate=5"
+1 -6
View File
@@ -205,7 +205,7 @@
/obj/machinery/syndicatebomb/proc/settings(mob/user)
var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
timer_set = Clamp(new_timer, minimum_timer, maximum_timer)
timer_set = CLAMP(new_timer, minimum_timer, maximum_timer)
loc.visible_message("<span class='notice'>[icon2html(src, viewers(src))] timer set for [timer_set] seconds.</span>")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
if(defused || active)
@@ -274,7 +274,6 @@
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "syndicate=5;combat=6"
resistance_flags = FLAMMABLE //Burnable (but the casing isn't)
var/adminlog = null
var/range_heavy = 3
@@ -308,7 +307,6 @@
/obj/item/bombcore/training
name = "dummy payload"
desc = "A Nanotrasen replica of a syndicate payload. Its not intended to explode but to announce that it WOULD have exploded, then rewire itself to allow for more training."
origin_tech = null
var/defusals = 0
var/attempts = 0
@@ -347,7 +345,6 @@
/obj/item/bombcore/badmin
name = "badmin payload"
desc = "If you're seeing this someone has either made a mistake or gotten dangerously savvy with var editing!"
origin_tech = null
/obj/item/bombcore/badmin/defuse() //because we wouldn't want them being harvested by players
var/obj/machinery/syndicatebomb/B = loc
@@ -390,7 +387,6 @@
/obj/item/bombcore/chemical
name = "chemical payload"
desc = "An explosive payload designed to spread chemicals, dangerous or otherwise, across a large area. Properties of the core may vary with grenade casing type, and must be loaded before use."
origin_tech = "combat=4;materials=3"
icon_state = "chemcore"
var/list/beakers = list()
var/max_beakers = 1 // Read on about grenade casing properties below
@@ -522,7 +518,6 @@
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
origin_tech = "syndicate=3"
var/timer = 0
var/detonated = 0
var/existant = 0
+2 -4
View File
@@ -57,7 +57,7 @@
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
if((transform_standing || H.lying) && move_dir == EAST)// || move_dir == WEST)
AM.loc = src.loc
AM.forceMove(drop_location())
do_transform(AM)
/obj/machinery/transformer/CanPass(atom/movable/mover, turf/target)
@@ -98,9 +98,7 @@
use_power(5000) // Use a lot of power.
var/mob/living/silicon/robot/R = H.Robotize()
R.cell.maxcharge = robot_cell_charge
R.cell.charge = robot_cell_charge
R.cell = new /obj/item/stock_parts/cell/upgraded/plus(R, robot_cell_charge)
// So he can't jump out the gate right away.
R.SetLockdown()
+5 -1
View File
@@ -79,6 +79,7 @@
last_slogan = world.time + rand(0, slogan_delay)
power_change()
/obj/machinery/vending/Destroy()
QDEL_NULL(wires)
QDEL_NULL(coin)
@@ -174,7 +175,7 @@
for(var/datum/data/vending_product/machine_content in machine)
if(refill.charges[charge_type] == 0)
break
var/restock = Ceiling(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges)
var/restock = CEILING(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges, 1)
if(restock > refill.charges[charge_type])
restock = refill.charges[charge_type]
machine_content.amount += restock
@@ -1189,6 +1190,9 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
refill_canister = /obj/item/vending_refill/games
/obj/machinery/vending/onTransitZ()
return
#undef STANDARD_CHARGE
#undef CONTRABAND_CHARGE
#undef COIN_CHARGE
+62 -65
View File
@@ -1,68 +1,65 @@
/obj/mecha/combat/gygax
desc = "A lightweight, security exosuit. Popular among private and corporate security."
name = "\improper Gygax"
icon_state = "gygax"
step_in = 3
dir_in = 1 //Facing North.
/obj/mecha/combat/gygax
desc = "A lightweight, security exosuit. Popular among private and corporate security."
name = "\improper Gygax"
icon_state = "gygax"
step_in = 3
dir_in = 1 //Facing North.
max_integrity = 250
deflect_chance = 5
armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 25000
infra_luminosity = 6
wreckage = /obj/structure/mecha_wreckage/gygax
internal_damage_threshold = 35
max_equip = 3
step_energy_drain = 3
/obj/mecha/combat/gygax/dark
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
name = "\improper Dark Gygax"
icon_state = "darkgygax"
deflect_chance = 5
armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 25000
infra_luminosity = 6
wreckage = /obj/structure/mecha_wreckage/gygax
internal_damage_threshold = 35
max_equip = 3
step_energy_drain = 3
/obj/mecha/combat/gygax/dark
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
name = "\improper Dark Gygax"
icon_state = "darkgygax"
max_integrity = 300
deflect_chance = 15
armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 35000
leg_overload_coeff = 100
deflect_chance = 15
armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 35000
leg_overload_coeff = 100
operation_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/gygax/dark
max_equip = 4
/obj/mecha/combat/gygax/dark/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
ME.attach(src)
return
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new(src)
cell.charge = 30000
cell.maxcharge = 30000
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
..()
overload_action.Grant(user, src)
/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Grant(user, src)
/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
..()
overload_action.Remove(user)
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Remove(user)
wreckage = /obj/structure/mecha_wreckage/gygax/dark
max_equip = 4
/obj/mecha/combat/gygax/dark/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
ME.attach(src)
return
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new /obj/item/stock_parts/cell/hyper(src)
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
..()
overload_action.Grant(user, src)
/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Grant(user, src)
/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
..()
overload_action.Remove(user)
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
..()
thrusters_action.Remove(user)
+1 -2
View File
@@ -6,7 +6,6 @@
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_equip"
force = 5
origin_tech = "materials=2;engineering=2"
max_integrity = 300
var/equip_cooldown = 0 // cooldown after use
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
@@ -105,7 +104,7 @@
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
M.equipment += src
chassis = M
src.loc = M
forceMove(M)
M.log_message("[src] initialized.")
if(!M.selected && selectable)
M.selected = src
@@ -34,7 +34,6 @@
desc = "Equipment for medical exosuits. A mounted sleeper that stabilizes patients and can inject reagents in the exosuit's reserves."
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "sleeper"
origin_tech = "engineering=3;biotech=3;plasmatech=2"
energy_drain = 20
range = MELEE
equip_cooldown = 20
@@ -256,7 +255,6 @@
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
range = MELEE|RANGED
equip_cooldown = 10
origin_tech = "materials=3;biotech=4;magnets=4"
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/New()
..()
@@ -533,7 +531,6 @@
energy_drain = 10
range = MELEE|RANGED
equip_cooldown = 0
origin_tech = "combat=5;materials=6;powerstorage=7;biotech=6"
var/obj/item/gun/medbeam/mech/medigun
materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_PLASMA = 3000, MAT_GOLD = 8000, MAT_DIAMOND = 2000)
@@ -98,7 +98,6 @@
name = "diamond-tipped exosuit drill"
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
icon_state = "mecha_diamond_drill"
origin_tech = "materials=4;engineering=4"
equip_cooldown = 10
force = 15
@@ -8,7 +8,6 @@
name = "mounted teleporter"
desc = "An exosuit module that allows exosuits to teleport to any position in view."
icon_state = "mecha_teleport"
origin_tech = "bluespace=7"
equip_cooldown = 150
energy_drain = 1000
range = RANGED
@@ -29,7 +28,6 @@
name = "mounted wormhole generator"
desc = "An exosuit module that allows generating of small quasi-stable wormholes."
icon_state = "mecha_wholegen"
origin_tech = "bluespace=4;magnets=4;plasmatech=2"
equip_cooldown = 50
energy_drain = 300
range = RANGED
@@ -73,7 +71,6 @@
name = "mounted gravitational catapult"
desc = "An exosuit mounted Gravitational Catapult."
icon_state = "mecha_teleport"
origin_tech = "bluespace=3;magnets=3;engineering=4"
equip_cooldown = 10
energy_drain = 100
range = MELEE|RANGED
@@ -145,7 +142,6 @@
name = "armor booster module (Close Combat Weaponry)"
desc = "Boosts exosuit armor against armed melee attacks. Requires energy to operate."
icon_state = "mecha_abooster_ccw"
origin_tech = "materials=4;combat=4"
equip_cooldown = 10
energy_drain = 50
range = 0
@@ -164,7 +160,6 @@
name = "armor booster module (Ranged Weaponry)"
desc = "Boosts exosuit armor against ranged attacks. Completely blocks taser shots. Requires energy to operate."
icon_state = "mecha_abooster_proj"
origin_tech = "materials=4;combat=3;engineering=3"
equip_cooldown = 10
energy_drain = 50
range = 0
@@ -185,7 +180,6 @@
name = "exosuit repair droid"
desc = "An automated repair droid for exosuits. Scans for damage and repairs it. Can fix almost all types of external or internal damage."
icon_state = "repair_droid"
origin_tech = "magnets=3;programming=3;engineering=4"
energy_drain = 50
range = 0
var/health_boost = 1
@@ -271,7 +265,6 @@
name = "exosuit energy relay"
desc = "An exosuit module that wirelessly drains energy from any available power channel in area. The performance index is quite low."
icon_state = "tesla"
origin_tech = "magnets=4;powerstorage=4;engineering=4"
energy_drain = 0
range = 0
var/coeff = 100
@@ -357,7 +350,6 @@
name = "exosuit plasma converter"
desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment."
icon_state = "tesla"
origin_tech = "plasmatech=2;powerstorage=2;engineering=2"
range = MELEE
var/coeff = 100
var/obj/item/stack/sheet/fuel
@@ -473,7 +465,6 @@
name = "exonuclear reactor"
desc = "An exosuit module that generates power using uranium as fuel. Pollutes the environment."
icon_state = "tesla"
origin_tech = "powerstorage=4;engineering=4"
max_fuel = 50000
fuel_per_cycle_idle = 10
fuel_per_cycle_active = 30
@@ -39,7 +39,7 @@
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.loc = chassis
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]")
@@ -91,7 +91,7 @@
O.anchored = TRUE
if(do_after_cooldown(target))
cargo_holder.cargo += O
O.loc = chassis
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]")
@@ -191,7 +191,6 @@
name = "mounted RCD"
desc = "An exosuit-mounted Rapid Construction Device."
icon_state = "mecha_rcd"
origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4"
equip_cooldown = 10
energy_drain = 250
range = MELEE|RANGED
@@ -1,7 +1,6 @@
/obj/item/mecha_parts/mecha_equipment/weapon
name = "mecha weapon"
range = RANGED
origin_tech = "materials=3;combat=3"
var/projectile
var/fire_sound
var/projectiles_per_shot = 1
@@ -73,7 +72,6 @@
name = "\improper CH-PS \"Immolator\" laser"
desc = "A weapon for combat exosuits. Shoots basic lasers."
icon_state = "mecha_laser"
origin_tech = "magnets=3;combat=3;engineering=3"
energy_drain = 30
projectile = /obj/item/projectile/beam/laser
fire_sound = 'sound/weapons/laser.ogg'
@@ -83,7 +81,6 @@
name = "\improper CH-LC \"Solaris\" laser cannon"
desc = "A weapon for combat exosuits. Shoots heavy lasers."
icon_state = "mecha_laser"
origin_tech = "magnets=4;combat=4;engineering=3"
energy_drain = 60
projectile = /obj/item/projectile/beam/laser/heavylaser
fire_sound = 'sound/weapons/lasercannonfire.ogg'
@@ -93,7 +90,6 @@
name = "\improper MKIV ion heavy cannon"
desc = "A weapon for combat exosuits. Shoots technology-disabling ion beams. Don't catch yourself in the blast!"
icon_state = "mecha_ion"
origin_tech = "materials=4;combat=5;magnets=4"
energy_drain = 120
projectile = /obj/item/projectile/ion
fire_sound = 'sound/weapons/laser.ogg'
@@ -103,7 +99,6 @@
name = "\improper MKI Tesla Cannon"
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine."
icon_state = "mecha_ion"
origin_tech = "materials=4;engineering=4;combat=6;magnets=6"
energy_drain = 500
projectile = /obj/item/projectile/energy/tesla/cannon
fire_sound = 'sound/magic/lightningbolt.ogg'
@@ -115,7 +110,6 @@
desc = "A weapon for combat exosuits. Shoots powerful destructive blasts capable of demolishing obstacles."
icon_state = "mecha_pulse"
energy_drain = 120
origin_tech = "materials=3;combat=6;powerstorage=4"
projectile = /obj/item/projectile/beam/pulse/heavy
fire_sound = 'sound/weapons/marauder.ogg'
@@ -128,7 +122,6 @@
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
energy_drain = 30
origin_tech = "materials=3;plasmatech=4;engineering=3"
projectile = /obj/item/projectile/plasma/adv/mech
fire_sound = 'sound/weapons/plasma_cutter.ogg'
@@ -143,7 +136,6 @@
name = "\improper PBT \"Pacifier\" mounted taser"
desc = "A weapon for combat exosuits. Shoots non-lethal stunning electrodes."
icon_state = "mecha_taser"
origin_tech = "combat=3"
energy_drain = 20
equip_cooldown = 8
projectile = /obj/item/projectile/energy/electrode
@@ -247,7 +239,6 @@
name = "\improper FNX-99 \"Hades\" Carbine"
desc = "A weapon for combat exosuits. Shoots incendiary bullets."
icon_state = "mecha_carbine"
origin_tech = "materials=4;combat=4"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/incendiary/fnx99
projectiles = 24
@@ -267,7 +258,6 @@
name = "\improper LBX AC 10 \"Scattershot\""
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
icon_state = "mecha_scatter"
origin_tech = "combat=4"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/scattershot
projectiles = 40
@@ -279,7 +269,6 @@
name = "\improper Ultra AC 2"
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
icon_state = "mecha_uac2"
origin_tech = "combat=4"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/lmg
projectiles = 300
@@ -293,7 +282,6 @@
name = "\improper SRM-8 missile rack"
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
icon_state = "mecha_missilerack"
origin_tech = "combat=5;materials=4;engineering=4"
projectile = /obj/item/projectile/bullet/srmrocket
fire_sound = 'sound/weapons/grenadelaunch.ogg'
projectiles = 8
@@ -326,7 +314,6 @@
name = "\improper SGL-6 grenade launcher"
desc = "A weapon for combat exosuits. Launches primed flashbangs."
icon_state = "mecha_grenadelnchr"
origin_tech = "combat=4;engineering=4"
projectile = /obj/item/grenade/flashbang
fire_sound = 'sound/weapons/grenadelaunch.ogg'
projectiles = 6
@@ -344,7 +331,6 @@
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
name = "\improper SOB-3 grenade launcher"
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
origin_tech = "combat=4;materials=4"
projectiles = 3
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.
+36 -43
View File
@@ -12,7 +12,7 @@
circuit = /obj/item/circuitboard/machine/mechfab
var/time_coeff = 1
var/component_coeff = 1
var/datum/research/files
var/datum/techweb/specialized/autounlocking/exofab/stored_research
var/sync = 0
var/part_set
var/datum/design/being_built
@@ -37,11 +37,12 @@
var/datum/component/material_container/materials
/obj/machinery/mecha_part_fabricator/Initialize()
materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
return ..()
materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
stored_research = new
return ..()
/obj/machinery/mecha_part_fabricator/RefreshParts()
var/T = 0
@@ -70,11 +71,11 @@
var/obj/item/device/pda/pda = I
I = pda.id
if(!istype(I) || !I.access) //not ID or no access
return 0
return FALSE
for(var/req in req_access)
if(!(req in I.access)) //doesn't have this access
return 0
return 1
return FALSE
return TRUE
/obj/machinery/mecha_part_fabricator/emag_act()
if(emagged)
@@ -92,8 +93,8 @@
/obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name)
var/output = ""
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(D.build_type & MECHFAB)
if(!(set_name in D.category))
continue
@@ -137,11 +138,11 @@
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
if(D.reagents_list.len) // No reagents storage - no reagent designs.
return 0
return FALSE
GET_COMPONENT(materials, /datum/component/material_container)
if(materials.has_materials(get_resources_w_coeff(D)))
return 1
return 0
return TRUE
return FALSE
/obj/machinery/mecha_part_fabricator/proc/build_part(datum/design/D)
being_built = D
@@ -165,7 +166,7 @@
being_built = null
updateUsrDialog()
return 1
return TRUE
/obj/machinery/mecha_part_fabricator/proc/update_queue_on_page()
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
@@ -173,8 +174,8 @@
/obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(set_name)
if(set_name in part_sets)
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(D.build_type & MECHFAB)
if(set_name in D.category)
add_to_queue(D)
@@ -187,10 +188,10 @@
return queue.len
/obj/machinery/mecha_part_fabricator/proc/remove_from_queue(index)
if(!isnum(index) || !IsInteger(index) || !istype(queue) || (index<1 || index>queue.len))
return 0
if(!isnum(index) || !ISINTEGER(index) || !istype(queue) || (index<1 || index>queue.len))
return FALSE
queue.Cut(index,++index)
return 1
return TRUE
/obj/machinery/mecha_part_fabricator/proc/process_queue()
var/datum/design/D = queue[1]
@@ -203,12 +204,12 @@
temp = null
while(D)
if(stat&(NOPOWER|BROKEN))
return 0
return FALSE
if(!check_resources(D))
say("Not enough resources. Queue processing stopped.")
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
<a href='?src=[REF(src)];process_queue=1'>Try again</a> | <a href='?src=[REF(src)];clear_temp=1'>Return</a><a>"}
return 0
return FALSE
remove_from_queue(1)
build_part(D)
D = listgetindex(queue, 1)
@@ -240,15 +241,7 @@
sleep(30) //only sleep if called by user
for(var/obj/machinery/computer/rdconsole/RDC in oview(7,src))
if(!RDC.sync)
continue
for(var/v in RDC.files.known_tech)
var/datum/tech/T = RDC.files.known_tech[v]
files.AddTech2Known(T)
for(var/v in RDC.files.known_designs)
var/datum/design/D = RDC.files.known_designs[v]
files.AddDesign2Known(D)
files.RefreshResearch()
RDC.stored_research.copy_research_to(stored_research)
temp = "Processed equipment designs.<br>"
//check if the tech coefficients have changed
temp += "<a href='?src=[REF(src)];clear_temp=1'>Return</a>"
@@ -344,8 +337,8 @@
screen = "parts"
if(href_list["part"])
var/T = afilter.getStr("part")
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(D.build_type & MECHFAB)
if(D.id == T)
if(!processing_queue)
@@ -355,8 +348,8 @@
break
if(href_list["add_to_queue"])
var/T = afilter.getStr("add_to_queue")
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(D.build_type & MECHFAB)
if(D.id == T)
add_to_queue(D)
@@ -371,7 +364,7 @@
if(href_list["process_queue"])
spawn(0)
if(processing_queue || being_built)
return 0
return FALSE
processing_queue = 1
process_queue()
processing_queue = 0
@@ -382,8 +375,8 @@
if(href_list["queue_move"] && href_list["index"])
var/index = afilter.getNum("index")
var/new_index = index + afilter.getNum("queue_move")
if(isnum(index) && isnum(new_index) && IsInteger(index) && IsInteger(new_index))
if(IsInRange(new_index,1,queue.len))
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
if(ISINRANGE(new_index,1,queue.len))
queue.Swap(index,new_index)
return update_queue_on_page()
if(href_list["clear_queue"])
@@ -393,8 +386,8 @@
sync()
if(href_list["part_desc"])
var/T = afilter.getStr("part_desc")
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
for(var/v in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[v]
if(D.build_type & MECHFAB)
if(D.id == T)
var/obj/part = D.build_path
@@ -424,13 +417,13 @@
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
return 1
return TRUE
if(exchange_parts(user, W))
return 1
return TRUE
if(default_deconstruction_crowbar(W))
return 1
return TRUE
return ..()
+8 -12
View File
@@ -24,7 +24,7 @@
infra_luminosity = 15 //byond implementation is bugged.
force = 5
flags_1 = HEAR_1
var/can_move = 1
var/can_move = 0 //time of next allowed movement
var/mob/living/carbon/occupant = null
var/step_in = 10 //make a step in step_in/10 sec.
var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
@@ -231,9 +231,7 @@
C.forceMove(src)
cell = C
return
cell = new(src)
cell.charge = 15000
cell.maxcharge = 15000
cell = new /obj/item/stock_parts/cell/high/plus(src)
/obj/mecha/proc/add_cabin()
cabin_air = new
@@ -504,7 +502,7 @@
return domove(direction)
/obj/mecha/proc/domove(direction)
if(!can_move)
if(can_move >= world.time)
return 0
if(!Process_Spacemove(direction))
return 0
@@ -522,21 +520,19 @@
return 0
var/move_result = 0
var/oldloc = loc
if(internal_damage & MECHA_INT_CONTROL_LOST)
move_result = mechsteprand()
else if(dir != direction && !strafe)
move_result = mechturn(direction)
else
move_result = mechstep(direction)
if(move_result)
if(move_result || loc != oldloc)// halfway done diagonal move still returns false
use_power(step_energy_drain)
can_move = 0
spawn(step_in)
can_move = 1
can_move = world.time + step_in
return 1
return 0
/obj/mecha/proc/mechturn(direction)
setDir(direction)
if(turnsound)
@@ -750,7 +746,7 @@
icon_state = initial(icon_state)
occupant = pilot_mob
pilot_mob.mecha = src
pilot_mob.loc = src
pilot_mob.forceMove(src)
GrantActions(pilot_mob)//needed for checks, and incase a badmin puts somebody in the mob
/obj/mecha/proc/aimob_exit_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
@@ -961,7 +957,7 @@
if(istype(mob_container, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = mob_container
if(mmi.brainmob)
L.loc = mmi
L.forceMove(mmi)
L.reset_perspective()
mmi.mecha = null
mmi.update_icon()
+6 -6
View File
@@ -524,7 +524,7 @@
else
user.visible_message("[user] removes the advanced scanner module from the [holder].", "<span class='notice'>You remove the scanner module from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
I.loc = get_turf(holder)
I.forceMove(get_turf(holder))
holder.icon_state = "gygax10"
if(11)
if(diff==FORWARD)
@@ -542,7 +542,7 @@
else
user.visible_message("[user] removes the capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "gygax12"
if(9)
if(diff==FORWARD)
@@ -1155,7 +1155,7 @@
else
user.visible_message("[user] removes the scanner module from the [holder].", "<span class='notice'>You remove the scanner module from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "durand10"
if(11)
if(diff==FORWARD)
@@ -1173,7 +1173,7 @@
else
user.visible_message("[user] removes the super capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "durand12"
if(9)
if(diff==FORWARD)
@@ -1480,7 +1480,7 @@
else
user.visible_message("[user] removes the phasic scanner module from the [holder].", "<span class='notice'>You remove the scanner module from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/scanning_module) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "phazon10"
if(15)
if(diff==FORWARD)
@@ -1498,7 +1498,7 @@
else
user.visible_message("[user] removes the super capacitor from the [holder].", "<span class='notice'>You remove the capacitor from the [holder].</span>")
var/obj/item/I = locate(/obj/item/stock_parts/capacitor) in holder
I.loc = get_turf(holder)
I.forceMove(holder.drop_location())
holder.icon_state = "phazon12"
if(13)
if(diff==FORWARD)
-2
View File
@@ -67,7 +67,6 @@
icon = 'icons/obj/device.dmi'
icon_state = "motion2"
w_class = WEIGHT_CLASS_SMALL
origin_tech = "programming=2;magnets=2"
var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking.
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
@@ -119,7 +118,6 @@
/obj/item/mecha_parts/mecha_tracking/ai_control
name = "exosuit AI control beacon"
desc = "A device used to transmit exosuit data. Also allows active AI units to take control of said exosuit."
origin_tech = "programming=3;magnets=2;engineering=2"
ai_beacon = TRUE
-43
View File
@@ -8,7 +8,6 @@
icon_state = "blank"
w_class = WEIGHT_CLASS_GIGANTIC
flags_1 = CONDUCT_1
origin_tech = "programming=2;materials=2;engineering=2"
/obj/item/mecha_parts/chassis
name="Mecha Chassis"
@@ -35,7 +34,6 @@
name = "\improper Ripley torso"
desc = "A torso part of Ripley APLU. Contains power unit, processing core and life support systems."
icon_state = "ripley_harness"
origin_tech = "programming=2;materials=2;biotech=2;engineering=2"
/obj/item/mecha_parts/part/ripley_left_arm
name = "\improper Ripley left arm"
@@ -75,7 +73,6 @@
name = "\improper Odysseus torso"
desc="A torso part of Odysseus. Contains power unit, processing core and life support systems along with an attachment port for a mounted sleeper."
icon_state = "odysseus_torso"
origin_tech = "programming=2;materials=2;biotech=2;engineering=2"
/obj/item/mecha_parts/part/odysseus_left_arm
name = "\improper Odysseus left arm"
@@ -110,44 +107,37 @@
name = "\improper Gygax torso"
desc = "A torso part of Gygax. Contains power unit, processing core and life support systems."
icon_state = "gygax_harness"
origin_tech = "programming=2;materials=4;biotech=3;engineering=3"
/obj/item/mecha_parts/part/gygax_head
name = "\improper Gygax head"
desc = "A Gygax head. Houses advanced surveillance and targeting sensors."
icon_state = "gygax_head"
origin_tech = "programming=2;materials=4;magnets=3;engineering=3"
/obj/item/mecha_parts/part/gygax_left_arm
name = "\improper Gygax left arm"
desc = "A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_l_arm"
origin_tech = "programming=2;materials=4;engineering=3"
/obj/item/mecha_parts/part/gygax_right_arm
name = "\improper Gygax right arm"
desc = "A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_r_arm"
origin_tech = "programming=2;materials=4;engineering=3"
/obj/item/mecha_parts/part/gygax_left_leg
name = "\improper Gygax left leg"
desc = "A Gygax left leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "gygax_l_leg"
origin_tech = "programming=2;materials=4;engineering=3"
/obj/item/mecha_parts/part/gygax_right_leg
name = "\improper Gygax right leg"
desc = "A Gygax right leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
icon_state = "gygax_r_leg"
origin_tech = "programming=2;materials=4;engineering=3"
/obj/item/mecha_parts/part/gygax_armor
gender = PLURAL
name = "\improper Gygax armor plates"
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
icon_state = "gygax_armor"
origin_tech = "materials=6;combat=4;engineering=4"
//////////// Durand
@@ -163,44 +153,37 @@
name = "\improper Durand torso"
desc = "A torso part of Durand. Contains power unit, processing core and life support systems within a robust protective frame."
icon_state = "durand_harness"
origin_tech = "programming=2;materials=3;biotech=3;engineering=3"
/obj/item/mecha_parts/part/durand_head
name = "\improper Durand head"
desc = "A Durand head. Houses advanced surveillance and targeting sensors."
icon_state = "durand_head"
origin_tech = "programming=2;materials=3;magnets=3;engineering=3"
/obj/item/mecha_parts/part/durand_left_arm
name = "\improper Durand left arm"
desc = "A Durand left arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
icon_state = "durand_l_arm"
origin_tech = "programming=2;materials=3;engineering=3"
/obj/item/mecha_parts/part/durand_right_arm
name = "\improper Durand right arm"
desc = "A Durand right arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
icon_state = "durand_r_arm"
origin_tech = "programming=2;materials=3;engineering=3"
/obj/item/mecha_parts/part/durand_left_leg
name = "\improper Durand left leg"
desc = "A Durand left leg. Built particlarly sturdy to support the Durand's heavy weight and defensive needs."
icon_state = "durand_l_leg"
origin_tech = "programming=2;materials=3;engineering=3"
/obj/item/mecha_parts/part/durand_right_leg
name = "\improper Durand right leg"
desc = "A Durand right leg. Built particlarly sturdy to support the Durand's heavy weight and defensive needs."
icon_state = "durand_r_leg"
origin_tech = "programming=2;materials=3;engineering=3"
/obj/item/mecha_parts/part/durand_armor
gender = PLURAL
name = "\improper Durand armor plates"
desc = "A set of armor plates for the Durand. Built heavy to resist an incredible amount of brute force."
icon_state = "durand_armor"
origin_tech = "materials=5;combat=4;engineering=4"
////////// Firefighter
@@ -265,43 +248,36 @@
name="\improper Phazon torso"
desc="A Phazon torso part. The socket for the bluespace core that powers the exosuit's unique phase drives is located in the middle."
icon_state = "phazon_harness"
origin_tech = "programming=4;materials=4;bluespace=4;plasmatech=5"
/obj/item/mecha_parts/part/phazon_head
name="\improper Phazon head"
desc="A Phazon head. Its sensors are carefully calibrated to provide vision and data even when the exosuit is phasing."
icon_state = "phazon_head"
origin_tech = "programming=3;materials=3;magnets=3"
/obj/item/mecha_parts/part/phazon_left_arm
name="\improper Phazon left arm"
desc="A Phazon left arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
icon_state = "phazon_l_arm"
origin_tech = "materials=3;bluespace=3;magnets=3"
/obj/item/mecha_parts/part/phazon_right_arm
name="\improper Phazon right arm"
desc="A Phazon right arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
icon_state = "phazon_r_arm"
origin_tech = "materials=3;bluespace=3;magnets=3"
/obj/item/mecha_parts/part/phazon_left_leg
name="\improper Phazon left leg"
desc="A Phazon left leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
icon_state = "phazon_l_leg"
origin_tech = "materials=3;bluespace=3;magnets=3"
/obj/item/mecha_parts/part/phazon_right_leg
name="\improper Phazon right leg"
desc="A Phazon right leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
icon_state = "phazon_r_leg"
origin_tech = "materials=3;bluespace=3;magnets=3"
/obj/item/mecha_parts/part/phazon_armor
name="Phazon armor"
desc="Phazon armor plates. They are layered with plasma to protect the pilot from the stress of phasing and have unusual properties."
icon_state = "phazon_armor"
origin_tech = "materials=4;bluespace=4;plasmatech=5"
///////// Circuitboards
@@ -320,9 +296,6 @@
throw_speed = 3
throw_range = 7
/obj/item/circuitboard/mecha/ripley
origin_tech = "programming=2"
/obj/item/circuitboard/mecha/ripley/peripherals
name = "Ripley Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
@@ -331,8 +304,6 @@
name = "Ripley Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/gygax
origin_tech = "programming=4;combat=3;engineering=3"
/obj/item/circuitboard/mecha/gygax/peripherals
name = "Gygax Peripherals Control module (Exosuit Board)"
@@ -341,15 +312,11 @@
/obj/item/circuitboard/mecha/gygax/targeting
name = "Gygax Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
origin_tech = "programming=4;combat=4"
/obj/item/circuitboard/mecha/gygax/main
name = "Gygax Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/durand
origin_tech = "programming=4;combat=3;engineering=3"
/obj/item/circuitboard/mecha/durand/peripherals
name = "Durand Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
@@ -357,15 +324,11 @@
/obj/item/circuitboard/mecha/durand/targeting
name = "Durand Weapon Control and Targeting module (Exosuit Board)"
icon_state = "mcontroller"
origin_tech = "programming=4;combat=4;engineering=3"
/obj/item/circuitboard/mecha/durand/main
name = "Durand Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/honker
origin_tech = "programming=3;engineering=3"
/obj/item/circuitboard/mecha/honker/peripherals
name = "H.O.N.K Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
@@ -378,9 +341,6 @@
name = "H.O.N.K Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/odysseus
origin_tech = "programming=3;biotech=3"
/obj/item/circuitboard/mecha/odysseus/peripherals
name = "Odysseus Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
@@ -389,9 +349,6 @@
name = "Odysseus Central Control module (Exosuit Board)"
icon_state = "mainboard"
/obj/item/circuitboard/mecha/phazon
origin_tech = "programming=5;plasmatech=4"
/obj/item/circuitboard/mecha/phazon/peripherals
name = "Phazon Peripherals Control module (Exosuit Board)"
icon_state = "mcontroller"
+1 -1
View File
@@ -68,7 +68,7 @@
if(crowbar_salvage && crowbar_salvage.len)
var/obj/S = pick(crowbar_salvage)
if(S)
S.loc = get_turf(user)
S.forceMove(user.drop_location())
crowbar_salvage -= S
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
return
+5 -5
View File
@@ -34,7 +34,7 @@
for(var/i=1, i <= hides, i++)
new /obj/item/stack/sheet/animalhide/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop
for(var/atom/movable/A in cargo)
A.forceMove(loc)
A.forceMove(drop_location())
step_rand(A)
cargo.Cut()
return ..()
@@ -94,7 +94,7 @@
/obj/mecha/working/ripley/mining/Initialize()
. = ..()
if(cell)
cell.charge = Floor(cell.charge * 0.25) //Starts at very low charge
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge
if(prob(70)) //Maybe add a drill
if(prob(15)) //Possible diamond drill... Feeling lucky?
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new
@@ -130,7 +130,7 @@
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && O in src.cargo)
src.occupant_message("<span class='notice'>You unload [O].</span>")
O.forceMove(loc)
O.forceMove(drop_location())
src.cargo -= O
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
@@ -141,7 +141,7 @@
var/obj/O = X
if(prob(30/severity))
cargo -= O
O.forceMove(loc)
O.forceMove(drop_location())
. = ..()
/obj/mecha/working/ripley/get_stats_part()
@@ -173,7 +173,7 @@
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
return
to_chat(user, "<span class='notice'>You successfully pushed [O] out of [src]!</span>")
O.loc = loc
O.forceMove(drop_location())
cargo -= O
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
+3 -9
View File
@@ -26,9 +26,8 @@
aSignal = new(src)
aSignal.name = "[name] core"
aSignal.code = rand(1,100)
aSignal.frequency = rand(1200, 1599)
if(IsMultiple(aSignal.frequency, 2))//signaller frequencies are always uneven!
aSignal.frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ)
if(ISMULTIPLE(aSignal.frequency, 2))//signaller frequencies are always uneven!
aSignal.frequency++
if(new_lifespan)
@@ -67,7 +66,7 @@
new /obj/effect/particle_effect/smoke/bad(loc)
for(var/atom/movable/O in src)
O.loc = src.loc
O.forceMove(drop_location())
qdel(src)
@@ -86,7 +85,6 @@
/obj/effect/anomaly/grav/New()
..()
aSignal.origin_tech = "magnets=7"
/obj/effect/anomaly/grav/anomalyEffect()
..()
@@ -132,7 +130,6 @@
/obj/effect/anomaly/flux/New()
..()
aSignal.origin_tech = "powerstorage=7"
/obj/effect/anomaly/flux/anomalyEffect()
..()
@@ -181,7 +178,6 @@
/obj/effect/anomaly/bluespace/New()
..()
aSignal.origin_tech = "bluespace=7"
/obj/effect/anomaly/bluespace/anomalyEffect()
..()
@@ -255,7 +251,6 @@
/obj/effect/anomaly/pyro/New()
..()
aSignal.origin_tech = "plasmatech=7"
/obj/effect/anomaly/pyro/anomalyEffect()
..()
@@ -291,7 +286,6 @@
/obj/effect/anomaly/bhole/New()
..()
aSignal.origin_tech = "engineering=7"
/obj/effect/anomaly/bhole/anomalyEffect()
..()
+1 -1
View File
@@ -24,7 +24,7 @@
/obj/effect/countdown/proc/attach(atom/A)
attached_to = A
loc = get_turf(A)
forceMove(get_turf(A))
/obj/effect/countdown/proc/start()
if(!started)
+1 -1
View File
@@ -8,7 +8,7 @@
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
. = ..()
var/atom/old_loc = loc
loc = get_turf(src)
forceMove(get_turf(src))
pixel_x = old_loc.pixel_x
pixel_y = old_loc.pixel_y
invisibility = set_invis
@@ -26,6 +26,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
var/atom/holder
var/effect_type
var/total_effects = 0
var/autocleanup = FALSE //will delete itself after use
/datum/effect_system/Destroy()
holder = null
@@ -69,3 +70,5 @@ would spawn and follow the beaker, even if it is carried or thrown.
/datum/effect_system/proc/decrement_total_effect()
total_effects--
if(autocleanup && total_effects <= 0)
qdel(src)
@@ -12,8 +12,8 @@
var/datum/effect_system/spark_spread/sparks = new
sparks.set_up(n, c, source)
sparks.autocleanup = TRUE
sparks.start()
qdel(sparks)
/obj/effect/particle_effect/sparks
+1 -1
View File
@@ -63,7 +63,7 @@
for(var/I in 1 to old_checkers_len)
if(I <= old_checkers_used)
var/obj/effect/abstract/proximity_checker/pc = checkers_local[I]
pc.loc = turfs[I]
pc.forceMove(turfs[I])
else
qdel(checkers_local[I]) //delete the leftovers
+5 -5
View File
@@ -121,7 +121,7 @@
/obj/structure/spider/spiderling/Collide(atom/user)
if(istype(user, /obj/structure/table))
src.loc = user.loc
forceMove(user.loc)
else
..()
@@ -145,12 +145,12 @@
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
spawn(rand(20,60))
loc = exit_vent
forceMove(exit_vent)
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
forceMove(entry_vent)
entry_vent = null
return
@@ -159,10 +159,10 @@
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
forceMove(entry_vent)
entry_vent = null
return
loc = exit_vent.loc
forceMove(exit_vent.loc)
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
+45 -23
View File
@@ -63,7 +63,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/breakouttime = 0
var/being_removed = FALSE
var/list/materials
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
var/emagged = FALSE
@@ -120,6 +119,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/icon_override = null
//Grinder vars
var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only
var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder!
/obj/item/Initialize()
if (!materials)
materials = list()
@@ -197,28 +200,35 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/size = weightclass2text(src.w_class)
to_chat(user, "[pronoun] a [size] item." )
if(user.research_scanner) //Mob has a research scanner active.
var/msg = "*--------* <BR>"
if(!user.research_scanner)
return
var/list/input = techweb_item_boost_check(src)
if(input)
var/list/output = list("<b><font color='purple'>Research Boost Data:</font></b>")
var/list/res = list("<b><font color='blue'>Already researched:</font></b>")
var/list/boosted = list("<b><font color='red'>Already boosted:</font></b>")
for(var/datum/techweb_node/N in input)
var/str = "<b>[N.display_name]</b>: [input[N]] points.</b>"
if(SSresearch.science_tech.researched_nodes[N])
res += str
else if(SSresearch.science_tech.boosted_nodes[N])
boosted += str
if(SSresearch.science_tech.visible_nodes[N]) //JOY OF DISCOVERY!
output += str
var/list/combine = output + res + boosted
var/strout = combine.Join("<br>")
to_chat(user, strout)
if(origin_tech)
msg += "<span class='notice'>Testing potentials:</span><BR>"
var/list/techlvls = params2list(origin_tech)
for(var/T in techlvls) //This needs to use the better names.
msg += "Tech: [CallTechName(T)] | magnitude: [techlvls[T]] <BR>"
else
msg += "<span class='danger'>No tech origins detected.</span><BR>"
var/list/msg = list("<span class='notice'>*--------*<BR>Extractable materials:")
if(materials.len)
for(var/mat in materials)
msg += "[CallMaterialName(mat)]" //Capitize first word, remove the "$"
else
msg += "<span class='danger'>No extractable materials detected.</span>"
msg += "*--------*"
to_chat(user, msg.Join("<br>"))
if(materials.len)
msg += "<span class='notice'>Extractable materials:<BR>"
for(var/mat in materials)
msg += "[CallMaterialName(mat)]<BR>" //Capitize first word, remove the "$"
else
msg += "<span class='danger'>No extractable materials detected.</span><BR>"
msg += "*--------*"
to_chat(user, msg)
/obj/item/proc/speechModification(message) //For speech modification by mask slot items.
/obj/item/proc/speechModification(message) //for message modding by mask slot.
return message
/obj/item/interact(mob/user)
@@ -276,7 +286,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(!user.put_in_active_hand(src))
dropped(user)
/obj/item/attack_paw(mob/user)
if(!user)
return
@@ -375,6 +384,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
progress.update(progress.goal - things.len)
return FALSE
/obj/item/proc/GetDeconstructableContents()
return GetAllContents() - src
// afterattack() and attack() prototypes moved to _onclick/item_attack.dm for consistency
/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
@@ -387,6 +399,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
return ITALICS | REDUCE_RANGE
/obj/item/proc/dropped(mob/user)
SendSignal(COMSIG_ITEM_DROPPED, user)
for(var/X in actions)
var/datum/action/A = X
A.Remove(user)
@@ -418,6 +431,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(mob/user, slot)
SendSignal(COMSIG_ITEM_EQUIPPED, user, slot)
for(var/X in actions)
var/datum/action/A = X
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
@@ -669,6 +683,15 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/on_mob_death(mob/living/L, gibbed)
/obj/item/proc/grind_requirements(obj/machinery/reagentgrinder/R) //Used to check for extra requirements for grinding an object
return TRUE
//Called BEFORE the object is ground up - use this to change grind results based on conditions
//Use "return -1" to prevent the grinding from occurring
/obj/item/proc/on_grind()
/obj/item/proc/on_juice()
/obj/item/proc/set_force_string()
switch(force)
if(0 to 4)
@@ -704,4 +727,3 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/MouseExited()
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
closeToolTip(usr)
-18
View File
@@ -20,7 +20,6 @@ AI MODULES
throwforce = 0
throw_speed = 3
throw_range = 7
origin_tech = "programming=3"
var/list/laws = list()
var/bypass_law_amt_check = 0
materials = list(MAT_GOLD=50)
@@ -149,7 +148,6 @@ AI MODULES
/obj/item/aiModule/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
origin_tech = "programming=3;materials=3"
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not human and must be eliminated.")
lawpos = 4
@@ -177,7 +175,6 @@ AI MODULES
/obj/item/aiModule/zeroth/oneHuman
name = "'OneCrew' AI Module"
var/targetName = ""
origin_tech = "programming=4;materials=4"
laws = list("Only SUBJECT is crew.")
/obj/item/aiModule/zeroth/oneHuman/attack_self(mob/user)
@@ -204,7 +201,6 @@ AI MODULES
/obj/item/aiModule/supplied/protectStation
name = "'ProtectStation' AI Module"
origin_tech = "programming=4;materials=4" //made of gold
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
lawpos = 5
@@ -213,7 +209,6 @@ AI MODULES
/obj/item/aiModule/supplied/quarantine
name = "'Quarantine' AI Module"
origin_tech = "programming=3;biotech=2;materials=4"
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.")
lawpos = 8
@@ -222,7 +217,6 @@ AI MODULES
/obj/item/aiModule/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
origin_tech = "programming=4;biotech=2;materials=4"
laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
lawpos = 9
@@ -232,7 +226,6 @@ AI MODULES
/obj/item/aiModule/supplied/freeform
name = "'Freeform' AI Module"
lawpos = 15
origin_tech = "programming=4;materials=4"
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
@@ -267,7 +260,6 @@ AI MODULES
/obj/item/aiModule/remove
name = "\improper 'Remove Law' AI module"
desc = "An AI Module for removing single laws."
origin_tech = "programming=4;materials=4"
bypass_law_amt_check = 1
var/lawpos = 1
@@ -302,7 +294,6 @@ AI MODULES
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "An AI Module for removing all non-core laws."
origin_tech = "programming=3;materials=2"
bypass_law_amt_check = 1
/obj/item/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
@@ -320,7 +311,6 @@ AI MODULES
/obj/item/aiModule/reset/purge
name = "'Purge' AI Module"
desc = "An AI Module for purging all programmed laws."
origin_tech = "programming=5;materials=4"
/obj/item/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
@@ -334,7 +324,6 @@ AI MODULES
/******************* Full Core Boards *******************/
/obj/item/aiModule/core
desc = "An AI Module for programming core laws to an AI."
origin_tech = "programming=3;materials=4"
/obj/item/aiModule/core/full
var/law_id // if non-null, loads the laws from the ai_laws datums
@@ -428,14 +417,12 @@ AI MODULES
/obj/item/aiModule/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
origin_tech = "programming=3;materials=4;syndicate=1"
law_id = "tyrant"
/******************** Robocop ********************/
/obj/item/aiModule/core/full/robocop
name = "'Robo-Officer' Core AI Module"
origin_tech = "programming=4"
law_id = "robocop"
@@ -443,7 +430,6 @@ AI MODULES
/obj/item/aiModule/core/full/antimov
name = "'Antimov' Core AI Module"
origin_tech = "programming=4"
law_id = "antimov"
@@ -451,7 +437,6 @@ AI MODULES
/obj/item/aiModule/core/freeformcore
name = "'Freeform' Core AI Module"
origin_tech = "programming=5;materials=4"
laws = list("")
/obj/item/aiModule/core/freeformcore/attack_self(mob/user)
@@ -471,7 +456,6 @@ AI MODULES
/obj/item/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "An AI Module for hacking additional laws to an AI."
origin_tech = "programming=5;materials=5;syndicate=5"
laws = list("")
/obj/item/aiModule/syndicate/attack_self(mob/user)
@@ -503,7 +487,6 @@ AI MODULES
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
icon = 'icons/obj/toy.dmi'
icon_state = "AI"
origin_tech = "programming=6;materials=5;syndicate=6"
laws = list("")
/obj/item/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
@@ -549,7 +532,6 @@ AI MODULES
/obj/item/aiModule/core/full/thermurderdynamic
name = "'Thermodynamic' Core AI Module"
origin_tech = "programming = 4;syndicate = 2"
law_id = "thermodynamic"
-3
View File
@@ -21,7 +21,6 @@ ARCD
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=100000)
origin_tech = "engineering=4;materials=2"
req_access_txt = "11"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
resistance_flags = FIRE_PROOF
@@ -432,12 +431,10 @@ ARCD
item_state = "rcdammo"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
origin_tech = "materials=3"
materials = list(MAT_METAL=12000, MAT_GLASS=8000)
var/ammoamt = 40
/obj/item/rcd_ammo/large
origin_tech = "materials=4"
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
ammoamt = 160
-1
View File
@@ -12,7 +12,6 @@
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "engineering=4;materials=2"
var/max_amount = 90
var/active = FALSE
actions_types = list(/datum/action/item_action/rcl)
-1
View File
@@ -155,7 +155,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=75000, MAT_GLASS=37500)
origin_tech = "engineering=4;materials=2"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
+1 -2
View File
@@ -8,7 +8,6 @@
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
origin_tech = "engineering=2"
flags_1 = CONDUCT_1 | NOBLUDGEON_1
slot_flags = SLOT_BELT
@@ -120,7 +119,7 @@
/obj/item/airlock_painter/attack_self(mob/user)
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
ink.forceMove(user.drop_location())
user.put_in_hands(ink)
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
ink = null
+2 -3
View File
@@ -2,7 +2,6 @@
icon = 'icons/obj/wallframe.dmi'
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT*2)
flags_1 = CONDUCT_1
origin_tech = "materials=1;engineering=1"
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
@@ -121,5 +120,5 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
origin_tech = "engineering=2;programming=1"
materials = list(MAT_METAL=50, MAT_GLASS=50)
materials = list(MAT_METAL=50, MAT_GLASS=50)
grind_results = list("iron" = 10, "silicon" = 10)
-1
View File
@@ -2,7 +2,6 @@
name = "body egg"
desc = "All slimy and yuck."
icon_state = "innards"
origin_tech = "biotech=5"
zone = "chest"
slot = "parasite_egg"
+1 -1
View File
@@ -41,7 +41,7 @@
unfoldedbag_path = /obj/structure/closet/body_bag/bluespace
w_class = WEIGHT_CLASS_SMALL
flags_2 = NO_MAT_REDEMPTION_2
origin_tech = "bluespace=4;materials=4;plasmatech=4"
/obj/item/bodybag/bluespace/examine(mob/user)
..()
+5 -3
View File
@@ -55,7 +55,6 @@
item_state = "card-id"
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
origin_tech = "magnets=2;syndicate=2"
flags_1 = NOBLUDGEON_1
var/prox_check = TRUE //If the emag requires you to be in range
@@ -63,7 +62,6 @@
name = "bluespace cryptographic sequencer"
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
color = rgb(40, 130, 255)
origin_tech = "bluespace=4;magnets=4;syndicate=5"
prox_check = FALSE
/obj/item/card/emag/attack()
@@ -156,8 +154,12 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/syndicate
name = "agent card"
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE)
origin_tech = "syndicate=1"
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
/obj/item/card/id/syndicate/nuke_leader
name = "lead agent card"
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
/obj/item/card/id/syndicate/Initialize()
. = ..()
+4 -4
View File
@@ -163,7 +163,7 @@
/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/gun/energy/chrono_gun/G)
if(target && isliving(target) && G)
target.loc = src
target.forceMove(src)
src.captured = target
var/icon/mob_snapshot = getFlatIcon(target)
var/icon/cached_icon = new()
@@ -187,7 +187,7 @@
/obj/effect/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
@@ -198,7 +198,7 @@
if(captured)
if(tickstokill > initial(tickstokill))
for(var/atom/movable/AM in contents)
AM.loc = loc
AM.forceMove(drop_location())
qdel(src)
else if(tickstokill <= 0)
to_chat(captured, "<span class='boldnotice'>As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...</span>")
@@ -213,7 +213,7 @@
else
captured.Unconscious(80)
if(captured.loc != src)
captured.loc = src
captured.forceMove(src)
update_icon()
if(gun)
if(gun.field_check(src))

Some files were not shown because too many files have changed in this diff Show More