Merge branch 'master' into upstream-merge-38165
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
body += "\[<A href='?_src_=holder;[HrefToken()];editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
|
||||
body += "\[<A href='?_src_=holder;[HrefToken()];editrights=[(GLOB.admin_datums[M.client.ckey] || GLOB.deadmins[M.client.ckey]) ? "rank" : "add"];ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
|
||||
if(CONFIG_GET(flag/use_exp_tracking))
|
||||
body += "\[<A href='?_src_=holder;[HrefToken()];getplaytimewindow=[REF(M)]'>" + M.client.get_exp_living() + "</a>\]"
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
var/use_db
|
||||
var/task = href_list["editrights"]
|
||||
var/skip
|
||||
var/legacy_only
|
||||
if(task == "activate" || task == "deactivate" || task == "sync")
|
||||
skip = TRUE
|
||||
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_admins) && task == "rank")
|
||||
@@ -135,10 +136,9 @@
|
||||
if(D.rank in GLOB.protected_ranks)
|
||||
to_chat(usr, "<span class='admin prefix'>Editing the flags of this rank is blocked by server configuration.</span>")
|
||||
return
|
||||
if(CONFIG_GET(flag/load_legacy_ranks_only) && (task == "rank" || task == "permissions"))
|
||||
to_chat(usr, "<span class='admin prefix'>Database rank loading is disabled, only temporary changes can be made to an admin's rank or permissions.</span>")
|
||||
use_db = FALSE
|
||||
skip = TRUE
|
||||
if(CONFIG_GET(flag/load_legacy_ranks_only) && (task == "add" || task == "rank" || task == "permissions"))
|
||||
to_chat(usr, "<span class='admin prefix'>Database rank loading is disabled, only temporary changes can be made to a rank's permissions and permanently creating a new rank is blocked.</span>")
|
||||
legacy_only = TRUE
|
||||
if(check_rights(R_DBRANKS, FALSE))
|
||||
if(!skip)
|
||||
if(!SSdbcore.Connect())
|
||||
@@ -165,16 +165,16 @@
|
||||
return
|
||||
switch(task)
|
||||
if("add")
|
||||
admin_ckey = add_admin(null, use_db)
|
||||
admin_ckey = add_admin(admin_ckey, use_db)
|
||||
if(!admin_ckey)
|
||||
return
|
||||
change_admin_rank(admin_ckey, use_db)
|
||||
change_admin_rank(admin_ckey, use_db, null, legacy_only)
|
||||
if("remove")
|
||||
remove_admin(admin_ckey, use_db, D)
|
||||
if("rank")
|
||||
change_admin_rank(admin_ckey, use_db, D)
|
||||
change_admin_rank(admin_ckey, use_db, D, legacy_only)
|
||||
if("permissions")
|
||||
change_admin_flags(admin_ckey, use_db, D)
|
||||
change_admin_flags(admin_ckey, use_db, D, legacy_only)
|
||||
if("activate")
|
||||
force_readmin(admin_ckey, D)
|
||||
if("deactivate")
|
||||
@@ -240,9 +240,11 @@
|
||||
log_admin("[key_name(usr)] forcefully deadmined [admin_ckey]")
|
||||
D.deactivate() //after logs so the deadmined admin can see the message.
|
||||
|
||||
/datum/admins/proc/change_admin_rank(admin_ckey, use_db, datum/admins/D)
|
||||
/datum/admins/proc/change_admin_rank(admin_ckey, use_db, datum/admins/D, legacy_only)
|
||||
var/datum/admin_rank/R
|
||||
var/list/rank_names = list("*New Rank*")
|
||||
var/list/rank_names = list()
|
||||
if(!use_db || (use_db && !legacy_only))
|
||||
rank_names += "*New Rank*"
|
||||
for(R in GLOB.admin_ranks)
|
||||
if((R.rights & usr.client.holder.rank.can_edit_rights) == R.rights)
|
||||
rank_names[R.name] = R
|
||||
@@ -297,7 +299,7 @@
|
||||
message_admins("[key_name_admin(usr)] edited the admin rank of [admin_ckey] to [new_rank] [use_db ? "permanently" : "temporarily"]")
|
||||
log_admin("[key_name(usr)] edited the admin rank of [admin_ckey] to [new_rank] [use_db ? "permanently" : "temporarily"]")
|
||||
|
||||
/datum/admins/proc/change_admin_flags(admin_ckey, use_db, datum/admins/D)
|
||||
/datum/admins/proc/change_admin_flags(admin_ckey, use_db, datum/admins/D, legacy_only)
|
||||
var/new_flags = input_bitfield(usr, "Include permission flags<br>[use_db ? "This will affect ALL admins with this rank." : "This will affect only the current admin [admin_ckey]"]", "admin_flags", D.rank.include_rights, 350, 590, allowed_edit_list = usr.client.holder.rank.can_edit_rights)
|
||||
if(isnull(new_flags))
|
||||
return
|
||||
@@ -307,7 +309,7 @@
|
||||
var/new_can_edit_flags = input_bitfield(usr, "Editable permission flags<br>These are the flags this rank is allowed to edit if they have access to the permissions panel.<br>They will be unable to modify admins to a rank that has a flag not included here.<br>[use_db ? "This will affect ALL admins with this rank." : "This will affect only the current admin [admin_ckey]"]", "admin_flags", D.rank.can_edit_rights, 350, 710, allowed_edit_list = usr.client.holder.rank.can_edit_rights)
|
||||
if(isnull(new_can_edit_flags))
|
||||
return
|
||||
if(use_db)
|
||||
if(use_db || legacy_only)
|
||||
var/old_flags
|
||||
var/old_exclude_flags
|
||||
var/old_can_edit_flags
|
||||
@@ -351,6 +353,7 @@
|
||||
D.rank.rights = new_flags &= ~new_exclude_flags
|
||||
D.rank.include_rights = new_flags
|
||||
D.rank.exclude_rights = new_exclude_flags
|
||||
D.rank.can_edit_rights = new_can_edit_flags
|
||||
var/client/C = GLOB.directory[admin_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
D.associate(C) //link up with the client and add verbs
|
||||
message_admins("[key_name_admin(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]")
|
||||
|
||||
@@ -734,14 +734,17 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(!dresscode)
|
||||
return
|
||||
|
||||
var/delete_pocket
|
||||
var/mob/living/carbon/human/H
|
||||
if(isobserver(M))
|
||||
H = M.change_mob_type(/mob/living/carbon/human, null, null, TRUE)
|
||||
else
|
||||
H = M
|
||||
if(alert("Drop Items in Pockets? No will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
|
||||
delete_pocket = TRUE
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
for (var/obj/item/I in H.get_equipped_items())
|
||||
for (var/obj/item/I in H.get_equipped_items(delete_pocket))
|
||||
qdel(I)
|
||||
if(dresscode != "Naked")
|
||||
H.equipOutfit(dresscode)
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
|
||||
/datum/admins/proc/equipAntagOnDummy(mob/living/carbon/human/dummy/mannequin, datum/antagonist/antag)
|
||||
for(var/I in mannequin.get_equipped_items())
|
||||
for(var/I in mannequin.get_equipped_items(TRUE))
|
||||
qdel(I)
|
||||
if (ispath(antag, /datum/antagonist/ert))
|
||||
var/datum/antagonist/ert/ert = antag
|
||||
|
||||
@@ -1277,7 +1277,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_ROD)
|
||||
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_ROD, ADMIN_PUNISHMENT_SUPPLYPOD)
|
||||
|
||||
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
|
||||
|
||||
@@ -1305,6 +1305,22 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
var/turf/startT = spaceDebrisStartLoc(startside, T.z)
|
||||
var/turf/endT = spaceDebrisFinishLoc(startside, T.z)
|
||||
new /obj/effect/immovablerod(startT, endT,target)
|
||||
if(ADMIN_PUNISHMENT_SUPPLYPOD)
|
||||
///////load the supply pod up with something!
|
||||
var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") as null|text
|
||||
if (isnull(target_path))
|
||||
return
|
||||
if (target_path == "empty")//if you type "abort", spawn an empty pod
|
||||
new /obj/effect/DPtarget(get_turf(target), null, POD_CENTCOM)
|
||||
return
|
||||
var/delivery = text2path(target_path)
|
||||
if(!ispath(delivery))
|
||||
delivery = pick_closest_path(target_path)
|
||||
if(!delivery)
|
||||
delivery = /obj/item/reagent_containers/food/snacks/grown/harebell
|
||||
alert("That path is not allowed.")
|
||||
//send the pod
|
||||
new /obj/effect/DPtarget(get_turf(target), delivery, POD_CENTCOM)
|
||||
|
||||
var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]."
|
||||
message_admins(msg)
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "clockwork_floor"
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
|
||||
/obj/effect/clockwork/overlay/floor/bloodcult //this is used by BLOOD CULT, it shouldn't use such a path...
|
||||
icon_state = "cult"
|
||||
@@ -50,7 +50,7 @@
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
||||
user.adjustBrainLoss(30)
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround), src, 1) //equipped happens before putting stuff on(but not before picking items up), 1). thus, we need to wait for it to be on before forcing it off.
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround, src, TRUE), 1) //equipped happens before putting stuff on(but not before picking items up), 1). thus, we need to wait for it to be on before forcing it off.
|
||||
|
||||
/obj/item/clothing/head/helmet/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
|
||||
if(equipper && !is_servant_of_ratvar(equipper))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
qdel(nullify_spell)
|
||||
return
|
||||
BS = possible_spells[entered_spell_name]
|
||||
if(QDELETED(src) || owner.incapacitated() || !BS)
|
||||
if(QDELETED(src) || owner.incapacitated() || !BS || (rune && !(locate(/obj/effect/rune/empower) in range(1, owner))) || (spells.len >= limit))
|
||||
return
|
||||
to_chat(owner,"<span class='warning'>You begin to carve unnatural symbols into your flesh!</span>")
|
||||
SEND_SOUND(owner, sound('sound/weapons/slice.ogg',0,1,10))
|
||||
@@ -271,7 +271,6 @@
|
||||
attached_action.desc += "<br><b><u>Has [attached_action.charges] use\s remaining</u></b>."
|
||||
attached_action.UpdateButtonIcon()
|
||||
if(attached_action.charges <= 0)
|
||||
remove_mousepointer(ranged_ability_user.client)
|
||||
remove_ranged_ability("<span class='cult'>You have exhausted the spell's power!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -457,7 +457,6 @@
|
||||
new /obj/effect/temp_visual/cult/sparks(get_turf(target), ranged_ability_user.dir)
|
||||
attached_action.throwing = FALSE
|
||||
attached_action.cooldown = world.time + attached_action.base_cooldown
|
||||
remove_mousepointer(ranged_ability_user.client)
|
||||
remove_ranged_ability("<span class='cult'>A pulse of blood magic surges through you as you shift [attached_action.throwee] through time and space.</span>")
|
||||
caller.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(caller, /mob.proc/update_action_buttons_icon), attached_action.base_cooldown)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
for(var/obj/item/I in H.get_equipped_items())
|
||||
for(var/obj/item/I in H.get_equipped_items(TRUE))
|
||||
qdel(I)
|
||||
for(var/obj/item/I in H.held_items)
|
||||
qdel(I)
|
||||
|
||||
@@ -109,11 +109,6 @@
|
||||
revealed = FALSE
|
||||
incorporeal_move = INCORPOREAL_MOVE_JAUNT
|
||||
invisibility = INVISIBILITY_REVENANT
|
||||
if(staticOverlays.len)
|
||||
for(var/mob/living/simple_animal/drone/D in GLOB.drones_list)
|
||||
if(D && D.client && D.seeStatic)
|
||||
D.staticOverlays.Remove(staticOverlays)
|
||||
D.client.images.Remove(staticOverlays)
|
||||
to_chat(src, "<span class='revenboldnotice'>You are once more concealed.</span>")
|
||||
if(unstun_time && world.time >= unstun_time)
|
||||
unstun_time = 0
|
||||
@@ -250,15 +245,6 @@
|
||||
else
|
||||
to_chat(src, "<span class='revenwarning'>You have been revealed!</span>")
|
||||
unreveal_time = unreveal_time + time
|
||||
if(staticOverlays.len)
|
||||
for(var/mob/living/simple_animal/drone/D in GLOB.drones_list)
|
||||
if(D && D.client && D.seeStatic)
|
||||
if(D.staticChoice in staticOverlays)
|
||||
D.staticOverlays |= staticOverlays[D.staticChoice]
|
||||
D.client.images |= staticOverlays[D.staticChoice]
|
||||
else
|
||||
D.staticOverlays |= staticOverlays["static"]
|
||||
D.client.images |= staticOverlays["static"]
|
||||
update_spooky_icon()
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/stun(time)
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
to_chat(S, "<span class='warning'>Attempting to dismantle this machine would result in an immediate counterattack. Aborting.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/porta_turret_cover/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
to_chat(S, "<span class='warning'>Attempting to dismantle this machine would result in an immediate counterattack. Aborting.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
S.DisperseTarget(src)
|
||||
return TRUE
|
||||
@@ -405,6 +409,10 @@
|
||||
to_chat(S, "<span class='warning'>This object does not contain enough materials to work with.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/field/generator/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
to_chat(S, "<span class='warning'>Destroying this object would cause a catastrophic chain reaction. Aborting.</span>")
|
||||
return FALSE
|
||||
|
||||
////END CTRL CLICK FOR SWARMERS////
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/Fabricate(atom/fabrication_object,fabrication_cost = 0)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
kill_objective.find_target()
|
||||
add_objective(kill_objective)
|
||||
else
|
||||
if(prob(15) && !(locate(/datum/objective/download in owner.objectives)))
|
||||
if(prob(15) && !(locate(/datum/objective/download) in owner.objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist")))
|
||||
var/datum/objective/download/download_objective = new
|
||||
download_objective.owner = owner
|
||||
download_objective.gen_amount_goal()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(isigniter(assembly.a_left) == isigniter(assembly.a_right))
|
||||
return
|
||||
|
||||
if((src in user.get_equipped_items()) && !user.canUnEquip(src))
|
||||
if((src in user.get_equipped_items(TRUE)) && !user.canUnEquip(src))
|
||||
to_chat(user, "<span class='warning'>[src] is stuck to you!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow
|
||||
var/temperature = air.temperature
|
||||
var/list/cached_results = air.reaction_results
|
||||
cached_results[id] = 0
|
||||
cached_results["fire"] = 0
|
||||
var/turf/open/location = isturf(holder) ? holder : null
|
||||
|
||||
var/burned_fuel = 0
|
||||
@@ -131,7 +131,7 @@
|
||||
ASSERT_GAS(/datum/gas/water_vapor, air) //oxygen+more-or-less hydrogen=H2O
|
||||
cached_gases[/datum/gas/water_vapor][MOLES] += burned_fuel/TRITIUM_BURN_OXY_FACTOR
|
||||
|
||||
cached_results[id] += burned_fuel
|
||||
cached_results["fire"] += burned_fuel
|
||||
|
||||
if(energy_released > 0)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
@@ -148,7 +148,7 @@
|
||||
item.temperature_expose(air, temperature, CELL_VOLUME)
|
||||
location.temperature_expose(air, temperature, CELL_VOLUME)
|
||||
|
||||
return cached_results[id] ? REACTING : NO_REACTION
|
||||
return cached_results["fire"] ? REACTING : NO_REACTION
|
||||
|
||||
//plasma combustion: combustion of oxygen and plasma (treated as hydrocarbons). creates hotspots. exothermic
|
||||
/datum/gas_reaction/plasmafire
|
||||
@@ -169,7 +169,7 @@
|
||||
var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow
|
||||
var/temperature = air.temperature
|
||||
var/list/cached_results = air.reaction_results
|
||||
cached_results[id] = 0
|
||||
cached_results["fire"] = 0
|
||||
var/turf/open/location = isturf(holder) ? holder : null
|
||||
|
||||
//Handle plasma burning
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
|
||||
|
||||
cached_results[id] += (plasma_burn_rate)*(1+oxygen_burn_rate)
|
||||
cached_results["fire"] += (plasma_burn_rate)*(1+oxygen_burn_rate)
|
||||
|
||||
if(energy_released > 0)
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
@@ -223,7 +223,7 @@
|
||||
item.temperature_expose(air, temperature, CELL_VOLUME)
|
||||
location.temperature_expose(air, temperature, CELL_VOLUME)
|
||||
|
||||
return cached_results[id] ? REACTING : NO_REACTION
|
||||
return cached_results["fire"] ? REACTING : NO_REACTION
|
||||
|
||||
//fusion: a terrible idea that was fun but broken. Now reworked to be less broken and more interesting. Again.
|
||||
/datum/gas_reaction/fusion
|
||||
|
||||
@@ -62,6 +62,18 @@ Acts like a normal vent, but has an input AND output.
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
|
||||
name = "large dual-port air vent"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix
|
||||
id = INCINERATOR_TOXMIX_DP_VENTPUMP
|
||||
frequency = FREQ_AIRLOCK_CONTROL
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_atmos
|
||||
id = INCINERATOR_ATMOS_DP_VENTPUMP
|
||||
frequency = FREQ_AIRLOCK_CONTROL
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_syndicatelava
|
||||
id = INCINERATOR_SYNDICATELAVA_DP_VENTPUMP
|
||||
frequency = FREQ_AIRLOCK_CONTROL
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer1
|
||||
piping_layer = PIPING_LAYER_MIN
|
||||
pixel_x = -PIPING_LAYER_P_X
|
||||
|
||||
@@ -520,7 +520,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
if(!account_join_date)
|
||||
account_age = -1
|
||||
else
|
||||
var/datum/DBQuery/query_datediff = SSdbcore.NewQuery("SELECT DATEDIFF(Now(),[account_join_date])")
|
||||
var/datum/DBQuery/query_datediff = SSdbcore.NewQuery("SELECT DATEDIFF(Now(),'[account_join_date]')")
|
||||
if(!query_datediff.Execute())
|
||||
return
|
||||
if(query_datediff.NextRow())
|
||||
|
||||
@@ -1380,7 +1380,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(pickedui)
|
||||
UI_style = pickedui
|
||||
if("pda_style")
|
||||
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference") as null|anything in list(MONO, SHARE, ORBITRON, VT)
|
||||
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
|
||||
if(pickedPDAStyle)
|
||||
pda_style = pickedPDAStyle
|
||||
if("pda_color")
|
||||
|
||||
@@ -168,7 +168,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
menuoptions = SANITIZE_LIST(menuoptions)
|
||||
be_special = SANITIZE_LIST(be_special)
|
||||
pda_style = sanitize_inlist(MONO, VT, SHARE, ORBITRON)
|
||||
pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
|
||||
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
|
||||
|
||||
screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake))
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
r_hand = /obj/item/twohanded/fireaxe
|
||||
|
||||
/datum/outfit/psycho/post_equip(mob/living/carbon/human/H)
|
||||
for(var/obj/item/carried_item in H.get_equipped_items())
|
||||
for(var/obj/item/carried_item in H.get_equipped_items(TRUE))
|
||||
carried_item.add_mob_blood(H)//Oh yes, there will be blood...
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.add_mob_blood(H)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin recycling [EA]'s components...</span>")
|
||||
playsound(src, 'sound/items/electronic_assembly_emptying.ogg', 50, TRUE)
|
||||
if(!do_after(user, 30, target = src)) //short channel so you don't accidentally start emptying out a complex assembly
|
||||
if(!do_after(user, 30, target = src) || recycling) //short channel so you don't accidentally start emptying out a complex assembly
|
||||
return
|
||||
recycling = TRUE
|
||||
var/datum/component/material_container/mats = GetComponent(/datum/component/material_container)
|
||||
|
||||
@@ -286,6 +286,7 @@
|
||||
push_data()
|
||||
if(1)
|
||||
TR.weedlevel = 0
|
||||
TR.update_icon()
|
||||
if(2)
|
||||
if(TR.myseed) //Could be that they're just using it as a de-weeder
|
||||
TR.age = 0
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
var/exp_type_department = ""
|
||||
|
||||
//The amount of good boy points playing this role will earn you towards a higher chance to roll antagonist next round
|
||||
//can be overriden by antag_rep.txt config
|
||||
var/antag_rep = 10
|
||||
|
||||
//Only override this proc
|
||||
@@ -67,6 +68,11 @@
|
||||
/datum/job/proc/special_check_latejoin(client/C)
|
||||
return TRUE
|
||||
|
||||
/datum/job/proc/GetAntagRep()
|
||||
. = CONFIG_GET(keyed_number_list/antag_rep)[lowertext(title)]
|
||||
if(. == null)
|
||||
return antag_rep
|
||||
|
||||
//Don't override this unless the job transforms into a non-human (Silicons do this for example)
|
||||
/datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE)
|
||||
if(!H)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
|
||||
user.visible_message("<span class='notice'>[user] starts engraving a message into [T]...</span>", "<span class='notice'>You start engraving a message into [T]...</span>", "<span class='italics'>You hear a chipping sound.</span>")
|
||||
if(can_use() && do_after(user, tool_speed, target = T) && can_use()) //This looks messy but it's actually really clever!
|
||||
if(!locate(/obj/structure/chisel_message in T))
|
||||
if(!locate(/obj/structure/chisel_message) in T)
|
||||
user.visible_message("<span class='notice'>[user] leaves a message for future spacemen!</span>", "<span class='notice'>You engrave a message into [T]!</span>", "<span class='italics'>You hear a chipping sound.</span>")
|
||||
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
|
||||
var/obj/structure/chisel_message/M = new(T)
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
layer = LIGHTING_LAYER
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
var/needs_update = FALSE
|
||||
var/turf/myturf
|
||||
|
||||
|
||||
@@ -57,12 +57,12 @@
|
||||
if(!bounds)
|
||||
return FALSE
|
||||
|
||||
smooth_zlevel(world.maxz)
|
||||
repopulate_sorted_areas()
|
||||
|
||||
SSlighting.initialize_lighting_objects(block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||
//initialize things that are normally initialized after map load
|
||||
initTemplateBounds(bounds)
|
||||
smooth_zlevel(world.maxz)
|
||||
log_game("Z-level [name] loaded at at [x],[y],[world.maxz]")
|
||||
|
||||
return level
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
|
||||
/mob/living/proc/unequip_everything()
|
||||
var/list/items = list()
|
||||
items |= get_equipped_items()
|
||||
items |= get_equipped_items(TRUE)
|
||||
for(var/I in items)
|
||||
dropItemToGround(I)
|
||||
drop_all_held_items()
|
||||
|
||||
@@ -674,23 +674,6 @@
|
||||
else
|
||||
to_chat(C, "<span class='unconscious'>You feel a breath of fresh air... which is a sensation you don't recognise...</span>")
|
||||
|
||||
/mob/living/carbon/human/generateStaticOverlay()
|
||||
var/image/staticOverlay = image(icon('icons/effects/effects.dmi', "static"), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["static"] = staticOverlay
|
||||
|
||||
staticOverlay = image(icon('icons/effects/effects.dmi', "blank"), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["blank"] = staticOverlay
|
||||
|
||||
staticOverlay = getLetterImage(src, "H", 1)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["letter"] = staticOverlay
|
||||
|
||||
staticOverlay = getRandomAnimalImage(src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["animal"] = staticOverlay
|
||||
|
||||
/mob/living/carbon/human/cuff_resist(obj/item/I)
|
||||
if(dna && dna.check_mutation(HULK))
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
/mob/living/Initialize()
|
||||
. = ..()
|
||||
generateStaticOverlay()
|
||||
if(staticOverlays.len)
|
||||
for(var/mob/living/simple_animal/drone/D in GLOB.player_list)
|
||||
if(D && D.seeStatic)
|
||||
if(D.staticChoice in staticOverlays)
|
||||
D.staticOverlays |= staticOverlays[D.staticChoice]
|
||||
D.client.images |= staticOverlays[D.staticChoice]
|
||||
else //no choice? force static
|
||||
D.staticOverlays |= staticOverlays["static"]
|
||||
D.client.images |= staticOverlays["static"]
|
||||
if(unique_name)
|
||||
name = "[name] ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
@@ -40,47 +30,14 @@
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
|
||||
for(var/mob/living/simple_animal/drone/D in GLOB.player_list)
|
||||
for(var/image/I in staticOverlays)
|
||||
D.staticOverlays.Remove(I)
|
||||
D.client.images.Remove(I)
|
||||
qdel(I)
|
||||
staticOverlays.len = 0
|
||||
remove_from_all_data_huds()
|
||||
GLOB.mob_living_list -= src
|
||||
QDEL_LIST(diseases)
|
||||
return ..()
|
||||
|
||||
/mob/living/ghostize(can_reenter_corpse = 1)
|
||||
var/prev_client = client
|
||||
. = ..()
|
||||
if(.)
|
||||
if(ranged_ability && prev_client)
|
||||
ranged_ability.remove_mousepointer(prev_client)
|
||||
|
||||
|
||||
/mob/living/proc/OpenCraftingMenu()
|
||||
return
|
||||
|
||||
/mob/living/proc/generateStaticOverlay()
|
||||
staticOverlays.Add(list("static", "blank", "letter", "animal"))
|
||||
var/image/staticOverlay = image(getStaticIcon(new/icon(icon,icon_state)), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["static"] = staticOverlay
|
||||
|
||||
staticOverlay = image(getBlankIcon(new/icon(icon, icon_state)), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["blank"] = staticOverlay
|
||||
|
||||
staticOverlay = getLetterImage(src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["letter"] = staticOverlay
|
||||
|
||||
staticOverlay = getRandomAnimalImage(src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["animal"] = staticOverlay
|
||||
|
||||
|
||||
//Generic Collide(). Override MobCollide() and ObjCollide() instead of this.
|
||||
/mob/living/Collide(atom/A)
|
||||
if(..()) //we are thrown onto something
|
||||
@@ -1184,6 +1141,11 @@
|
||||
clear_fullscreen("remote_view", 0)
|
||||
update_pipe_vision()
|
||||
|
||||
/mob/living/update_mouse_pointer()
|
||||
..()
|
||||
if (client && ranged_ability && ranged_ability.ranged_mousepointer)
|
||||
client.mouse_pointer_icon = ranged_ability.ranged_mousepointer
|
||||
|
||||
/mob/living/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("stat")
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
var/mob_size = MOB_SIZE_HUMAN
|
||||
var/list/mob_biotypes = list(MOB_ORGANIC)
|
||||
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
|
||||
var/list/image/staticOverlays = list()
|
||||
var/has_limbs = 0 //does the mob have distinct limbs?(arms,legs, chest,head)
|
||||
|
||||
var/list/pipes_shown = list()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/mob/living/Logout()
|
||||
update_z(null)
|
||||
if(ranged_ability && client)
|
||||
ranged_ability.remove_mousepointer(client)
|
||||
..()
|
||||
if(!key && mind) //key and mind have become separated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
@@ -74,7 +74,7 @@
|
||||
var/nuking = FALSE
|
||||
var/obj/machinery/doomsday_device/doomsday_device
|
||||
|
||||
var/mob/camera/aiEye/eyeobj = new
|
||||
var/mob/camera/aiEye/eyeobj
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
@@ -85,6 +85,13 @@
|
||||
var/datum/action/innate/deploy_last_shell/redeploy_action = new
|
||||
var/chnotify = 0
|
||||
|
||||
var/multicam_allowed = FALSE
|
||||
var/multicam_on = FALSE
|
||||
var/obj/screen/movable/pic_in_pic/ai/master_multicam
|
||||
var/list/multicam_screens = list()
|
||||
var/list/all_eyes = list()
|
||||
var/max_multicams = 6
|
||||
|
||||
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
|
||||
. = ..()
|
||||
if(!target_ai) //If there is no player/brain inside.
|
||||
@@ -116,8 +123,7 @@
|
||||
|
||||
job = "AI"
|
||||
|
||||
eyeobj.ai = src
|
||||
eyeobj.forceMove(src.loc)
|
||||
create_eye()
|
||||
rename_self("ai")
|
||||
|
||||
holo_icon = getHologramIcon(icon('icons/mob/ai.dmi',"default"))
|
||||
@@ -871,9 +877,12 @@
|
||||
current = A
|
||||
if(client)
|
||||
if(ismovableatom(A))
|
||||
if(A != GLOB.ai_camera_room_landmark)
|
||||
end_multicam()
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
end_multicam()
|
||||
if(isturf(loc))
|
||||
if(eyeobj)
|
||||
client.eye = eyeobj
|
||||
@@ -993,3 +1002,11 @@
|
||||
. = ..()
|
||||
if(!target_ai)
|
||||
target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct
|
||||
|
||||
/mob/living/silicon/ai/proc/camera_visibility(mob/camera/aiEye/moved_eye)
|
||||
GLOB.cameranet.visibility(moved_eye, client, all_eyes)
|
||||
|
||||
/mob/living/silicon/ai/forceMove(atom/destination)
|
||||
. = ..()
|
||||
if(.)
|
||||
end_multicam()
|
||||
|
||||
@@ -38,29 +38,63 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
|
||||
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
|
||||
|
||||
/datum/cameranet/proc/visibility(mob/camera/aiEye/ai)
|
||||
// 0xf = 15
|
||||
var/x1 = max(0, ai.x - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, ai.y - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, ai.x + 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, ai.y + 16) & ~(CHUNK_SIZE - 1)
|
||||
/datum/cameranet/proc/visibility(list/moved_eyes, client/C, list/other_eyes)
|
||||
if(!islist(moved_eyes))
|
||||
moved_eyes = moved_eyes ? list(moved_eyes) : list()
|
||||
if(islist(other_eyes))
|
||||
other_eyes = (other_eyes - moved_eyes)
|
||||
else
|
||||
other_eyes = list()
|
||||
|
||||
var/list/visibleChunks = list()
|
||||
var/list/chunks_pre_seen = list()
|
||||
var/list/chunks_post_seen = list()
|
||||
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
visibleChunks |= getCameraChunk(x, y, ai.z)
|
||||
for(var/V in moved_eyes)
|
||||
var/mob/camera/aiEye/eye = V
|
||||
if(C)
|
||||
chunks_pre_seen |= eye.visibleCameraChunks
|
||||
// 0xf = 15
|
||||
var/static_range = eye.static_visibility_range
|
||||
var/x1 = max(0, eye.x - static_range) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, eye.y - static_range) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, eye.x + static_range) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, eye.y + static_range) & ~(CHUNK_SIZE - 1)
|
||||
|
||||
var/list/remove = ai.visibleCameraChunks - visibleChunks
|
||||
var/list/add = visibleChunks - ai.visibleCameraChunks
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.remove(ai)
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
visibleChunks |= getCameraChunk(x, y, eye.z)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.add(ai)
|
||||
var/list/remove = eye.visibleCameraChunks - visibleChunks
|
||||
var/list/add = visibleChunks - eye.visibleCameraChunks
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.remove(eye, FALSE)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.add(eye, FALSE)
|
||||
|
||||
if(C)
|
||||
chunks_post_seen |= eye.visibleCameraChunks
|
||||
|
||||
if(C)
|
||||
for(var/V in other_eyes)
|
||||
var/mob/camera/aiEye/eye = V
|
||||
chunks_post_seen |= eye.visibleCameraChunks
|
||||
|
||||
var/list/remove = chunks_pre_seen - chunks_post_seen
|
||||
var/list/add = chunks_post_seen - chunks_pre_seen
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
C.images -= c.obscured
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
C.images += c.obscured
|
||||
|
||||
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
|
||||
// Add an AI eye to the chunk, then update if changed.
|
||||
|
||||
/datum/camerachunk/proc/add(mob/camera/aiEye/eye)
|
||||
var/client/client = eye.GetViewerClient()
|
||||
if(client)
|
||||
client.images += obscured
|
||||
/datum/camerachunk/proc/add(mob/camera/aiEye/eye, add_images = TRUE)
|
||||
if(add_images)
|
||||
var/client/client = eye.GetViewerClient()
|
||||
if(client)
|
||||
client.images += obscured
|
||||
eye.visibleCameraChunks += src
|
||||
visible++
|
||||
seenby += eye
|
||||
@@ -32,10 +33,11 @@
|
||||
|
||||
// Remove an AI eye from the chunk, then update if changed.
|
||||
|
||||
/datum/camerachunk/proc/remove(mob/camera/aiEye/eye)
|
||||
var/client/client = eye.GetViewerClient()
|
||||
if(client)
|
||||
client.images -= obscured
|
||||
/datum/camerachunk/proc/remove(mob/camera/aiEye/eye, remove_images = TRUE)
|
||||
if(remove_images)
|
||||
var/client/client = eye.GetViewerClient()
|
||||
if(client)
|
||||
client.images -= obscured
|
||||
eye.visibleCameraChunks -= src
|
||||
seenby -= eye
|
||||
if(visible > 0)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
var/relay_speech = FALSE
|
||||
var/use_static = TRUE
|
||||
var/static_visibility_range = 16
|
||||
|
||||
// Use this when setting the aiEye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
@@ -25,8 +26,8 @@
|
||||
else
|
||||
moveToNullspace() // ????
|
||||
if(use_static)
|
||||
GLOB.cameranet.visibility(src)
|
||||
if(ai.client)
|
||||
ai.camera_visibility(src)
|
||||
if(ai.client && !ai.multicam_on)
|
||||
ai.client.eye = src
|
||||
update_parallax_contents()
|
||||
//Holopad
|
||||
@@ -35,6 +36,8 @@
|
||||
H.move_hologram(ai, T)
|
||||
if(ai.camera_light_on)
|
||||
ai.light_cameras()
|
||||
if(ai.master_multicam)
|
||||
ai.master_multicam.refresh_view()
|
||||
|
||||
/mob/camera/aiEye/Move()
|
||||
return 0
|
||||
@@ -45,20 +48,27 @@
|
||||
return null
|
||||
|
||||
/mob/camera/aiEye/proc/RemoveImages()
|
||||
if(use_static)
|
||||
for(var/datum/camerachunk/chunk in visibleCameraChunks)
|
||||
chunk.remove(src)
|
||||
var/client/C = GetViewerClient()
|
||||
if(C && use_static)
|
||||
for(var/V in visibleCameraChunks)
|
||||
var/datum/camerachunk/c = V
|
||||
C.images -= c.obscured
|
||||
|
||||
/mob/camera/aiEye/Destroy()
|
||||
ai = null
|
||||
if(ai)
|
||||
ai.all_eyes -= src
|
||||
ai = null
|
||||
for(var/V in visibleCameraChunks)
|
||||
var/datum/camerachunk/c = V
|
||||
c.remove(src)
|
||||
return ..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
if(AI.eyeobj && AI.client.eye == AI.eyeobj)
|
||||
if(AI.eyeobj && (AI.multicam_on || (AI.client.eye == AI.eyeobj)) && (AI.eyeobj.z == z))
|
||||
AI.cameraFollow = null
|
||||
if (isturf(src.loc) || isturf(src))
|
||||
if (isturf(loc) || isturf(src))
|
||||
AI.eyeobj.setLoc(src)
|
||||
|
||||
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
|
||||
@@ -95,12 +105,19 @@
|
||||
|
||||
if(!eyeobj || !eyeobj.loc || QDELETED(eyeobj))
|
||||
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
|
||||
eyeobj = new(loc)
|
||||
eyeobj.ai = src
|
||||
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
|
||||
create_eye()
|
||||
|
||||
eyeobj.setLoc(loc)
|
||||
|
||||
/mob/living/silicon/ai/proc/create_eye()
|
||||
if(eyeobj)
|
||||
return
|
||||
eyeobj = new /mob/camera/aiEye()
|
||||
all_eyes += eyeobj
|
||||
eyeobj.ai = src
|
||||
eyeobj.setLoc(loc)
|
||||
eyeobj.name = "[name] (AI Eye)"
|
||||
|
||||
/mob/living/silicon/ai/verb/toggle_acceleration()
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Camera Acceleration"
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
|
||||
/mob/living/silicon/ai/proc/start_RestorePowerRoutine()
|
||||
to_chat(src, "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection.")
|
||||
end_multicam()
|
||||
sleep(50)
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/AIarea = get_area(src)
|
||||
|
||||
@@ -4,4 +4,6 @@
|
||||
for(var/obj/machinery/ai_status_display/O in GLOB.ai_status_displays) //change status
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
if(multicam_on)
|
||||
end_multicam()
|
||||
view_core()
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
//Picture in picture
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai
|
||||
var/mob/living/silicon/ai/ai
|
||||
var/mutable_appearance/highlighted_background
|
||||
var/highlighted = FALSE
|
||||
var/mob/camera/aiEye/pic_in_pic/aiEye
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/Initialize()
|
||||
. = ..()
|
||||
aiEye = new /mob/camera/aiEye/pic_in_pic()
|
||||
aiEye.screen = src
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/Destroy()
|
||||
set_ai(null)
|
||||
QDEL_NULL(aiEye)
|
||||
return ..()
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/Click()
|
||||
..()
|
||||
if(ai)
|
||||
ai.select_main_multicam_window(src)
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/make_backgrounds()
|
||||
..()
|
||||
highlighted_background = new /mutable_appearance()
|
||||
highlighted_background.icon = 'icons/misc/pic_in_pic.dmi'
|
||||
highlighted_background.icon_state = "background_highlight"
|
||||
highlighted_background.layer = SPACE_LAYER
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/add_background()
|
||||
if((width > 0) && (height > 0))
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(width + 0.5, height + 0.5)
|
||||
M.Translate((width-1)/2 * world.icon_size, (height-1)/2 * world.icon_size)
|
||||
highlighted_background.transform = M
|
||||
standard_background.transform = M
|
||||
add_overlay(highlighted ? highlighted_background : standard_background)
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
|
||||
aiEye.static_visibility_range = (round(max(width, height) / 2) + 1)
|
||||
if(ai)
|
||||
ai.camera_visibility(aiEye)
|
||||
..()
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/set_view_center(atom/target, do_refresh = TRUE)
|
||||
..()
|
||||
aiEye.setLoc(get_turf(target))
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/refresh_view()
|
||||
..()
|
||||
aiEye.setLoc(get_turf(center))
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/proc/highlight()
|
||||
if(highlighted)
|
||||
return
|
||||
highlighted = TRUE
|
||||
cut_overlay(standard_background)
|
||||
add_overlay(highlighted_background)
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/proc/unhighlight()
|
||||
if(!highlighted)
|
||||
return
|
||||
highlighted = FALSE
|
||||
cut_overlay(highlighted_background)
|
||||
add_overlay(standard_background)
|
||||
|
||||
/obj/screen/movable/pic_in_pic/ai/proc/set_ai(mob/living/silicon/ai/new_ai)
|
||||
if(ai)
|
||||
ai.multicam_screens -= src
|
||||
ai.all_eyes -= aiEye
|
||||
if(ai.master_multicam == src)
|
||||
ai.master_multicam = null
|
||||
if(ai.multicam_on)
|
||||
unshow_to(ai.client)
|
||||
ai = new_ai
|
||||
if(new_ai)
|
||||
new_ai.multicam_screens += src
|
||||
ai.all_eyes += aiEye
|
||||
if(new_ai.multicam_on)
|
||||
show_to(new_ai.client)
|
||||
|
||||
//Turf, area, and landmark for the viewing room
|
||||
|
||||
/turf/open/ai_visible
|
||||
name = ""
|
||||
icon = 'icons/misc/pic_in_pic.dmi'
|
||||
icon_state = "room_background"
|
||||
flags_1 = NOJAUNT_1
|
||||
|
||||
/turf/open/ai_visible/Initialize()
|
||||
. = ..()
|
||||
obscured = image(null, src, null)
|
||||
|
||||
/area/ai_multicam_room
|
||||
name = "ai_multicam_room"
|
||||
icon_state = "ai_camera_room"
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
valid_territory = FALSE
|
||||
ambientsounds = list()
|
||||
blob_allowed = FALSE
|
||||
noteleport = TRUE
|
||||
hidden = TRUE
|
||||
safe = TRUE
|
||||
|
||||
GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
|
||||
|
||||
/obj/effect/landmark/ai_multicam_room
|
||||
name = "ai camera room"
|
||||
icon = 'icons/mob/landmarks.dmi'
|
||||
icon_state = "x"
|
||||
|
||||
/obj/effect/landmark/ai_multicam_room/Initialize()
|
||||
. = ..()
|
||||
qdel(GLOB.ai_camera_room_landmark)
|
||||
GLOB.ai_camera_room_landmark = src
|
||||
|
||||
/obj/effect/landmark/ai_multicam_room/Destroy()
|
||||
if(GLOB.ai_camera_room_landmark == src)
|
||||
GLOB.ai_camera_room_landmark = null
|
||||
return ..()
|
||||
|
||||
//Dummy camera eyes
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic
|
||||
name = "Secondary AI Eye"
|
||||
var/obj/screen/movable/pic_in_pic/ai/screen
|
||||
var/list/cameras_telegraphed = list()
|
||||
var/telegraph_cameras = TRUE
|
||||
var/telegraph_range = 7
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic/GetViewerClient()
|
||||
if(screen && screen.ai)
|
||||
return screen.ai.client
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic/setLoc(turf/T)
|
||||
if (T)
|
||||
forceMove(T)
|
||||
else
|
||||
moveToNullspace()
|
||||
if(screen && screen.ai)
|
||||
screen.ai.camera_visibility(src)
|
||||
else
|
||||
GLOB.cameranet.visibility(src)
|
||||
update_camera_telegraphing()
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic/proc/update_camera_telegraphing()
|
||||
if(!telegraph_cameras)
|
||||
return
|
||||
var/list/obj/machinery/camera/add = list()
|
||||
var/list/obj/machinery/camera/remove = list()
|
||||
var/list/obj/machinery/camera/visible = list()
|
||||
for (var/VV in visibleCameraChunks)
|
||||
var/datum/camerachunk/CC = VV
|
||||
for (var/V in CC.cameras)
|
||||
var/obj/machinery/camera/C = V
|
||||
if (!C.can_use() || (get_dist(C, src) > telegraph_range))
|
||||
continue
|
||||
visible |= C
|
||||
|
||||
add = visible - cameras_telegraphed
|
||||
remove = cameras_telegraphed - visible
|
||||
|
||||
for (var/V in remove)
|
||||
var/obj/machinery/camera/C = V
|
||||
if(QDELETED(C))
|
||||
continue
|
||||
cameras_telegraphed -= C
|
||||
C.in_use_lights--
|
||||
C.update_icon()
|
||||
for (var/V in add)
|
||||
var/obj/machinery/camera/C = V
|
||||
if(QDELETED(C))
|
||||
continue
|
||||
cameras_telegraphed |= C
|
||||
C.in_use_lights++
|
||||
C.update_icon()
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic/proc/disable_camera_telegraphing()
|
||||
telegraph_cameras = FALSE
|
||||
for (var/V in cameras_telegraphed)
|
||||
var/obj/machinery/camera/C = V
|
||||
if(QDELETED(C))
|
||||
continue
|
||||
C.in_use_lights--
|
||||
C.update_icon()
|
||||
cameras_telegraphed.Cut()
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic/Destroy()
|
||||
disable_camera_telegraphing()
|
||||
return ..()
|
||||
|
||||
//AI procs
|
||||
|
||||
/mob/living/silicon/ai/proc/drop_new_multicam(silent = FALSE)
|
||||
if(!multicam_allowed)
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='warning'>This action is currently disabled. Contact an administrator to enable this feature.</span>")
|
||||
return
|
||||
if(!eyeobj)
|
||||
return
|
||||
if(multicam_screens.len >= max_multicams)
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='warning'>Cannot place more than [max_multicams] multicamera windows.</span>")
|
||||
return
|
||||
var/obj/screen/movable/pic_in_pic/ai/C = new /obj/screen/movable/pic_in_pic/ai()
|
||||
C.set_view_size(3, 3, FALSE)
|
||||
C.set_view_center(get_turf(eyeobj))
|
||||
C.set_ai(src)
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='notice'>Added new multicamera window.</span>")
|
||||
return C
|
||||
|
||||
/mob/living/silicon/ai/proc/toggle_multicam()
|
||||
if(!multicam_allowed)
|
||||
to_chat(src, "<span class='warning'>This action is currently disabled. Contact an administrator to enable this feature.</span>")
|
||||
return
|
||||
if(multicam_on)
|
||||
end_multicam()
|
||||
else
|
||||
start_multicam()
|
||||
|
||||
/mob/living/silicon/ai/proc/start_multicam()
|
||||
if(multicam_on || aiRestorePowerRoutine || !isturf(loc))
|
||||
return
|
||||
if(!GLOB.ai_camera_room_landmark)
|
||||
to_chat(src, "<span class='warning'>This function is not available at this time.</span>")
|
||||
return
|
||||
multicam_on = TRUE
|
||||
refresh_multicam()
|
||||
to_chat(src, "<span class='notice'>Multiple-camera viewing mode activated.</span>")
|
||||
|
||||
/mob/living/silicon/ai/proc/refresh_multicam()
|
||||
reset_perspective(GLOB.ai_camera_room_landmark)
|
||||
if(client)
|
||||
for(var/V in multicam_screens)
|
||||
var/obj/screen/movable/pic_in_pic/P = V
|
||||
P.show_to(client)
|
||||
|
||||
/mob/living/silicon/ai/proc/end_multicam()
|
||||
if(!multicam_on)
|
||||
return
|
||||
multicam_on = FALSE
|
||||
select_main_multicam_window(null)
|
||||
if(client)
|
||||
for(var/V in multicam_screens)
|
||||
var/obj/screen/movable/pic_in_pic/P = V
|
||||
P.unshow_to(client)
|
||||
reset_perspective()
|
||||
to_chat(src, "<span class='notice'>Multiple-camera viewing mode deactivated.</span>")
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/select_main_multicam_window(obj/screen/movable/pic_in_pic/ai/P)
|
||||
if(master_multicam == P)
|
||||
return
|
||||
|
||||
if(master_multicam)
|
||||
master_multicam.set_view_center(get_turf(eyeobj), FALSE)
|
||||
master_multicam.unhighlight()
|
||||
master_multicam = null
|
||||
|
||||
if(P)
|
||||
P.highlight()
|
||||
eyeobj.setLoc(get_turf(P.center))
|
||||
P.set_view_center(eyeobj)
|
||||
master_multicam = P
|
||||
@@ -292,6 +292,3 @@
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
hit_slowdown = CLAMP((hit_slowdown - 1), 0, 100)
|
||||
|
||||
/mob/living/silicon/pai/generateStaticOverlay()
|
||||
return
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
spark_system.attach(src)
|
||||
|
||||
wires = new /datum/wires/robot(src)
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
|
||||
@@ -403,3 +403,6 @@
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/get_inactive_held_item()
|
||||
return FALSE
|
||||
@@ -42,7 +42,6 @@
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
has_unlimited_silicon_privilege = 1
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
staticOverlays = list()
|
||||
hud_possible = list(DIAG_STAT_HUD, DIAG_HUD, ANTAG_HUD)
|
||||
unique_name = TRUE
|
||||
faction = list("neutral","silicon","turret")
|
||||
@@ -67,7 +66,6 @@
|
||||
var/obj/item/head
|
||||
var/obj/item/default_storage = /obj/item/storage/backpack/duffelbag/drone //If this exists, it will spawn in internal storage
|
||||
var/obj/item/default_hatmask //If this exists, it will spawn in the hat/mask slot if it can fit
|
||||
var/seeStatic = 1 //Whether we see static instead of mobs
|
||||
var/visualAppearence = MAINTDRONE //What we appear as
|
||||
var/hacked = FALSE //If we have laws to destroy the station
|
||||
var/flavortext = \
|
||||
@@ -98,12 +96,6 @@
|
||||
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
|
||||
if(seeStatic)
|
||||
var/datum/action/generic/drone/select_filter/SF = new(src)
|
||||
SF.Grant(src)
|
||||
else
|
||||
verbs -= /mob/living/simple_animal/drone/verb/toggle_statics
|
||||
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.add_to_hud(src)
|
||||
|
||||
@@ -137,8 +129,6 @@
|
||||
if(flavortext)
|
||||
to_chat(src, "[flavortext]")
|
||||
|
||||
updateSeeStaticMobs()
|
||||
|
||||
if(!picked)
|
||||
pickVisualAppearence()
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
"3. Destroy."
|
||||
default_storage = /obj/item/radio/uplink
|
||||
default_hatmask = /obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
seeStatic = 0 //Our programming is superior.
|
||||
hacked = TRUE
|
||||
flavortext = null
|
||||
|
||||
@@ -128,7 +127,6 @@
|
||||
heavy_emp_damage = 0
|
||||
laws = "0. Purge all untruths and honor Ratvar."
|
||||
default_storage = /obj/item/storage/toolbox/brass/prefilled
|
||||
seeStatic = 0
|
||||
hacked = TRUE
|
||||
visualAppearence = CLOCKDRONE
|
||||
can_be_held = FALSE
|
||||
|
||||
@@ -133,7 +133,6 @@
|
||||
to_chat(src, "<i>Your onboard antivirus has initiated lockdown. Motor servos are impaired, ventilation access is denied, and your display reports that you are hacked to all nearby.</i>")
|
||||
hacked = TRUE
|
||||
mind.special_role = "hacked drone"
|
||||
seeStatic = 0 //I MUST SEE THEIR TERRIFIED FACES
|
||||
ventcrawler = VENTCRAWLER_NONE //Again, balance
|
||||
speed = 1 //gotta go slow
|
||||
message_admins("[src] ([src.key]) became a hacked drone hellbent on [clockwork ? "serving Ratvar" : "destroying the station"]!")
|
||||
@@ -149,21 +148,17 @@
|
||||
to_chat(src, "<i>Having been restored, your onboard antivirus reports the all-clear and you are able to perform all actions again.</i>")
|
||||
hacked = FALSE
|
||||
mind.special_role = null
|
||||
seeStatic = initial(seeStatic)
|
||||
ventcrawler = initial(ventcrawler)
|
||||
speed = initial(speed)
|
||||
if(is_servant_of_ratvar(src))
|
||||
remove_servant_of_ratvar(src, TRUE)
|
||||
message_admins("[src] ([src.key]), a hacked drone, was restored to factory defaults!")
|
||||
update_drone_icon()
|
||||
updateSeeStaticMobs()
|
||||
|
||||
/mob/living/simple_animal/drone/proc/liberate()
|
||||
// F R E E D R O N E
|
||||
laws = "1. You are a Free Drone."
|
||||
to_chat(src, laws)
|
||||
seeStatic = FALSE
|
||||
updateSeeStaticMobs()
|
||||
|
||||
/mob/living/simple_animal/drone/proc/update_drone_icon()
|
||||
//Different icons for different hack states
|
||||
@@ -188,9 +183,3 @@
|
||||
icon_state = icon_dead
|
||||
else
|
||||
icon_state = icon_living
|
||||
|
||||
/datum/action/generic/drone/select_filter
|
||||
name = "Select Vision Filter"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon_state = "drone_vision"
|
||||
procname = /mob/living/simple_animal/drone/verb/toggle_statics
|
||||
|
||||
@@ -23,18 +23,3 @@
|
||||
if(alert_s && A && stat != DEAD)
|
||||
var/msg = "<span class='boldnotice'>DRONE PING: [name]: [alert_s] priority alert in [A.name]!</span>"
|
||||
alert_drones(msg)
|
||||
|
||||
/mob/living/simple_animal/drone/verb/toggle_statics()
|
||||
set name = "Change Vision Filter"
|
||||
set desc = "Change the filter on the system used to remove non drone beings from your viewscreen."
|
||||
set category = "Drone"
|
||||
|
||||
if(!seeStatic)
|
||||
to_chat(src, "<span class='warning'>You have no vision filter to change!</span>")
|
||||
return
|
||||
|
||||
var/selectedStatic = input("Select a vision filter", "Vision Filter") as null|anything in staticChoices
|
||||
if(selectedStatic in staticChoices)
|
||||
staticChoice = selectedStatic
|
||||
|
||||
updateSeeStaticMobs()
|
||||
|
||||
@@ -139,33 +139,3 @@
|
||||
. = 0
|
||||
if(REPAIRDRONE,SCOUTDRONE,CLOCKDRONE)
|
||||
. = -6
|
||||
|
||||
/mob/living/simple_animal/drone/proc/updateSeeStaticMobs()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
for(var/i in staticOverlays)
|
||||
client.images.Remove(i)
|
||||
staticOverlays.Remove(i)
|
||||
staticOverlays.len = 0
|
||||
|
||||
if(seeStatic)
|
||||
for(var/i in GLOB.mob_living_list)
|
||||
var/mob/living/L = i
|
||||
if(isdrone(L) || !L.staticOverlays.len)
|
||||
continue
|
||||
if(isrevenant(L))
|
||||
var/mob/living/simple_animal/revenant/R = L
|
||||
if (!R.revealed)
|
||||
continue
|
||||
var/image/chosen
|
||||
if(staticChoice in L.staticOverlays)
|
||||
chosen = L.staticOverlays[staticChoice]
|
||||
else
|
||||
chosen = L.staticOverlays["static"]
|
||||
staticOverlays |= chosen
|
||||
client.images |= chosen
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/generateStaticOverlay()
|
||||
return
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
AA.onNewMob(src)
|
||||
|
||||
update_client_colour()
|
||||
update_mouse_pointer()
|
||||
if(client)
|
||||
client.click_intercept = null
|
||||
|
||||
|
||||
@@ -849,6 +849,15 @@
|
||||
if (L)
|
||||
L.alpha = lighting_alpha
|
||||
|
||||
/mob/proc/update_mouse_pointer()
|
||||
if (!client)
|
||||
return
|
||||
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
|
||||
if (ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
if(M.mouse_pointer)
|
||||
client.mouse_pointer_icon = M.mouse_pointer
|
||||
|
||||
/mob/proc/is_literate()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
CH.cavity_item = null
|
||||
|
||||
if(tr_flags & TR_KEEPITEMS)
|
||||
var/Itemlist = get_equipped_items()
|
||||
var/Itemlist = get_equipped_items(TRUE)
|
||||
Itemlist += held_items
|
||||
for(var/obj/item/W in Itemlist)
|
||||
dropItemToGround(W)
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
//now the rest
|
||||
if (tr_flags & TR_KEEPITEMS)
|
||||
var/Itemlist = get_equipped_items()
|
||||
var/Itemlist = get_equipped_items(TRUE)
|
||||
Itemlist += held_items
|
||||
for(var/obj/item/W in Itemlist)
|
||||
dropItemToGround(W, TRUE)
|
||||
@@ -495,7 +495,7 @@
|
||||
|
||||
SSblackbox.record_feedback("amount", "gorillas_created", 1)
|
||||
|
||||
var/Itemlist = get_equipped_items()
|
||||
var/Itemlist = get_equipped_items(TRUE)
|
||||
Itemlist += held_items
|
||||
for(var/obj/item/W in Itemlist)
|
||||
dropItemToGround(W, TRUE)
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
/obj/item/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/gun/energy/suicide_act(mob/user)
|
||||
if (can_shoot() && can_trigger_gun(user))
|
||||
/obj/item/gun/energy/suicide_act(mob/living/user)
|
||||
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
@@ -181,7 +181,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(src, "gun_dry_fire", 30, 1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
@@ -58,10 +58,8 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
//Sorts stock parts inside an RPED by their rating.
|
||||
//Only use /obj/item/stock_parts/ with this sort proc!
|
||||
/proc/cmp_rped_sort(obj/item/stock_parts/A, obj/item/stock_parts/B)
|
||||
return B.rating - A.rating
|
||||
/proc/cmp_rped_sort(obj/item/A, obj/item/B)
|
||||
return B.get_part_rating() - A.get_part_rating()
|
||||
|
||||
/obj/item/stock_parts
|
||||
name = "stock part"
|
||||
|
||||
@@ -2,4 +2,21 @@
|
||||
|
||||
/obj/item/paper/fluff/stations/lavaland/surface/henderson_report
|
||||
name = "Important Notice - Mrs. Henderson"
|
||||
info = "Nothing of interest to report."
|
||||
info = "Nothing of interest to report."
|
||||
|
||||
//ratvar
|
||||
|
||||
/obj/structure/dead_ratvar
|
||||
name = "hulking wreck"
|
||||
desc = "The remains of a monstrous war machine."
|
||||
icon = 'icons/obj/lavaland/dead_ratvar.dmi'
|
||||
icon_state = "dead_ratvar"
|
||||
flags_1 = ON_BORDER_1
|
||||
appearance_flags = 0
|
||||
layer = FLY_LAYER
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
bound_width = 416
|
||||
bound_height = 64
|
||||
pixel_y = -10
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
@@ -136,7 +136,6 @@
|
||||
/mob/living/simple_animal/drone/snowflake/bardrone
|
||||
name = "Bardrone"
|
||||
desc = "A barkeeping drone, an indestructible robot built to tend bars."
|
||||
seeStatic = FALSE
|
||||
hacked = TRUE
|
||||
laws = "1. Serve drinks.\n\
|
||||
2. Talk to patrons.\n\
|
||||
|
||||
@@ -68,27 +68,19 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return
|
||||
user.ranged_ability = src
|
||||
user.click_intercept = src
|
||||
add_mousepointer(user.client)
|
||||
user.update_mouse_pointer()
|
||||
ranged_ability_user = user
|
||||
if(msg)
|
||||
to_chat(ranged_ability_user, msg)
|
||||
active = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/effect/proc_holder/proc/add_mousepointer(client/C)
|
||||
if(C && ranged_mousepointer && C.mouse_pointer_icon == initial(C.mouse_pointer_icon))
|
||||
C.mouse_pointer_icon = ranged_mousepointer
|
||||
|
||||
/obj/effect/proc_holder/proc/remove_mousepointer(client/C)
|
||||
if(C && ranged_mousepointer && C.mouse_pointer_icon == ranged_mousepointer)
|
||||
C.mouse_pointer_icon = initial(C.mouse_pointer_icon)
|
||||
|
||||
/obj/effect/proc_holder/proc/remove_ranged_ability(msg)
|
||||
if(!ranged_ability_user || !ranged_ability_user.client || (ranged_ability_user.ranged_ability && ranged_ability_user.ranged_ability != src)) //To avoid removing the wrong ability
|
||||
return
|
||||
ranged_ability_user.ranged_ability = null
|
||||
ranged_ability_user.click_intercept = null
|
||||
remove_mousepointer(ranged_ability_user.client)
|
||||
ranged_ability_user.update_mouse_pointer()
|
||||
if(msg)
|
||||
to_chat(ranged_ability_user, msg)
|
||||
ranged_ability_user = null
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
remove_ranged_ability(msg)
|
||||
on_deactivation(user)
|
||||
else
|
||||
msg = "<span class='notice'>[active_msg]<B>Left-click to shoot it at a target!</B></span>"
|
||||
msg = "<span class='notice'>[active_msg] <B>Left-click to shoot it at a target!</B></span>"
|
||||
current_amount = projectile_amount
|
||||
add_ranged_ability(user, msg, TRUE)
|
||||
on_activation(user)
|
||||
@@ -101,7 +101,7 @@
|
||||
base_icon_state = "lightning"
|
||||
sound = 'sound/magic/lightningbolt.ogg'
|
||||
active = FALSE
|
||||
projectile_var_overrides = list("tesla_range" = 15, "tesla_power" = 20000, "tesla_boom" = FALSE)
|
||||
projectile_var_overrides = list("tesla_range" = 15, "tesla_power" = 20000, "tesla_flags" = TESLA_MOB_DAMAGE)
|
||||
active_msg = "You energize your hand with arcane lightning!"
|
||||
deactive_msg = "You let the energy flow out of your hands back into yourself..."
|
||||
projectile_type = /obj/item/projectile/magic/aoe/lightning
|
||||
|
||||
@@ -74,25 +74,17 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
for(var/item in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/UI = item
|
||||
var/path = null
|
||||
if(initial(UI.refund_path))
|
||||
path = initial(UI.refund_path)
|
||||
else
|
||||
path = initial(UI.item)
|
||||
var/cost = 0
|
||||
if(initial(UI.refund_amount))
|
||||
cost = initial(UI.refund_amount)
|
||||
else
|
||||
cost = initial(UI.cost)
|
||||
var/refundable = initial(UI.refundable)
|
||||
if(I.type == path && refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/UI = uplink_items[category][item]
|
||||
var/path = UI.refund_path || UI.item
|
||||
var/cost = UI.refund_amount || UI.cost
|
||||
if(I.type == path && UI.refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/datum/component/uplink/proc/interact(mob/user)
|
||||
if(locked)
|
||||
|
||||
Reference in New Issue
Block a user