mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
+28
-4
@@ -140,7 +140,6 @@
|
||||
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\stimulant.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\symptoms.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\visionloss.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\vitiligo.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\voice_change.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\vomit.dm"
|
||||
@@ -148,12 +147,13 @@
|
||||
#include "code\datums\diseases\advance\symptoms\youth.dm"
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
#include "code\datums\helper_datums\events.dm"
|
||||
#include "code\datums\helper_datums\getrev.dm"
|
||||
#include "code\datums\helper_datums\global_iterator.dm"
|
||||
#include "code\datums\helper_datums\teleport.dm"
|
||||
#include "code\datums\helper_datums\topic_input.dm"
|
||||
#include "code\datums\spells\area_teleport.dm"
|
||||
#include "code\datums\spells\charge.dm"
|
||||
#include "code\datums\spells\conjure.dm"
|
||||
#include "code\datums\spells\construct_spells.dm"
|
||||
#include "code\datums\spells\dumbfire.dm"
|
||||
#include "code\datums\spells\emplosion.dm"
|
||||
#include "code\datums\spells\ethereal_jaunt.dm"
|
||||
@@ -250,14 +250,18 @@
|
||||
#include "code\game\gamemodes\revolution\revolution.dm"
|
||||
#include "code\game\gamemodes\revolution\rp_revolution.dm"
|
||||
#include "code\game\gamemodes\traitor\traitor.dm"
|
||||
#include "code\game\gamemodes\vampire\hud.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire_powers.dm"
|
||||
#include "code\game\gamemodes\vox\vox.dm"
|
||||
#include "code\game\gamemodes\vox\heist\heist.dm"
|
||||
#include "code\game\gamemodes\vox\trade\trade.dm"
|
||||
#include "code\game\gamemodes\wizard\artefact.dm"
|
||||
#include "code\game\gamemodes\wizard\rightandwrong.dm"
|
||||
#include "code\game\gamemodes\wizard\soulstone.dm"
|
||||
#include "code\game\gamemodes\wizard\spellbook.dm"
|
||||
#include "code\game\gamemodes\wizard\veilrender.dm"
|
||||
#include "code\game\gamemodes\wizard\wizard.dm"
|
||||
#include "code\game\gamemodes\xenos\xenos.dm"
|
||||
#include "code\game\jobs\access.dm"
|
||||
#include "code\game\jobs\job_controller.dm"
|
||||
#include "code\game\jobs\job_objective.dm"
|
||||
@@ -290,9 +294,11 @@
|
||||
#include "code\game\machinery\cloning.dm"
|
||||
#include "code\game\machinery\constructable_frame.dm"
|
||||
#include "code\game\machinery\cryo.dm"
|
||||
#include "code\game\machinery\cryopod.dm"
|
||||
#include "code\game\machinery\deployable.dm"
|
||||
#include "code\game\machinery\door_control.dm"
|
||||
#include "code\game\machinery\doppler_array.dm"
|
||||
#include "code\game\machinery\drying_rack.dm"
|
||||
#include "code\game\machinery\flasher.dm"
|
||||
#include "code\game\machinery\floodlight.dm"
|
||||
#include "code\game\machinery\Freezer.dm"
|
||||
@@ -384,6 +390,7 @@
|
||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\machinery\computer\telescience.dm"
|
||||
#include "code\game\machinery\computer\vox_shuttle.dm"
|
||||
#include "code\game\machinery\computer\xenos_shuttle.dm"
|
||||
#include "code\game\machinery\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
#include "code\game\machinery\doors\alarmlock.dm"
|
||||
@@ -565,6 +572,7 @@
|
||||
#include "code\game\objects\items\weapons\teleportation.dm"
|
||||
#include "code\game\objects\items\weapons\tools.dm"
|
||||
#include "code\game\objects\items\weapons\twohanded.dm"
|
||||
#include "code\game\objects\items\weapons\vending_items.dm"
|
||||
#include "code\game\objects\items\weapons\weaponry.dm"
|
||||
#include "code\game\objects\items\weapons\wires.dm"
|
||||
#include "code\game\objects\items\weapons\grenades\bananade.dm"
|
||||
@@ -649,6 +657,7 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets\job_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\l3closet.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\statue.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
|
||||
@@ -666,6 +675,7 @@
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
|
||||
#include "code\game\structure\structure.dm"
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
@@ -768,7 +778,6 @@
|
||||
#include "code\modules\clothing\gloves\color.dm"
|
||||
#include "code\modules\clothing\gloves\miscellaneous.dm"
|
||||
#include "code\modules\clothing\gloves\ninja.dm"
|
||||
#include "code\modules\clothing\gloves\stungloves.dm"
|
||||
#include "code\modules\clothing\head\collectable.dm"
|
||||
#include "code\modules\clothing\head\hardhat.dm"
|
||||
#include "code\modules\clothing\head\helmet.dm"
|
||||
@@ -812,6 +821,7 @@
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\customitems\definitions\base.dm"
|
||||
#include "code\modules\destilery\main.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
@@ -827,6 +837,7 @@
|
||||
#include "code\modules\economy\Job_Departments.dm"
|
||||
#include "code\modules\economy\TradeDestinations.dm"
|
||||
#include "code\modules\events\blob.dm"
|
||||
#include "code\modules\events\borers.dm"
|
||||
#include "code\modules\events\carp_migration.dm"
|
||||
#include "code\modules\events\comms_blackout.dm"
|
||||
#include "code\modules\events\communications_blackout.dm"
|
||||
@@ -848,6 +859,7 @@
|
||||
#include "code\modules\events\rogue_drones.dm"
|
||||
#include "code\modules\events\space_ninja.dm"
|
||||
#include "code\modules\events\spontaneous_appendicitis.dm"
|
||||
#include "code\modules\events\tear.dm"
|
||||
#include "code\modules\events\viral_infection.dm"
|
||||
#include "code\modules\events\viral_outbreak.dm"
|
||||
#include "code\modules\events\wallrot.dm"
|
||||
@@ -886,6 +898,7 @@
|
||||
#include "code\modules\maps\reader.dm"
|
||||
#include "code\modules\maps\swapmaps.dm"
|
||||
#include "code\modules\maps\writer.dm"
|
||||
#include "code\modules\mining\abandonedcrates.dm"
|
||||
#include "code\modules\mining\machine_input_output_plates.dm"
|
||||
#include "code\modules\mining\machine_processing.dm"
|
||||
#include "code\modules\mining\machine_stacking.dm"
|
||||
@@ -901,6 +914,7 @@
|
||||
#include "code\modules\mining\laborcamp\laborminerals.dm"
|
||||
#include "code\modules\mining\laborcamp\laborshuttle.dm"
|
||||
#include "code\modules\mining\laborcamp\laborstacker.dm"
|
||||
#include "code\modules\mob\abilities.dm"
|
||||
#include "code\modules\mob\death.dm"
|
||||
#include "code\modules\mob\emote.dm"
|
||||
#include "code\modules\mob\inventory.dm"
|
||||
@@ -1056,6 +1070,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\corpse.dm"
|
||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\powers.dm"
|
||||
#include "code\modules\mob\living\simple_animal\shade.dm"
|
||||
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
||||
#include "code\modules\mob\living\simple_animal\tribbles.dm"
|
||||
@@ -1072,6 +1087,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\friendly\spiderbot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\alien.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\carp.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\creature.dm"
|
||||
@@ -1105,6 +1121,7 @@
|
||||
#include "code\modules\organs\organ_external.dm"
|
||||
#include "code\modules\organs\organ_internal.dm"
|
||||
#include "code\modules\organs\pain.dm"
|
||||
#include "code\modules\organs\skeleton.dm"
|
||||
#include "code\modules\organs\wound.dm"
|
||||
#include "code\modules\paperwork\clipboard.dm"
|
||||
#include "code\modules\paperwork\filingcabinet.dm"
|
||||
@@ -1158,6 +1175,7 @@
|
||||
#include "code\modules\projectiles\ammunition\bullets.dm"
|
||||
#include "code\modules\projectiles\ammunition\magazines.dm"
|
||||
#include "code\modules\projectiles\guns\energy.dm"
|
||||
#include "code\modules\projectiles\guns\magic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile.dm"
|
||||
#include "code\modules\projectiles\guns\energy\laser.dm"
|
||||
#include "code\modules\projectiles\guns\energy\nuclear.dm"
|
||||
@@ -1165,6 +1183,8 @@
|
||||
#include "code\modules\projectiles\guns\energy\special.dm"
|
||||
#include "code\modules\projectiles\guns\energy\stun.dm"
|
||||
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
||||
#include "code\modules\projectiles\guns\magic\staff.dm"
|
||||
#include "code\modules\projectiles\guns\magic\wand.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\bow.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\launcher.dm"
|
||||
@@ -1178,6 +1198,7 @@
|
||||
#include "code\modules\projectiles\projectile\change.dm"
|
||||
#include "code\modules\projectiles\projectile\energy.dm"
|
||||
#include "code\modules\projectiles\projectile\force.dm"
|
||||
#include "code\modules\projectiles\projectile\magic.dm"
|
||||
#include "code\modules\projectiles\projectile\special.dm"
|
||||
#include "code\modules\reagents\Chemistry-Colours.dm"
|
||||
#include "code\modules\reagents\Chemistry-Holder.dm"
|
||||
@@ -1334,6 +1355,7 @@
|
||||
#include "code\WorkInProgress\autopsy.dm"
|
||||
#include "code\WorkInProgress\buildmode.dm"
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\fireworks.dm"
|
||||
#include "code\WorkInProgress\periodic_news.dm"
|
||||
#include "code\WorkInProgress\Apples\artifacts.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
|
||||
@@ -1371,6 +1393,7 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
#include "code\WorkInProgress\Chinsky\ashtray.dm"
|
||||
#include "code\WorkInProgress\Chinsky\guestpass.dm"
|
||||
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
|
||||
#include "code\WorkInProgress\computer3\bios.dm"
|
||||
#include "code\WorkInProgress\computer3\buildandrepair.dm"
|
||||
@@ -1409,6 +1432,7 @@
|
||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\WorkInProgress\Yinadele\Supermatter.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\Colored-windows.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\karma.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\clothing\civilian.dm"
|
||||
#include "code\WorkInProgress\ZomgPonies\mobs\pony.dm"
|
||||
|
||||
@@ -17,35 +17,34 @@
|
||||
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (health < 1)
|
||||
return
|
||||
if (istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
|
||||
if(user)
|
||||
if (contents.len >= max_butts)
|
||||
user << "This ashtray is full."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
|
||||
if (contents.len >= max_butts)
|
||||
user << "This ashtray is full."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
|
||||
if (istype(W,/obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/cig = W
|
||||
if (cig.lit == 1)
|
||||
src.visible_message("[user] crushes [cig] in [src], putting it out.")
|
||||
cig.smoketime = 0
|
||||
processing_objects.Remove(cig)
|
||||
var/obj/item/butt = new cig.type_butt(src)
|
||||
cig.transfer_fingerprints_to(butt)
|
||||
del(cig)
|
||||
else if (cig.lit == 0)
|
||||
if(istype(cig, /obj/item/weapon/match))
|
||||
user << "You place [cig] in [src] without even lighting it. Why would you do that?"
|
||||
else
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
else if (cig.lit == -1)
|
||||
src.visible_message("[user] places [cig] in [src].")
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
if (contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = empty_desc + " It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
icon_state = icon_half
|
||||
desc = empty_desc + " It's half-filled."
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
|
||||
src.visible_message("[user] places [W] in [src].")
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
if (contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = empty_desc + " It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
icon_state = icon_half
|
||||
desc = empty_desc + " It's half-filled."
|
||||
else
|
||||
health = max(0,health - W.force)
|
||||
user << "You hit [src] with [W]."
|
||||
@@ -62,7 +61,6 @@
|
||||
if (contents.len)
|
||||
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
|
||||
for (var/obj/item/clothing/mask/cigarette/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
icon_state = icon_empty
|
||||
return ..()
|
||||
@@ -70,7 +68,6 @@
|
||||
/obj/item/ashtray/proc/die()
|
||||
src.visible_message("\red [src] shatters spilling its contents!")
|
||||
for (var/obj/item/clothing/mask/cigarette/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
icon_state = icon_broken
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/////////////////////////////////////////////
|
||||
//Guest pass ////////////////////////////////
|
||||
/////////////////////////////////////////////
|
||||
/obj/item/weapon/card/id/guest
|
||||
name = "guest pass"
|
||||
desc = "Allows temporary access to station areas."
|
||||
icon_state = "guest"
|
||||
|
||||
var/temp_access = list() //to prevent agent cards stealing access as permanent
|
||||
var/expiration_time = 0
|
||||
var/reason = "NOT SPECIFIED"
|
||||
|
||||
/obj/item/weapon/card/id/guest/GetAccess()
|
||||
if (world.time > expiration_time)
|
||||
return access
|
||||
else
|
||||
return temp_access
|
||||
|
||||
/obj/item/weapon/card/id/guest/examine()
|
||||
..()
|
||||
if (world.time < expiration_time)
|
||||
usr << "\blue This pass expires at [worldtime2text(expiration_time)]."
|
||||
else
|
||||
usr << "\red It expired at [worldtime2text(expiration_time)]."
|
||||
|
||||
/obj/item/weapon/card/id/guest/read()
|
||||
if (world.time > expiration_time)
|
||||
usr << "This pass expired at [worldtime2text(expiration_time)]."
|
||||
else
|
||||
usr << "This pass expires at [worldtime2text(expiration_time)]."
|
||||
|
||||
usr << "It grants access to following areas:"
|
||||
for (var/A in temp_access)
|
||||
usr << "[get_access_desc(A)]."
|
||||
usr << "Issuing reason: [reason]."
|
||||
return
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//Guest pass terminal////////////////////////
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/guestpass
|
||||
name = "guest pass terminal"
|
||||
icon_state = "guest"
|
||||
density = 0
|
||||
|
||||
|
||||
var/obj/item/weapon/card/id/giver
|
||||
var/list/accesses = list()
|
||||
var/giv_name = "NOT SPECIFIED"
|
||||
var/reason = "NOT SPECIFIED"
|
||||
var/duration = 0
|
||||
|
||||
var/list/internal_log = list()
|
||||
var/mode = 0 // 0 - making pass, 1 - viewing logs
|
||||
|
||||
/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
giver = O
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
if (mode == 1) //Logs
|
||||
dat += "<h3>Activity log</h3><br>"
|
||||
for (var/entry in internal_log)
|
||||
dat += "[entry]<br><hr>"
|
||||
dat += "<a href='?src=\ref[src];action=print'>Print</a><br>"
|
||||
dat += "<a href='?src=\ref[src];mode=0'>Back</a><br>"
|
||||
else
|
||||
dat += "<h3>Guest pass terminal #[uid]</h3><br>"
|
||||
dat += "<a href='?src=\ref[src];mode=1'>View activity log</a><br><br>"
|
||||
dat += "Issuing ID: <a href='?src=\ref[src];action=id'>[giver]</a><br>"
|
||||
dat += "Issued to: <a href='?src=\ref[src];choice=giv_name'>[giv_name]</a><br>"
|
||||
dat += "Reason: <a href='?src=\ref[src];choice=reason'>[reason]</a><br>"
|
||||
dat += "Duration (minutes): <a href='?src=\ref[src];choice=duration'>[duration] m</a><br>"
|
||||
dat += "Access to areas:<br>"
|
||||
if (giver && giver.access)
|
||||
for (var/A in giver.access)
|
||||
var/area = get_access_desc(A)
|
||||
if (A in accesses)
|
||||
area = "<b>[area]</b>"
|
||||
dat += "<a href='?src=\ref[src];choice=access;access=[A]'>[area]</a><br>"
|
||||
dat += "<br><a href='?src=\ref[src];action=issue'>Issue pass</a><br>"
|
||||
|
||||
user << browse(dat, "window=guestpass;size=400x520")
|
||||
onclose(user, "guestpass")
|
||||
|
||||
|
||||
/obj/machinery/computer/guestpass/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
if (href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
|
||||
if (href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if ("giv_name")
|
||||
var/nam = input("Person pass is issued to", "Name", name)
|
||||
if (nam)
|
||||
giv_name = nam
|
||||
if ("reason")
|
||||
var/reas = input("Reason why pass is issued", "Reason", reason)
|
||||
reason = reas
|
||||
if ("duration")
|
||||
var/dur = input("Duration (in minutes) during which pass is valid.", "Duration") as num
|
||||
if (dur > 0 && dur < 30)
|
||||
duration = dur
|
||||
else
|
||||
usr << "\red Invalid duration."
|
||||
if ("access")
|
||||
var/A = text2num(href_list["access"])
|
||||
if (A in accesses)
|
||||
accesses.Remove(A)
|
||||
else
|
||||
accesses.Add(A)
|
||||
if (href_list["action"])
|
||||
switch(href_list["action"])
|
||||
if ("id")
|
||||
if (giver)
|
||||
if(ishuman(usr))
|
||||
giver.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(giver)
|
||||
giver = null
|
||||
else
|
||||
giver.loc = src.loc
|
||||
giver = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
giver = I
|
||||
updateUsrDialog()
|
||||
|
||||
if ("print")
|
||||
var/dat = "<h3>Activity log of guest pass terminal #[uid]</h3><br>"
|
||||
for (var/entry in internal_log)
|
||||
dat += "[entry]<br><hr>"
|
||||
//usr << "Printing the log, standby..."
|
||||
//sleep(50)
|
||||
var/obj/item/weapon/paper/P = new/obj/item/weapon/paper( loc )
|
||||
P.name = "activity log"
|
||||
P.info = dat
|
||||
|
||||
if ("issue")
|
||||
if (giver)
|
||||
var/number = add_zero("[rand(0,9999)]", 4)
|
||||
var/entry = "\[[worldtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: "
|
||||
for (var/i=1 to accesses.len)
|
||||
var/A = accesses[i]
|
||||
if (A)
|
||||
var/area = get_access_desc(A)
|
||||
entry += "[i > 1 ? ", [area]" : "[area]"]"
|
||||
entry += ". Expires at [worldtime2text(world.time + duration*10*60)]."
|
||||
internal_log.Add(entry)
|
||||
|
||||
var/obj/item/weapon/card/id/guest/pass = new(src.loc)
|
||||
pass.temp_access = accesses.Copy()
|
||||
pass.registered_name = giv_name
|
||||
pass.expiration_time = world.time + duration*10*60
|
||||
pass.reason = reason
|
||||
pass.name = "guest pass #[number]"
|
||||
else
|
||||
usr << "\red Cannot issue pass without issuing ID."
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -14,25 +14,6 @@
|
||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||
req_one_access = list(access_ce)
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/atmoscontrol/xeno
|
||||
name = "\improper Xenobiology Atmospherics Computer"
|
||||
filter=list(
|
||||
/area/toxins/xenobiology/specimen_1,
|
||||
/area/toxins/xenobiology/specimen_2,
|
||||
/area/toxins/xenobiology/specimen_3,
|
||||
/area/toxins/xenobiology/specimen_4,
|
||||
/area/toxins/xenobiology/specimen_5,
|
||||
/area/toxins/xenobiology/specimen_6)
|
||||
req_one_access = list(access_xenobiology,access_ce)
|
||||
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/gas_chamber
|
||||
name = "\improper Gas Chamber Atmospherics Computer"
|
||||
filter=list(
|
||||
/area/security/gas_chamber)
|
||||
req_one_access = list(access_ce,access_hos)
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
@@ -104,7 +85,7 @@
|
||||
|
||||
var/list/alarm_data=list()
|
||||
alarm_data["ID"]="\ref[alarm]"
|
||||
alarm_data["danger"] = max(alarm.danger_level, alarm.alarm_area.atmosalm)
|
||||
alarm_data["danger"] = max(alarm.local_danger_level, alarm.alarm_area.atmosalm-1)
|
||||
alarm_data["name"] = "[alarm]"
|
||||
alarms+=list(alarm_data)
|
||||
data["alarms"]=alarms
|
||||
@@ -239,15 +220,15 @@
|
||||
current.air_doors_open(1)
|
||||
|
||||
if(href_list["atmos_alarm"])
|
||||
if (current.alarm_area.atmosalert(2))
|
||||
current.apply_danger_level(2)
|
||||
current.alarmActivated=1
|
||||
current.alarm_area.updateDangerLevel()
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
current.update_icon()
|
||||
return
|
||||
if(href_list["atmos_reset"])
|
||||
if (current.alarm_area.atmosalert(0))
|
||||
current.apply_danger_level(0)
|
||||
current.alarmActivated=0
|
||||
current.alarm_area.updateDangerLevel()
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
current.update_icon()
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
//These would be what you would get at point blank, decreases with distance
|
||||
#define DETONATION_RADS 200
|
||||
#define DETONATION_HALLUCINATION 600
|
||||
#define DETONATION_RADS 300000
|
||||
#define DETONATION_HALLUCINATION 60000
|
||||
|
||||
|
||||
#define WARNING_DELAY 60 //45 seconds between warnings.
|
||||
@@ -124,8 +124,8 @@
|
||||
for(var/mob/living/mob in living_mob_list)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
//Hilariously enough, running into a closet should make you get hit the hardest.
|
||||
mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
|
||||
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
|
||||
mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION/((get_dist(mob, src)+1)**2) ) )
|
||||
var/rads = DETONATION_RADS/((get_dist(mob, src)+1)**2)
|
||||
mob.apply_effect(rads, IRRADIATE)
|
||||
|
||||
explode()
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
var/global/wcBrig
|
||||
var/global/wcBar
|
||||
var/global/wcCommon
|
||||
|
||||
//for all window/New and door/window/New
|
||||
/proc/color_windows(area = "common")
|
||||
var/list/common = list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")
|
||||
if(!wcCommon)
|
||||
wcCommon = pick(common)
|
||||
return wcCommon
|
||||
|
||||
//This func called in master-controller, replaces color in some area
|
||||
/proc/color_windows_init()
|
||||
var/list/brig = list("#aa0808", "#7f0606", "#ff0000")
|
||||
var/list/bar = list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")
|
||||
|
||||
wcBrig = pick(brig)
|
||||
wcBar = pick(bar)
|
||||
|
||||
//BRIG
|
||||
var/wsBrigList = list(
|
||||
/area/security/brig,
|
||||
/area/security/detectives_office,
|
||||
/area/security/hos,
|
||||
/area/security/lobby,
|
||||
/area/security/main,
|
||||
/area/security/prison,
|
||||
/area/security/warden,
|
||||
/area/security/range,
|
||||
/area/prison/cell_block/A,
|
||||
/area/prison/cell_block/B,
|
||||
/area/security/processing,
|
||||
/area/security/armoury
|
||||
|
||||
)
|
||||
|
||||
for(var/A in wsBrigList)
|
||||
for(var/obj/structure/window/W in locate(A))
|
||||
W.color = wcBrig
|
||||
for(var/obj/machinery/door/window/D in locate(A))
|
||||
D.color = wcBrig
|
||||
|
||||
//BAR
|
||||
for(var/obj/structure/window/W in locate(/area/crew_quarters/bar))
|
||||
W.color = wcBar
|
||||
for(var/obj/machinery/door/window/D in locate(/area/crew_quarters/bar))
|
||||
D.color = wcBar
|
||||
@@ -247,7 +247,7 @@
|
||||
new_slime.key = key
|
||||
|
||||
new_slime << "<B>You are now a slime!</B>"
|
||||
|
||||
/*
|
||||
if(new_slime.client)
|
||||
if(babies.len)
|
||||
var/list/candidates = get_active_candidates()
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
|
||||
else
|
||||
new_slime << "<i>You're an only child!</i>"
|
||||
new_slime << "<i>You're an only child!</i>"*/
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
status_flags = 0
|
||||
faction = "cult"
|
||||
status_flags = CANPUSH
|
||||
|
||||
universal_speak = 1
|
||||
|
||||
Life()
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
obj/item/weapon/firework
|
||||
name = "fireworks"
|
||||
icon = 'icons/obj/fireworks.dmi'
|
||||
icon_state = "rocket_0"
|
||||
var/litzor = 0
|
||||
var/datum/effects/system/sparkel_spread/S
|
||||
obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user)
|
||||
if(litzor)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
for(var/mob/M in viewers(user))
|
||||
M << "[user] lits \the [src]"
|
||||
litzor = 1
|
||||
icon_state = "rocket_1"
|
||||
S = new()
|
||||
S.set_up(5,0,src.loc)
|
||||
sleep(30)
|
||||
if(ismob(src.loc) || isobj(src.loc))
|
||||
S.attach(src.loc)
|
||||
S.start()
|
||||
del(src)
|
||||
|
||||
obj/item/weapon/sparkler
|
||||
name = "sparkler"
|
||||
icon = 'icons/obj/fireworks.dmi'
|
||||
icon_state = "sparkler_0"
|
||||
var/litzor = 0
|
||||
var/datum/effect/effect/system/spark_spread/S
|
||||
obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user)
|
||||
if(litzor)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
for(var/mob/M in viewers(user))
|
||||
M << "[user] lits \the [src]"
|
||||
litzor = 1
|
||||
icon_state = "sparkler_1"
|
||||
var/b = rand(5,9)
|
||||
for(var/xy, xy<=b, xy++)
|
||||
S = new()
|
||||
S.set_up(1,0,src.loc)
|
||||
if(ismob(src.loc) || isobj(src.loc))
|
||||
S.attach(src.loc)
|
||||
S.start()
|
||||
sleep(10)
|
||||
del(src)
|
||||
/obj/crate/fireworks
|
||||
name = "Fireworks!"
|
||||
/obj/crate/fireworks/New()
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/sparkler(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
new /obj/item/weapon/firework(src)
|
||||
+3
-3
@@ -118,12 +118,12 @@ obj/var/contaminated = 0
|
||||
/mob/living/carbon/human/proc/burn_eyes()
|
||||
//The proc that handles eye burning.
|
||||
if(prob(20)) src << "\red Your eyes burn!"
|
||||
eye_stat += 2.5
|
||||
var/datum/organ/internal/eyes/E = internal_organs["eyes"]
|
||||
E.damage += 2.5
|
||||
eye_blurry = min(eye_blurry+1.5,50)
|
||||
if (prob(max(0,eye_stat - 20) + 1) &&!eye_blind)
|
||||
if (prob(max(0,E.damage - 15) + 1) &&!eye_blind)
|
||||
src << "\red You are blinded!"
|
||||
eye_blind += 20
|
||||
eye_stat = 0
|
||||
|
||||
/mob/living/carbon/human/proc/pl_head_protected()
|
||||
//Checks if the head is adequately sealed.
|
||||
|
||||
@@ -9,8 +9,7 @@ var/global/vs_control/vsc = new
|
||||
var/fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant"
|
||||
var/fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires."
|
||||
|
||||
// var/fire_fuel_energy_release = 397000
|
||||
var/fire_fuel_energy_release = 300000
|
||||
var/fire_fuel_energy_release = 397000
|
||||
var/fire_fuel_energy_release_NAME = "Fire - Fuel energy release"
|
||||
var/fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance"
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
@@ -301,8 +301,8 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.prefs.be_special & BE_ALIEN)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if( G.client && G.client.prefs.be_special & BE_ALIEN)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
@@ -311,7 +311,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
|
||||
proc/get_candidates(be_special_flag=0)
|
||||
. = list()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
|
||||
@@ -9,6 +9,7 @@ var/global/list/player_list = list() //List of all mobs **with clients attach
|
||||
var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/respawnable_list = list() //List of all mobs, dead or in mindless creatures that still be respawned.
|
||||
|
||||
var/global/list/portals = list() //for use by portals
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
|
||||
+27
-1
@@ -111,4 +111,30 @@ var/const/Sqrt2 = 1.41421356
|
||||
/proc/Wrap(val, min, max)
|
||||
var/d = max - min
|
||||
var/t = Floor((val - min) / d)
|
||||
return val - (t * d)
|
||||
return val - (t * d)
|
||||
|
||||
//converts a uniform distributed random number into a normal distributed one
|
||||
//since this method produces two random numbers, one is saved for subsequent calls
|
||||
//(making the cost negligble for every second call)
|
||||
//This will return +/- decimals, situated about mean with standard deviation stddev
|
||||
//68% chance that the number is within 1stddev
|
||||
//95% chance that the number is within 2stddev
|
||||
//98% chance that the number is within 3stddev...etc
|
||||
var/gaussian_next
|
||||
#define ACCURACY 10000
|
||||
/proc/gaussian(mean, stddev)
|
||||
var/R1;var/R2;var/working
|
||||
if(gaussian_next != null)
|
||||
R1 = gaussian_next
|
||||
gaussian_next = null
|
||||
else
|
||||
do
|
||||
R1 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
R2 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
working = R1*R1 + R2*R2
|
||||
while(working >= 1 || working==0)
|
||||
working = sqrt(-2 * log(working) / working)
|
||||
R1 *= working
|
||||
gaussian_next = R2 * working
|
||||
return (mean + stddev * R1)
|
||||
#undef ACCURACY
|
||||
+22
-1
@@ -74,4 +74,25 @@ proc/age2agedescription(age)
|
||||
if(45 to 60) return "middle-aged"
|
||||
if(60 to 70) return "aging"
|
||||
if(70 to INFINITY) return "elderly"
|
||||
else return "unknown"
|
||||
else return "unknown"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Proc for attack log creation, because really why not
|
||||
1 argument is the actor
|
||||
2 argument is the target of action
|
||||
3 is the description of action(like punched, throwed, or any other verb)
|
||||
4 is the tool with which the action was made(usually item)
|
||||
5 is additional information, anything that needs to be added
|
||||
*/
|
||||
|
||||
proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
|
||||
if(ismob(user))
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
|
||||
if(ismob(target))
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
|
||||
log_attack("<font color='red'>[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
|
||||
if(target.client)
|
||||
if(what_done != ("shaked" || "CPRed" || "grabbed"))
|
||||
message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)")
|
||||
@@ -269,6 +269,5 @@ proc/tg_list2text(list/list, glue=",")
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
switch(ui_style)
|
||||
if("old") return 'icons/mob/screen1_old.dmi'
|
||||
if("Orange") return 'icons/mob/screen1_Orange.dmi'
|
||||
else return 'icons/mob/screen1_Midnight.dmi'
|
||||
if("Midnight") return 'icons/mob/screen1_Midnight.dmi'
|
||||
else return 'icons/mob/screen1_White.dmi'
|
||||
|
||||
@@ -96,6 +96,7 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/lingchemdisplay
|
||||
var/obj/screen/blobpwrdisplay
|
||||
var/obj/screen/blobhealthdisplay
|
||||
var/obj/screen/vampire_blood_display
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/r_hand_hud_object
|
||||
var/obj/screen/l_hand_hud_object
|
||||
@@ -169,9 +170,11 @@ datum/hud/New(mob/owner)
|
||||
if(!ismob(mymob)) return 0
|
||||
if(!mymob.client) return 0
|
||||
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
var/ui_color = mymob.client.prefs.UI_style_color
|
||||
var/ui_alpha = mymob.client.prefs.UI_style_alpha
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(ui_style) // Pass the player the UI style chosen in preferences
|
||||
human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences
|
||||
else if(ismonkey(mymob))
|
||||
monkey_hud(ui_style)
|
||||
else if(isbrain(mymob))
|
||||
@@ -186,7 +189,10 @@ datum/hud/New(mob/owner)
|
||||
robot_hud()
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
|
||||
else if(isovermind(mymob))
|
||||
blob_hud()
|
||||
else if(mymob.mind && mymob.mind.vampire)
|
||||
vampire_hud()
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
@@ -73,6 +73,8 @@
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
@@ -82,6 +84,8 @@
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -92,6 +96,8 @@
|
||||
inv_box.icon_state = "center"
|
||||
inv_box.screen_loc = ui_iclothing
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -101,6 +107,8 @@
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
@@ -114,6 +122,8 @@
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
@@ -127,6 +137,8 @@
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
@@ -137,6 +149,8 @@
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.layer = 19
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
@@ -146,6 +160,8 @@
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.layer = 19
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -156,6 +172,8 @@
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_wear_id
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -166,6 +184,8 @@
|
||||
inv_box.screen_loc = ui_pda
|
||||
inv_box.slot_id = slot_wear_pda
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -176,6 +196,8 @@
|
||||
inv_box.screen_loc = ui_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -186,6 +208,8 @@
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -195,6 +219,8 @@
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -204,6 +230,8 @@
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -214,6 +242,8 @@
|
||||
inv_box.screen_loc = ui_sstore1
|
||||
inv_box.slot_id = slot_s_store
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
using = new /obj/screen()
|
||||
@@ -222,6 +252,8 @@
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.layer = 19
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
|
||||
using = new /obj/screen()
|
||||
@@ -230,6 +262,8 @@
|
||||
using.icon_state = "other"
|
||||
using.screen_loc = ui_inventory
|
||||
using.layer = 20
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen()
|
||||
@@ -238,6 +272,8 @@
|
||||
using.icon_state = "act_equip"
|
||||
using.screen_loc = ui_equip
|
||||
using.layer = 20
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -247,6 +283,8 @@
|
||||
inv_box.screen_loc = ui_gloves
|
||||
inv_box.slot_id = slot_gloves
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -256,6 +294,8 @@
|
||||
inv_box.screen_loc = ui_glasses
|
||||
inv_box.slot_id = slot_glasses
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -265,6 +305,8 @@
|
||||
inv_box.screen_loc = ui_l_ear
|
||||
inv_box.slot_id = slot_l_ear
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -274,6 +316,8 @@
|
||||
inv_box.screen_loc = ui_r_ear
|
||||
inv_box.slot_id = slot_r_ear
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -283,6 +327,8 @@
|
||||
inv_box.screen_loc = ui_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -292,6 +338,8 @@
|
||||
inv_box.screen_loc = ui_shoes
|
||||
inv_box.slot_id = slot_shoes
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.other += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -301,6 +349,8 @@
|
||||
inv_box.screen_loc = ui_belt
|
||||
inv_box.slot_id = slot_belt
|
||||
inv_box.layer = 19
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.adding += inv_box
|
||||
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
@@ -308,6 +358,8 @@
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
src.hotkeybuttons += mymob.throw_icon
|
||||
|
||||
mymob.oxygen = new /obj/screen()
|
||||
@@ -392,6 +444,8 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.color = ui_color
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
if(istype(master, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = master
|
||||
S.close(usr)
|
||||
else if(istype(master,/obj/item/clothing/suit/storage))
|
||||
var/obj/item/clothing/suit/storage/S = master
|
||||
S.close(usr)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>" )
|
||||
add_logs(M, user, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
|
||||
//spawn(1800) // this wont work right
|
||||
// M.lastattacker = null
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
var/Tickcomp = 0
|
||||
var/socket_talk = 0 // use socket_talk to communicate with other processes
|
||||
var/list/resource_urls = null
|
||||
|
||||
var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
|
||||
var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
|
||||
var/list/mode_names = list()
|
||||
var/list/modes = list() // allowed modes
|
||||
var/list/votable_modes = list() // votable modes
|
||||
@@ -384,6 +385,12 @@
|
||||
if("tickcomp")
|
||||
Tickcomp = 1
|
||||
|
||||
if("allow_antag_hud")
|
||||
config.antag_hud_allowed = 1
|
||||
|
||||
if("antag_hud_restricted")
|
||||
config.antag_hud_restricted = 1
|
||||
|
||||
if("humans_need_surnames")
|
||||
humans_need_surnames = 1
|
||||
|
||||
|
||||
@@ -72,6 +72,8 @@ datum/controller/game_controller/proc/setup()
|
||||
for(var/i=0, i<max_secret_rooms, i++)
|
||||
make_mining_asteroid_secret()
|
||||
|
||||
color_windows_init()
|
||||
|
||||
spawn(0)
|
||||
if(ticker)
|
||||
ticker.pregame()
|
||||
|
||||
+56
-7
@@ -52,7 +52,7 @@ datum/mind
|
||||
|
||||
var/datum/faction/faction //associated faction
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
|
||||
var/datum/vampire/vampire //vampire holder
|
||||
var/rev_cooldown = 0
|
||||
|
||||
// the world.time since the mob has been brigged, or -1 if not at all
|
||||
@@ -71,18 +71,21 @@ datum/mind
|
||||
if(changeling)
|
||||
current.remove_changeling_powers()
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
if(vampire)
|
||||
current.remove_vampire_powers()
|
||||
current.mind = null
|
||||
|
||||
nanomanager.user_transferred(current, new_character)
|
||||
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
|
||||
nanomanager.user_transferred(current, new_character)
|
||||
|
||||
current = new_character //link ourself to our new body
|
||||
new_character.mind = src //and link our new body to ourself
|
||||
|
||||
if(changeling)
|
||||
new_character.make_changeling()
|
||||
|
||||
if(vampire)
|
||||
new_character.make_vampire()
|
||||
if(active)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
|
||||
@@ -128,6 +131,7 @@ datum/mind
|
||||
"cult",
|
||||
"wizard",
|
||||
"changeling",
|
||||
"vampire",
|
||||
"nuclear",
|
||||
"traitor", // "traitorchan",
|
||||
"monkey",
|
||||
@@ -222,6 +226,26 @@ datum/mind
|
||||
// text += "<br>All the changelings are dead! Restart in [round((changeling.TIME_TO_GET_REVIVED-(world.time-changeling.changelingdeathtime))/10)] seconds."
|
||||
sections["changeling"] = text
|
||||
|
||||
/** VAMPIRE ***/
|
||||
text = "vampire"
|
||||
if (ticker.mode.config_tag=="vampire")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.vampires)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];vampire=clear'>no</a>"
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];vampire=autoobjectives'>Randomize!</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];vampire=vampire'>yes</a>|<b>NO</b>"
|
||||
/** Enthralled ***/
|
||||
text += "<br><b>enthralled</b>"
|
||||
if(src in ticker.mode.enthralled)
|
||||
text += " <b><font color='#FF0000'>YES</font></b> | no"
|
||||
else
|
||||
text += " yes | <font color='#00FF00'>NO</font></b>"
|
||||
sections["vampire"] = text
|
||||
|
||||
|
||||
/** NUCLEAR ***/
|
||||
text = "nuclear"
|
||||
if (ticker.mode.config_tag=="nuclear")
|
||||
@@ -387,7 +411,7 @@ datum/mind
|
||||
if(!def_value)//If it's a custom objective, it will be an empty string.
|
||||
def_value = "custom"
|
||||
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "blood", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
if (!new_obj_type) return
|
||||
|
||||
var/datum/objective/new_objective = null
|
||||
@@ -455,7 +479,7 @@ datum/mind
|
||||
if (!steal.select_target())
|
||||
return
|
||||
|
||||
if("download","capture","absorb")
|
||||
if("download","capture","absorb", "blood")
|
||||
var/def_num
|
||||
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
|
||||
def_num = objective.target_amount
|
||||
@@ -474,6 +498,9 @@ datum/mind
|
||||
if("absorb")
|
||||
new_objective = new /datum/objective/absorb
|
||||
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
|
||||
if("blood")
|
||||
new_objective = new /datum/objective/blood
|
||||
new_objective.explanation_text = "Accumulate atleast [target_number] units of blood in total."
|
||||
new_objective.owner = src
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
@@ -735,6 +762,28 @@ datum/mind
|
||||
updateappearance(current, current.dna.uni_identity)
|
||||
domutcheck(current, null)
|
||||
|
||||
else if (href_list["vampire"])
|
||||
switch(href_list["vampire"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.vampires)
|
||||
ticker.mode.vampires -= src
|
||||
special_role = null
|
||||
current.remove_vampire_powers()
|
||||
if(vampire) del(vampire)
|
||||
current << "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a vampire and are stuck in your current form!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-vampired [current].")
|
||||
if("vampire")
|
||||
if(!(src in ticker.mode.vampires))
|
||||
ticker.mode.vampires += src
|
||||
ticker.mode.grant_vampire_powers(current)
|
||||
special_role = "Vampire"
|
||||
current << "<B><font color='red'>Your powers are awoken. Your lust for blood grows... You are a Vampire!</font></B>"
|
||||
log_admin("[key_name_admin(usr)] has vampired [current].")
|
||||
if("autoobjectives")
|
||||
ticker.mode.forge_vampire_objectives(src)
|
||||
usr << "\blue The objectives for vampire [key] have been generated. You can edit them and announce manually."
|
||||
|
||||
|
||||
else if (href_list["nuclear"])
|
||||
switch(href_list["nuclear"])
|
||||
if("clear")
|
||||
|
||||
+34
-32
@@ -26,6 +26,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
var/range = 7 //the range of the spell; outer radius for aoe spells
|
||||
var/message = "" //whatever it says to the guy affected by it
|
||||
var/selection_type = "view" //can be "range" or "view"
|
||||
var/spell_level = 0 //if a spell can be taken multiple times, this raises
|
||||
var/level_max = 4 //The max possible level_max is 4
|
||||
var/cooldown_min = 0 //This defines what spell quickened four timeshas as a cooldown. Make sure to set this for every spell
|
||||
|
||||
var/overlay = 0
|
||||
var/overlay_icon = 'icons/obj/wizard.dmi'
|
||||
@@ -38,49 +41,53 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
var/smoke_amt = 0 //cropped at 10
|
||||
|
||||
var/critfailchance = 0
|
||||
var/centcomm_cancast = 1 //Whether or not the spell should be allowed on z2
|
||||
var/centcom_cancast = 1 //Whether or not the spell should be allowed on z2
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
|
||||
|
||||
if(!(src in usr.spell_list))
|
||||
usr << "\red You shouldn't have this spell! Something's wrong."
|
||||
if(!(src in user.spell_list))
|
||||
user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
|
||||
return 0
|
||||
|
||||
if(usr.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
|
||||
if(user.z == 2 && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
return 0
|
||||
|
||||
if(!skipcharge)
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
if(charge_counter < charge_max)
|
||||
usr << "[name] is still recharging."
|
||||
user << "<span class='notice'>[name] is still recharging.</span>"
|
||||
return 0
|
||||
if("charges")
|
||||
if(!charge_counter)
|
||||
usr << "[name] has no charges left."
|
||||
user << "<span class='notice'>[name] has no charges left.</span>"
|
||||
return 0
|
||||
|
||||
if(usr.stat && !stat_allowed)
|
||||
usr << "Not when you're incapacitated."
|
||||
if(user.stat && !stat_allowed)
|
||||
user << "<span class='notice'>Not when you're incapacitated.</span>"
|
||||
return 0
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr))
|
||||
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
usr << "Mmmf mrrfff!"
|
||||
if(ishuman(user))
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(istype(H.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
user << "<span class='notice'>You can't get the words out!</span>"
|
||||
return 0
|
||||
|
||||
if(clothes_req) //clothes check
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
return 0
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
|
||||
usr << "I don't feel strong enough without my robe."
|
||||
return 0
|
||||
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
|
||||
usr << "I don't feel strong enough without my sandals."
|
||||
return 0
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
|
||||
usr << "I don't feel strong enough without my hat."
|
||||
if(clothes_req) //clothes check
|
||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(H.wear_suit, /obj/item/clothing/suit/space/rig/wizard))
|
||||
H << "<span class='notice'>I don't feel strong enough without my robe.</span>"
|
||||
return 0
|
||||
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
|
||||
H << "<span class='notice'>I don't feel strong enough without my sandals.</span>"
|
||||
return 0
|
||||
if(!istype(H.head, /obj/item/clothing/head/wizard) && !istype(H.head, /obj/item/clothing/head/helmet/space/rig/wizard))
|
||||
H << "<span class='notice'>I don't feel strong enough without my hat.</span>"
|
||||
return 0
|
||||
else
|
||||
if(clothes_req)
|
||||
user << "<span class='notice'>This spell can only be casted by humans!</span>"
|
||||
return 0
|
||||
|
||||
if(!skipcharge)
|
||||
@@ -95,22 +102,17 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
|
||||
|
||||
switch(invocation_type)
|
||||
if("shout")
|
||||
if(prob(50))//Auto-mute? Fuck that noise
|
||||
usr.say(invocation)
|
||||
user.say(invocation)
|
||||
else
|
||||
usr.say(replacetext(invocation," ","`"))
|
||||
if(usr.gender==MALE)
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
else
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
user.say(replacetext(invocation," ","`"))
|
||||
if("whisper")
|
||||
if(prob(50))
|
||||
usr.whisper(invocation)
|
||||
user.whisper(invocation)
|
||||
else
|
||||
usr.whisper(replacetext(invocation," ","`"))
|
||||
user.whisper(replacetext(invocation," ","`"))
|
||||
|
||||
/obj/effect/proc_holder/spell/New()
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/effect/proc_holder/spell/targeted/charge
|
||||
name = "Charge"
|
||||
desc = "This spell can be used to charge up spent magical artifacts, among other things."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
invocation = "DIRI CEL"
|
||||
invocation_type = "whisper"
|
||||
range = -1
|
||||
// cooldown_min = 400 //50 deciseconds reduction per rank
|
||||
include_user = 1
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/charge/cast(list/targets)
|
||||
for(var/mob/living/user in targets)
|
||||
var/list/hand_items = list(user.get_active_hand(),user.get_inactive_hand())
|
||||
var/charged_item = null
|
||||
var/burnt_out = 0
|
||||
for(var/obj/item in hand_items)
|
||||
if(istype(item, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = item
|
||||
if(G.affecting)
|
||||
var/mob/M = G.affecting
|
||||
if(M.spell_list.len != 0)
|
||||
for(var/obj/effect/proc_holder/spell/S in M.spell_list)
|
||||
S.charge_counter = S.charge_max
|
||||
M <<"<span class='notice'>you feel raw magic flowing through you, it feels good!</span>"
|
||||
else
|
||||
M <<"<span class='notice'>you feel very strange for a moment, but then it passes.</span>"
|
||||
burnt_out = 1
|
||||
charged_item = M
|
||||
break
|
||||
else if(istype(item, /obj/item/weapon/spellbook/oneuse))
|
||||
var/obj/item/weapon/spellbook/oneuse/I = item
|
||||
if(prob(80))
|
||||
user.visible_message("<span class='warning'>[I] catches fire!</span>")
|
||||
del(I)
|
||||
else
|
||||
I.used = 0
|
||||
charged_item = I
|
||||
break
|
||||
else if(istype(item, /obj/item/weapon/gun/magic))
|
||||
var/obj/item/weapon/gun/magic/I = item
|
||||
if(prob(80))
|
||||
I.max_charges--
|
||||
if(I.max_charges <= 0)
|
||||
I.max_charges = 0
|
||||
burnt_out = 1
|
||||
I.charges = I.max_charges
|
||||
if(istype(item,/obj/item/weapon/gun/magic/wand) && I.max_charges != 0)
|
||||
var/obj/item/weapon/gun/magic/W = item
|
||||
W.icon_state = initial(W.icon_state)
|
||||
charged_item = I
|
||||
break
|
||||
else if(istype(item, /obj/item/weapon/cell/))
|
||||
var/obj/item/weapon/cell/C = item
|
||||
if(prob(80))
|
||||
C.maxcharge -= 200
|
||||
if(C.maxcharge <= 1) //Div by 0 protection
|
||||
C.maxcharge = 1
|
||||
burnt_out = 1
|
||||
C.charge = C.maxcharge
|
||||
charged_item = C
|
||||
break
|
||||
else if(item.contents)
|
||||
var/obj/I = null
|
||||
for(I in item.contents)
|
||||
if(istype(I, /obj/item/weapon/cell/))
|
||||
var/obj/item/weapon/cell/C = I
|
||||
if(prob(80))
|
||||
C.maxcharge -= 200
|
||||
if(C.maxcharge <= 1) //Div by 0 protection
|
||||
C.maxcharge = 1
|
||||
burnt_out = 1
|
||||
C.charge = C.maxcharge
|
||||
item.update_icon()
|
||||
charged_item = item
|
||||
break
|
||||
if(!charged_item)
|
||||
user << "<span class='notice'>you feel magical power surging to your hands, but the feeling rapidly fades...</span>"
|
||||
else if(burnt_out)
|
||||
user << "<span class='caution'>[charged_item] doesn't seem to be reacting to the spell...</span>"
|
||||
else
|
||||
user << "<span class='notice'>[charged_item] suddenly feels very warm!</span>"
|
||||
@@ -30,8 +30,11 @@
|
||||
if(summon_ignore_prev_spawn_points)
|
||||
targets -= spawn_place
|
||||
if(ispath(summoned_object_type,/turf))
|
||||
if(istype(get_turf(usr),/turf/simulated/shuttle))
|
||||
usr << "\red You can't build things on shuttles!"
|
||||
break
|
||||
var/turf/O = spawn_place
|
||||
var/turf/N = summoned_object_type
|
||||
var/N = summoned_object_type
|
||||
O.ChangeTurf(N)
|
||||
else
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
@@ -61,27 +64,4 @@
|
||||
summon_type = list(/obj/machinery/bot/ed209)
|
||||
summon_amt = 10
|
||||
range = 3
|
||||
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
|
||||
|
||||
|
||||
//This was previously left in the old wizard code, not being included.
|
||||
//Wasn't sure if I should transfer it here, or to code/datums/spells.dm
|
||||
//But I decided because it is a conjuration related object it would fit better here
|
||||
//Feel free to change this, I don't know.
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "m_shield"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 1
|
||||
unacidable = 1
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj, var/def_zone)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
for(var/mob/M in T)
|
||||
Proj.on_hit(M,M.bullet_act(Proj, def_zone))
|
||||
return
|
||||
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
|
||||
@@ -0,0 +1,101 @@
|
||||
//////////////////////////////Construct Spells/////////////////////////
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser
|
||||
charge_max = 1800
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor
|
||||
name = "Floor Construction"
|
||||
desc = "This spell constructs a cult floor"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 20
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/floor/engine/cult)
|
||||
centcom_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
|
||||
name = "Lesser Construction"
|
||||
desc = "This spell constructs a cult wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/wall/cult)
|
||||
centcom_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
desc = "This spell constructs a reinforced metal wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
centcom_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
delay = 50
|
||||
|
||||
summon_type = list(/turf/simulated/wall/r_wall)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone
|
||||
name = "Summon Soulstone"
|
||||
desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 3000
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
|
||||
summon_type = list(/obj/item/device/soulstone)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall
|
||||
name = "Shield"
|
||||
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/obj/effect/forcefield)
|
||||
summon_lifespan = 200
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
|
||||
name = "Phase Shift"
|
||||
desc = "This spell allows you to pass through walls"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
phaseshift = 1
|
||||
jaunt_duration = 50 //in deciseconds
|
||||
centcom_cancast = 0 //Stop people from getting to centcom
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser
|
||||
name = "Lesser Magic Missile"
|
||||
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 400
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
proj_lifespan = 10
|
||||
max_targets = 6
|
||||
@@ -64,7 +64,7 @@
|
||||
break
|
||||
|
||||
var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - usr
|
||||
if(L)
|
||||
if(L && L.stat != DEAD)
|
||||
projectile.cast(L.loc)
|
||||
break
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
cooldown_min = 100 //50 deciseconds reduction per rank
|
||||
include_user = 1
|
||||
centcomm_cancast = 0 //Prevent people from getting to centcomm
|
||||
centcom_cancast = 0 //Prevent people from getting to centcom
|
||||
|
||||
var phaseshift = 0
|
||||
var/jaunt_duration = 50 //in deciseconds
|
||||
@@ -27,6 +28,9 @@
|
||||
animation.icon_state = "liquify"
|
||||
animation.layer = 5
|
||||
animation.master = holder
|
||||
target.ExtinguishMob()
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle()
|
||||
if(phaseshift == 1)
|
||||
animation.dir = target.dir
|
||||
flick("phase_shift",animation)
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Add(x)
|
||||
target.mutations.Add(mutations)
|
||||
target.disabilities |= disabilities
|
||||
target.update_mutations() //update target's mutation overlays
|
||||
spawn(duration)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Remove(x)
|
||||
target.mutations.Remove(mutations)
|
||||
target.disabilities &= ~disabilities
|
||||
target.update_mutations()
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
cooldown_min = 30 //30 deciseconds reduction per rank
|
||||
selection_type = "range"
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
|
||||
@@ -34,6 +35,7 @@
|
||||
magichead.voicechange = 1 //NEEEEIIGHH
|
||||
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
|
||||
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
|
||||
target.equip_to_slot(magichead, slot_wear_mask)
|
||||
target.drop_from_inventory(target.wear_mask)
|
||||
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
||||
|
||||
flick("e_flash", target.flash)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
var/destroys = "none" //can be "none", "gib" or "disintegrate"
|
||||
|
||||
var/summon_type = null //this will put an obj at the target's location
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
@@ -56,4 +58,7 @@
|
||||
target.Stun(amt_stunned)
|
||||
|
||||
target.eye_blind += amt_eye_blind
|
||||
target.eye_blurry += amt_eye_blurry
|
||||
target.eye_blurry += amt_eye_blurry
|
||||
//summoning
|
||||
if(summon_type)
|
||||
new summon_type(target.loc, target)
|
||||
@@ -8,6 +8,7 @@
|
||||
invocation = "AULIE OXIN FIERA"
|
||||
invocation_type = "whisper"
|
||||
range = 3
|
||||
cooldown_min = 20 //20 deciseconds reduction per rank
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets)
|
||||
for(var/turf/T in targets)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
invocation = "GIN'YU CAPAN"
|
||||
invocation_type = "whisper"
|
||||
range = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human,/mob/living/carbon/monkey) //which types of mobs are affected by the spell. NOTE: change at your own risk
|
||||
var/base_spell_loss_chance = 20 //base probability of the wizard losing a spell in the process
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
else
|
||||
step(projectile,dir)
|
||||
|
||||
if(!projectile) // step and step_to sleeps so we'll have to check again.
|
||||
break
|
||||
|
||||
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
|
||||
del(projectile)
|
||||
break
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
invocation = "FORTI GY AMA"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
cooldown_min = 90 //15 deciseconds reduction per rank
|
||||
|
||||
max_targets = 0
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
mutations = list(LASER, HULK)
|
||||
duration = 300
|
||||
cooldown_min = 300 //25 deciseconds reduction per rank
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate
|
||||
name = "Disintegrate"
|
||||
@@ -53,6 +55,7 @@
|
||||
invocation = "EI NATH"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
destroys = "gib_brain"
|
||||
|
||||
@@ -70,6 +73,7 @@
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
cooldown_min = 20 //25 deciseconds reduction per rank
|
||||
|
||||
smoke_spread = 2
|
||||
smoke_amt = 10
|
||||
@@ -83,6 +87,7 @@
|
||||
invocation_type = "shout"
|
||||
range = -1
|
||||
include_user = 1
|
||||
cooldown_min = 200 //50 deciseconds reduction per rank
|
||||
|
||||
emp_heavy = 6
|
||||
emp_light = 10
|
||||
@@ -98,6 +103,8 @@
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
cooldown_min = 5 //4 deciseconds reduction per rank
|
||||
|
||||
|
||||
smoke_spread = 1
|
||||
smoke_amt = 10
|
||||
@@ -105,7 +112,7 @@
|
||||
inner_tele_radius = 0
|
||||
outer_tele_radius = 6
|
||||
|
||||
centcomm_cancast = 0 //prevent people from getting to centcomm
|
||||
centcom_cancast = 0 //prevent people from getting to centcom
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
|
||||
name = "Teleport"
|
||||
@@ -118,6 +125,7 @@
|
||||
invocation_type = "shout"
|
||||
range = -1
|
||||
include_user = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
smoke_spread = 1
|
||||
smoke_amt = 5
|
||||
@@ -132,6 +140,7 @@
|
||||
invocation = "TARCOL MINTI ZHERI"
|
||||
invocation_type = "whisper"
|
||||
range = 0
|
||||
cooldown_min = 50 //12 deciseconds reduction per rank
|
||||
|
||||
summon_type = list("/obj/effect/forcefield")
|
||||
summon_lifespan = 300
|
||||
@@ -189,6 +198,7 @@
|
||||
invocation = "STI KALY"
|
||||
invocation_type = "whisper"
|
||||
message = "\blue Your eyes cry out in pain!"
|
||||
cooldown_min = 50 //12 deciseconds reduction per rank
|
||||
|
||||
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind")
|
||||
|
||||
@@ -200,16 +210,32 @@
|
||||
disabilities = 1
|
||||
duration = 300
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone
|
||||
name = "Flesh to Stone"
|
||||
desc = "This spell turns a single person into an inert statue for a long period of time."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
range = 2
|
||||
invocation = "STAUN EI"
|
||||
invocation_type = "shout"
|
||||
amt_stunned = 2//just exists to make sure the statue "catches" them
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
summon_type = "/obj/structure/closet/statue"
|
||||
|
||||
/obj/effect/proc_holder/spell/dumbfire/fireball
|
||||
name = "Fireball"
|
||||
desc = "This spell fires a fireball at a target and does not require wizard garb."
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 100
|
||||
charge_max = 60
|
||||
clothes_req = 0
|
||||
invocation = "ONI SOMA"
|
||||
invocation_type = "shout"
|
||||
range = 20
|
||||
cooldown_min = 20 //10 deciseconds reduction per rank
|
||||
|
||||
proj_icon_state = "fireball"
|
||||
proj_name = "a fireball"
|
||||
@@ -219,7 +245,7 @@
|
||||
proj_step_delay = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/turf/fireball/cast(var/turf/T)
|
||||
explosion(T, -1, 1, 2, 3)
|
||||
explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/fireball
|
||||
@@ -230,98 +256,4 @@
|
||||
ex_severe = -1
|
||||
ex_heavy = -1
|
||||
ex_light = 2
|
||||
ex_flash = 5
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////Construct Spells/////////////////////////
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser
|
||||
charge_max = 1800
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor
|
||||
name = "Floor Construction"
|
||||
desc = "This spell constructs a cult floor"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 20
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/floor/engine/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
|
||||
name = "Leser Construction"
|
||||
desc = "This spell constructs a cult wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/wall/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
desc = "This spell constructs a reinforced metal wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
delay = 50
|
||||
|
||||
summon_type = list(/turf/simulated/wall/r_wall)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone
|
||||
name = "Summon Soulstone"
|
||||
desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 3000
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
|
||||
summon_type = list(/obj/item/device/soulstone)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall
|
||||
name = "Shield"
|
||||
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/obj/effect/forcefield)
|
||||
summon_lifespan = 50
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
|
||||
name = "Phase Shift"
|
||||
desc = "This spell allows you to pass through walls"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
phaseshift = 1
|
||||
jaunt_duration = 50 //in deciseconds
|
||||
centcomm_cancast = 0 //Stop people from getting to centcomm
|
||||
ex_flash = 5
|
||||
@@ -611,8 +611,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/weapons
|
||||
name = "Weapons crate"
|
||||
contains = list(/obj/item/weapon/melee/baton,
|
||||
/obj/item/weapon/melee/baton,
|
||||
contains = list(/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/gun/energy/laser,
|
||||
/obj/item/weapon/gun/energy/laser,
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
@@ -654,9 +654,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/riot
|
||||
name = "Riot gear crate"
|
||||
contains = list(/obj/item/weapon/melee/baton,
|
||||
/obj/item/weapon/melee/baton,
|
||||
/obj/item/weapon/melee/baton,
|
||||
contains = list(/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/melee/baton/loaded,
|
||||
/obj/item/weapon/shield/riot,
|
||||
/obj/item/weapon/shield/riot,
|
||||
/obj/item/weapon/shield/riot,
|
||||
@@ -1006,3 +1006,39 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Beekeeping crate"
|
||||
access = access_hydroponics
|
||||
group = "Hydroponics"
|
||||
|
||||
|
||||
/datum/supply_packs/organic/vending
|
||||
name = "Bartending Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/coffee)
|
||||
cost = 15
|
||||
containername = "bartending supply crate"
|
||||
|
||||
/datum/supply_packs/organic/vending/snack
|
||||
name = "Snack Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/snack,
|
||||
/obj/item/weapon/vending_refill/snack,
|
||||
/obj/item/weapon/vending_refill/snack)
|
||||
cost = 15
|
||||
containername = "snacks supply crate"
|
||||
|
||||
/datum/supply_packs/organic/vending/cola
|
||||
name = "Softdrinks Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cola,
|
||||
/obj/item/weapon/vending_refill/cola)
|
||||
cost = 15
|
||||
containername = "softdrinks supply crate"
|
||||
|
||||
/datum/supply_packs/organic/vending/cigarette
|
||||
name = "Cigarette Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cigarette)
|
||||
cost = 15
|
||||
containername = "cigarette supply crate"
|
||||
|
||||
/datum/supply_packs/misc/autodrobe
|
||||
name = "Autodrobe Supply crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/autodrobe,
|
||||
/obj/item/weapon/vending_refill/autodrobe)
|
||||
cost = 15
|
||||
containername = "autodrobe supply crate"
|
||||
|
||||
+182
-110
@@ -51,122 +51,194 @@
|
||||
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
|
||||
var/locked[] = list()
|
||||
|
||||
proc/get_manifest(monochrome, OOC)
|
||||
var/list/heads = new()
|
||||
var/list/sec = new()
|
||||
var/list/eng = new()
|
||||
var/list/med = new()
|
||||
var/list/sci = new()
|
||||
var/list/civ = new()
|
||||
var/list/bot = new()
|
||||
var/list/misc = new()
|
||||
var/list/isactive = new()
|
||||
var/dat = {"
|
||||
<head><style>
|
||||
.manifest {border-collapse:collapse;}
|
||||
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
|
||||
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
|
||||
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
|
||||
.manifest td:first-child {text-align:right}
|
||||
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
|
||||
</style></head>
|
||||
<table class="manifest" width='350px'>
|
||||
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
|
||||
"}
|
||||
var/even = 0
|
||||
|
||||
// sort mobs
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
var/name = t.fields["name"]
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
if(OOC)
|
||||
var/active = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
|
||||
active = 1
|
||||
break
|
||||
isactive[name] = active ? "Active" : "Inactive"
|
||||
else
|
||||
isactive[name] = t.fields["p_stat"]
|
||||
|
||||
/obj/effect/datacore/proc/get_manifest(monochrome, OOC)
|
||||
var/list/heads = new()
|
||||
var/list/sec = new()
|
||||
var/list/eng = new()
|
||||
var/list/med = new()
|
||||
var/list/sci = new()
|
||||
var/list/civ = new()
|
||||
var/list/bot = new()
|
||||
var/list/misc = new()
|
||||
var/list/isactive = new()
|
||||
var/dat = {"
|
||||
<head><style>
|
||||
.manifest {border-collapse:collapse;}
|
||||
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
|
||||
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
|
||||
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
|
||||
.manifest td:first-child {text-align:right}
|
||||
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
|
||||
</style></head>
|
||||
<table class="manifest" width='350px'>
|
||||
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
|
||||
"}
|
||||
var/even = 0
|
||||
// sort mobs
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
var/name = t.fields["name"]
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
if(OOC)
|
||||
var/active = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
|
||||
active = 1
|
||||
break
|
||||
isactive[name] = active ? "Active" : "Inactive"
|
||||
else
|
||||
isactive[name] = t.fields["p_stat"]
|
||||
//world << "[name]: [rank]"
|
||||
|
||||
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
|
||||
var/department = 0
|
||||
if(real_rank in command_positions)
|
||||
heads[name] = rank
|
||||
department = 1
|
||||
if(real_rank in security_positions)
|
||||
sec[name] = rank
|
||||
department = 1
|
||||
if(real_rank in engineering_positions)
|
||||
eng[name] = rank
|
||||
department = 1
|
||||
if(real_rank in medical_positions)
|
||||
med[name] = rank
|
||||
department = 1
|
||||
if(real_rank in science_positions)
|
||||
sci[name] = rank
|
||||
department = 1
|
||||
if(real_rank in civilian_positions)
|
||||
civ[name] = rank
|
||||
department = 1
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[name] = rank
|
||||
department = 1
|
||||
var/department = 0
|
||||
if(real_rank in command_positions)
|
||||
heads[name] = rank
|
||||
department = 1
|
||||
if(real_rank in security_positions)
|
||||
sec[name] = rank
|
||||
department = 1
|
||||
if(real_rank in engineering_positions)
|
||||
eng[name] = rank
|
||||
department = 1
|
||||
if(real_rank in medical_positions)
|
||||
med[name] = rank
|
||||
department = 1
|
||||
if(real_rank in science_positions)
|
||||
sci[name] = rank
|
||||
department = 1
|
||||
if(real_rank in civilian_positions)
|
||||
civ[name] = rank
|
||||
department = 1
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[name] = rank
|
||||
department = 1
|
||||
if(!department && !(name in heads))
|
||||
misc[name] = rank
|
||||
if(heads.len > 0)
|
||||
dat += "<tr><th colspan=3>Heads</th></tr>"
|
||||
for(name in heads)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sec.len > 0)
|
||||
dat += "<tr><th colspan=3>Security</th></tr>"
|
||||
for(name in sec)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(eng.len > 0)
|
||||
dat += "<tr><th colspan=3>Engineering</th></tr>"
|
||||
for(name in eng)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(med.len > 0)
|
||||
dat += "<tr><th colspan=3>Medical</th></tr>"
|
||||
for(name in med)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sci.len > 0)
|
||||
dat += "<tr><th colspan=3>Science</th></tr>"
|
||||
for(name in sci)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(civ.len > 0)
|
||||
dat += "<tr><th colspan=3>Civilian</th></tr>"
|
||||
for(name in civ)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// in case somebody is insane and added them to the manifest, why not
|
||||
if(bot.len > 0)
|
||||
dat += "<tr><th colspan=3>Silicon</th></tr>"
|
||||
for(name in bot)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// misc guys
|
||||
if(misc.len > 0)
|
||||
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
|
||||
for(name in misc)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(!department && !(name in heads))
|
||||
misc[name] = rank
|
||||
|
||||
if(heads.len > 0)
|
||||
dat += "<tr><th colspan=3>Heads</th></tr>"
|
||||
for(name in heads)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sec.len > 0)
|
||||
dat += "<tr><th colspan=3>Security</th></tr>"
|
||||
for(name in sec)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(eng.len > 0)
|
||||
dat += "<tr><th colspan=3>Engineering</th></tr>"
|
||||
for(name in eng)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(med.len > 0)
|
||||
dat += "<tr><th colspan=3>Medical</th></tr>"
|
||||
for(name in med)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(sci.len > 0)
|
||||
dat += "<tr><th colspan=3>Science</th></tr>"
|
||||
for(name in sci)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
if(civ.len > 0)
|
||||
dat += "<tr><th colspan=3>Civilian</th></tr>"
|
||||
for(name in civ)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// in case somebody is insane and added them to the manifest, why not
|
||||
if(bot.len > 0)
|
||||
dat += "<tr><th colspan=3>Silicon</th></tr>"
|
||||
for(name in bot)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
// misc guys
|
||||
if(misc.len > 0)
|
||||
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
|
||||
for(name in misc)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
|
||||
even = !even
|
||||
dat += "</table>"
|
||||
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = replacetext(dat, "\t", "")
|
||||
return dat
|
||||
|
||||
|
||||
dat += "</table>"
|
||||
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = replacetext(dat, "\t", "")
|
||||
return dat
|
||||
/*
|
||||
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
|
||||
*/
|
||||
|
||||
/obj/effect/datacore/proc/get_manifest_json()
|
||||
var/heads[0]
|
||||
var/sec[0]
|
||||
var/eng[0]
|
||||
var/med[0]
|
||||
var/sci[0]
|
||||
var/civ[0]
|
||||
var/bot[0]
|
||||
var/misc[0]
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
var/name = t.fields["name"]
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
var/isactive = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
||||
if(real_rank in command_positions)
|
||||
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
depthead = 1
|
||||
if(rank=="Captain" && heads.len != 1)
|
||||
heads.Swap(1,heads.len)
|
||||
|
||||
if(real_rank in security_positions)
|
||||
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sec.len != 1)
|
||||
sec.Swap(1,sec.len)
|
||||
|
||||
if(real_rank in engineering_positions)
|
||||
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && eng.len != 1)
|
||||
eng.Swap(1,eng.len)
|
||||
|
||||
if(real_rank in medical_positions)
|
||||
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && med.len != 1)
|
||||
med.Swap(1,med.len)
|
||||
|
||||
if(real_rank in science_positions)
|
||||
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sci.len != 1)
|
||||
sci.Swap(1,sci.len)
|
||||
|
||||
if(real_rank in civilian_positions)
|
||||
civ[++civ.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && civ.len != 1)
|
||||
civ.Swap(1,civ.len)
|
||||
|
||||
if(real_rank in nonhuman_positions)
|
||||
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
|
||||
if(!department && !(name in heads))
|
||||
misc[++misc.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
|
||||
return list(\
|
||||
"heads" = heads,\
|
||||
"sec" = sec,\
|
||||
"eng" = eng,\
|
||||
"med" = med,\
|
||||
"sci" = sci,\
|
||||
"civ" = civ,\
|
||||
"bot" = bot,\
|
||||
"misc" = misc\
|
||||
)
|
||||
|
||||
|
||||
/obj/effect/laser
|
||||
name = "laser"
|
||||
|
||||
@@ -1111,6 +1111,107 @@
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/seeds/coffee_arabica_seed
|
||||
name = "pack of coffee arabica seeds"
|
||||
desc = "These seeds grow into coffee arabica bushes."
|
||||
icon_state = "seed-coffeea"
|
||||
species = "coffeea"
|
||||
plantname = "Coffee Arabica Bush"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_arabica"
|
||||
lifespan = 30
|
||||
endurance = 20
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
// mutatelist = list(/obj/item/seeds/coffee_robusta_seed)
|
||||
|
||||
/obj/item/seeds/coffee_robusta_seed
|
||||
name = "pack of coffee robusta seeds"
|
||||
desc = "These seeds grow into coffee robusta bushes."
|
||||
icon_state = "seed-coffeer"
|
||||
species = "coffeer"
|
||||
plantname = "Coffee Robusta Bush"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_robusta"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/tobacco_seed
|
||||
name = "pack of tobacco seeds"
|
||||
desc = "These seeds grow into tobacco plants."
|
||||
icon_state = "seed-tobacco"
|
||||
species = "tobacco"
|
||||
plantname = "Tobacco Plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
oneharvest = 1
|
||||
yield = 10
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
// mutatelist = list(/obj/item/seeds/tobacco_space_seed)
|
||||
|
||||
/obj/item/seeds/tobacco_space_seed
|
||||
name = "pack of space tobacco seeds"
|
||||
desc = "These seeds grow into space tobacco plants."
|
||||
icon_state = "seed-stobacco"
|
||||
species = "stobacco"
|
||||
plantname = "Space Tobacco Plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco_space"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
oneharvest = 1
|
||||
yield = 10
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/tea_aspera_seed
|
||||
name = "pack of tea aspera seeds"
|
||||
desc = "These seeds grow into tea plants."
|
||||
icon_state = "seed-teaaspera"
|
||||
species = "teaaspera"
|
||||
plantname = "Tea Aspera Plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tea_aspera"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
// mutatelist = list(/obj/item/seeds/tea_astra_seed)
|
||||
|
||||
/obj/item/seeds/tea_astra_seed
|
||||
name = "pack of tea astra seeds"
|
||||
desc = "These seeds grow into tea plants."
|
||||
icon_state = "seed-teaastra"
|
||||
species = "teaastra"
|
||||
plantname = "Tea Astra Plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/tea_astra"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
|
||||
/* // Maybe one day when I get it to work like a grenade which exlodes gibs.
|
||||
/obj/item/seeds/gibtomatoseed
|
||||
|
||||
@@ -542,6 +542,46 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/start
|
||||
name = "\improper start area"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southwest
|
||||
name = "\improper aft port solars"
|
||||
icon_state = "southwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northwest
|
||||
name = "\improper fore port solars"
|
||||
icon_state = "northwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northeast
|
||||
name = "\improper fore starboard solars"
|
||||
icon_state = "northeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southeast
|
||||
name = "\improper aft starboard solars"
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/north
|
||||
name = "\improper north landing area"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/south
|
||||
name = "\improper south landing area"
|
||||
icon_state = "south"
|
||||
requires_power = 0
|
||||
|
||||
//PRISON
|
||||
/area/prison
|
||||
name = "\improper Prison Station"
|
||||
@@ -876,8 +916,8 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Bar"
|
||||
icon_state = "bar"
|
||||
|
||||
/area/crew_quarters/theatre
|
||||
name = "\improper Theatre"
|
||||
/area/crew_quarters/mrchangs
|
||||
name = "\improper Mr Chang's"
|
||||
icon_state = "Theatre"
|
||||
|
||||
/area/library
|
||||
@@ -1234,7 +1274,10 @@ proc/process_ghost_teleport_locs()
|
||||
/area/security/armoury
|
||||
name = "\improper Armory"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/armoury/gamma
|
||||
name = "\improper Gamma Armory"
|
||||
icon_state = "Warden"
|
||||
requires_power = 0
|
||||
/area/security/hos
|
||||
name = "\improper Head of Security's Office"
|
||||
icon_state = "sec_hos"
|
||||
|
||||
+74
-40
@@ -66,13 +66,31 @@
|
||||
a.triggerAlarm("Power", src, cameras, source)
|
||||
return
|
||||
|
||||
/area/proc/atmosalert(danger_level)
|
||||
/area/proc/updateDangerLevel()
|
||||
// if(type==/area) //No atmos alarms in space
|
||||
// return 0 //redudant
|
||||
|
||||
|
||||
var/danger_level = 0
|
||||
|
||||
// Determine what the highest DL reported by air alarms is
|
||||
for (var/area/RA in related)
|
||||
for(var/obj/machinery/alarm/AA in RA)
|
||||
if((AA.stat & (NOPOWER|BROKEN)) || AA.shorted || AA.buildstage != 2)
|
||||
continue
|
||||
var/reported_danger_level=AA.local_danger_level
|
||||
if(AA.alarmActivated)
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
testing("Danger level at [AA.name]: [AA.local_danger_level] (reported [reported_danger_level])")
|
||||
|
||||
testing("Danger level decided upon in [name]: [danger_level] (from [atmosalm])")
|
||||
|
||||
// Danger level change?
|
||||
if(danger_level != atmosalm)
|
||||
//updateicon()
|
||||
//mouse_opacity = 0
|
||||
if (danger_level==2)
|
||||
// Going to danger level 2 from something else
|
||||
if (danger_level == 2)
|
||||
var/list/cameras = list()
|
||||
for(var/area/RA in related)
|
||||
//updateicon()
|
||||
@@ -83,6 +101,8 @@
|
||||
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
a.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
CloseFirelocks()
|
||||
// Dropping from danger level 2.
|
||||
else if (atmosalm == 2)
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
@@ -91,6 +111,7 @@
|
||||
aiPlayer.cancelAlarm("Atmosphere", src, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
a.cancelAlarm("Atmosphere", src, src)
|
||||
OpenFirelocks()
|
||||
atmosalm = danger_level
|
||||
for (var/obj/machinery/alarm/AA in src)
|
||||
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
@@ -98,6 +119,24 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/area/proc/CloseFirelocks()
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = CLOSED
|
||||
else if(!D.density)
|
||||
spawn()
|
||||
D.close()
|
||||
|
||||
/area/proc/OpenFirelocks()
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = OPEN
|
||||
else if(D.density)
|
||||
spawn()
|
||||
D.open()
|
||||
|
||||
/area/proc/firealert()
|
||||
if(name == "Space") //no fire alarms in space
|
||||
return
|
||||
@@ -105,13 +144,7 @@
|
||||
fire = 1
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = CLOSED
|
||||
else if(!D.density)
|
||||
spawn()
|
||||
D.close()
|
||||
CloseFirelocks()
|
||||
var/list/cameras = list()
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
@@ -127,13 +160,6 @@
|
||||
fire = 0
|
||||
mouse_opacity = 0
|
||||
updateicon()
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = OPEN
|
||||
else if(D.density)
|
||||
spawn(0)
|
||||
D.open()
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
C.network.Remove("Fire Alarms")
|
||||
@@ -141,20 +167,7 @@
|
||||
aiPlayer.cancelAlarm("Fire", src, src)
|
||||
for (var/obj/machinery/computer/station_alert/a in machines)
|
||||
a.cancelAlarm("Fire", src, src)
|
||||
|
||||
/area/proc/readyalert()
|
||||
if(name == "Space")
|
||||
return
|
||||
if(!eject)
|
||||
eject = 1
|
||||
updateicon()
|
||||
return
|
||||
|
||||
/area/proc/readyreset()
|
||||
if(eject)
|
||||
eject = 0
|
||||
updateicon()
|
||||
return
|
||||
OpenFirelocks()
|
||||
|
||||
/area/proc/radiation_alert()
|
||||
if(name == "Space")
|
||||
@@ -172,6 +185,20 @@
|
||||
updateicon()
|
||||
return
|
||||
|
||||
/area/proc/readyalert()
|
||||
if(name == "Space")
|
||||
return
|
||||
if(!eject)
|
||||
eject = 1
|
||||
updateicon()
|
||||
return
|
||||
|
||||
/area/proc/readyreset()
|
||||
if(eject)
|
||||
eject = 0
|
||||
updateicon()
|
||||
return
|
||||
|
||||
/area/proc/partyalert()
|
||||
if(name == "Space") //no parties in space!!!
|
||||
return
|
||||
@@ -186,13 +213,6 @@
|
||||
party = 0
|
||||
mouse_opacity = 0
|
||||
updateicon()
|
||||
for(var/obj/machinery/door/firedoor/D in src)
|
||||
if(!D.blocked)
|
||||
if(D.operating)
|
||||
D.nextstate = OPEN
|
||||
else if(D.density)
|
||||
spawn(0)
|
||||
D.open()
|
||||
return
|
||||
|
||||
/area/proc/updateicon()
|
||||
@@ -200,19 +220,25 @@
|
||||
// Highest priority at the top.
|
||||
if(radalert && !fire)
|
||||
icon_state = "radiation"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
else if(fire && !radalert && !eject && !party)
|
||||
icon_state = "blue"
|
||||
icon_state = "red"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
/*else if(atmosalm && !fire && !eject && !party)
|
||||
icon_state = "bluenew"*/
|
||||
else if(!fire && eject && !party)
|
||||
icon_state = "red"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
else if(party && !fire && !eject)
|
||||
icon_state = "party"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
else
|
||||
icon_state = "blue-red"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
else
|
||||
// new lighting behaviour with obj lights
|
||||
icon_state = null
|
||||
blend_mode = BLEND_DEFAULT
|
||||
|
||||
|
||||
/*
|
||||
@@ -267,7 +293,15 @@
|
||||
master.used_environ = 0
|
||||
|
||||
/area/proc/use_power(var/amount, var/chan)
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
master.used_equip += amount
|
||||
if(LIGHT)
|
||||
master.used_light += amount
|
||||
if(ENVIRON)
|
||||
master.used_environ += amount
|
||||
|
||||
/area/proc/use_battery_power(var/amount, var/chan)
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
master.used_equip += amount
|
||||
|
||||
@@ -128,10 +128,17 @@
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
|
||||
|
||||
if(!M.client && M.mind)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.mind == M.mind)
|
||||
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
|
||||
break
|
||||
message_admins("No client found, searching for compatible mind")
|
||||
for(var/mob/C in respawnable_list)
|
||||
if(C.mind && C.mind.key == M.mind.key)
|
||||
message_admins("Found mind, asking for respawn")
|
||||
switch(alert(C,"Your corpse has been placed into a cloning scanner. Do you want to be resurrected/cloned? Please not if you select 'No', you will be able to be cloned or borged again this round.","Clone Alert","Yes","No"))
|
||||
if("Yes")
|
||||
M.key = C.key
|
||||
return
|
||||
if("No")
|
||||
return
|
||||
|
||||
del(G)
|
||||
return
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
C = new_overmind
|
||||
|
||||
if(C)
|
||||
respawnable_list -= C
|
||||
var/mob/camera/blob/B = new(src.loc)
|
||||
B.key = C.key
|
||||
B.blob_core = src
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/mob/proc/make_changeling()
|
||||
if(!mind) return
|
||||
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
||||
if(!ishuman(src) && !ismonkey(src)) return
|
||||
verbs += /datum/changeling/proc/EvolutionMenu
|
||||
|
||||
var/lesser_form = !ishuman(src)
|
||||
@@ -205,6 +206,10 @@
|
||||
var/datum/changeling/changeling = changeling_power(1,0,0)
|
||||
if(!changeling) return
|
||||
|
||||
if(src.has_brain_worms())
|
||||
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = src
|
||||
changeling.chem_charges--
|
||||
C.remove_changeling_powers()
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = candidate
|
||||
|
||||
respawnable_list -= candidate
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
|
||||
@@ -153,7 +153,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
else
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_NINJA)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G
|
||||
|
||||
@@ -26,12 +26,50 @@
|
||||
var/required_players = 0
|
||||
var/required_players_secret = 0 //Minimum number of players for that game mode to be chose in Secret
|
||||
var/required_enemies = 0
|
||||
var/recommended_players = 0
|
||||
var/recommended_enemies = 0
|
||||
var/newscaster_announcements = null
|
||||
var/uplink_welcome = "Syndicate Uplink Console:"
|
||||
var/uplink_uses = 10
|
||||
|
||||
|
||||
var/uplink_items = {"Highly Visible and Dangerous Weapons;
|
||||
/obj/item/weapon/gun/projectile:6:Revolver;
|
||||
/obj/item/ammo_magazine/a357:2:Ammo-357;
|
||||
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
|
||||
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
|
||||
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
|
||||
/obj/item/weapon/storage/box/emps:3:5 EMP Grenades;
|
||||
Whitespace:Seperator;
|
||||
Stealthy and Inconspicuous Weapons;
|
||||
/obj/item/weapon/pen/paralysis:3:Paralysis Pen;
|
||||
/obj/item/weapon/soap/syndie:1:Syndicate Soap;
|
||||
/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge;
|
||||
Whitespace:Seperator;
|
||||
Stealth and Camouflage Items;
|
||||
/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit;
|
||||
/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes;
|
||||
/obj/item/weapon/card/id/syndicate:2:Agent ID card;
|
||||
/obj/item/clothing/mask/gas/voice:4:Voice Changer;
|
||||
/obj/item/device/chameleon:4:Chameleon-Projector;
|
||||
Whitespace:Seperator;
|
||||
Devices and Tools;
|
||||
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
|
||||
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
|
||||
/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
|
||||
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
|
||||
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
|
||||
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
|
||||
/obj/item/weapon/plastique:2:C-4 (Destroys walls);
|
||||
/obj/item/device/powersink:5:Powersink (DANGER!);
|
||||
/obj/item/device/radio/beacon/syndicate:7:Singularity Beacon (DANGER!);
|
||||
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
|
||||
Whitespace:Seperator;
|
||||
Implants;
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive:6:Explosive Implant (DANGER!);
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress:4:Compressed Matter Implant;Whitespace:Seperator;
|
||||
(Pointless) Badassery;
|
||||
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
|
||||
|
||||
/datum/game_mode/proc/announce() //to be calles when round starts
|
||||
world << "<B>Notice</B>: [src] did not define announce()"
|
||||
@@ -69,8 +107,8 @@
|
||||
feedback_set_details("round_start","[time2text(world.realtime)]")
|
||||
if(ticker && ticker.mode)
|
||||
feedback_set_details("game_mode","[ticker.mode]")
|
||||
if(revdata)
|
||||
feedback_set_details("revision","[revdata.revision]")
|
||||
// if(revdata)
|
||||
// feedback_set_details("revision","[revdata.revision]")
|
||||
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -172,7 +172,6 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
//initialise our cinematic screen object
|
||||
cinematic = new(src)
|
||||
sleep(100)
|
||||
cinematic.icon = 'icons/effects/station_explosion.dmi'
|
||||
cinematic.icon_state = "station_intact"
|
||||
cinematic.layer = 20
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#define METEOR_TEMPERATURE
|
||||
|
||||
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
|
||||
//set to at least 100 unless you want evarr ruining every round
|
||||
|
||||
@@ -95,18 +93,9 @@
|
||||
icon_state = "smallf"
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/meteor/Move()
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(METEOR_TEMPERATURE, 1000)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/meteor/Bump(atom/A)
|
||||
spawn(0)
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
|
||||
shake_camera(M, 3, 1)
|
||||
|
||||
if (A)
|
||||
A.meteorhit(src)
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
@@ -117,9 +106,7 @@
|
||||
if(!istype(A,/obj/machinery/power/emitter) && \
|
||||
!istype(A,/obj/machinery/field_generator) && \
|
||||
prob(15))
|
||||
|
||||
explosion(src.loc, 4, 5, 6, 7, 0)
|
||||
playsound(src.loc, "explosion", 50, 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -146,16 +133,18 @@
|
||||
if(--src.hits <= 0)
|
||||
del(src) //Dont blow up singularity containment if we get stuck there.
|
||||
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
|
||||
shake_camera(M, 3, 1)
|
||||
if (A)
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T || T.z != src.z)
|
||||
continue
|
||||
shake_camera(M, 3, get_dist(M.loc, src.loc) > 20 ? 1 : 3)
|
||||
M.playsound_local(src.loc, 'sound/effects/meteorimpact.ogg', 50, 1, get_rand_frequency(), 10)
|
||||
explosion(src.loc, 0, 1, 2, 3, 0)
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
|
||||
if (--src.hits <= 0)
|
||||
if(prob(15) && !istype(A, /obj/structure/grille))
|
||||
explosion(src.loc, 1, 2, 3, 4, 0)
|
||||
playsound(src.loc, "explosion", 50, 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -209,9 +209,7 @@
|
||||
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(synd_mob), slot_gloves)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(synd_mob), slot_head)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate(synd_mob), slot_wear_id)
|
||||
if(synd_mob.backbag == 2) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(synd_mob), slot_back)
|
||||
if(synd_mob.backbag == 3) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(synd_mob), slot_back)
|
||||
@@ -221,6 +219,27 @@
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack)
|
||||
|
||||
if(synd_mob.species)
|
||||
var/race = synd_mob.species.name
|
||||
|
||||
if(race == "Unathi")
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/unathi(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/unathi(synd_mob), slot_head)
|
||||
else if(race == "Tajaran")
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/tajara(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/tajara(synd_mob), slot_head)
|
||||
else if(race == "Skrell")
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/skrell(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/skrell(synd_mob), slot_head)
|
||||
else
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/human(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/human(synd_mob), slot_head)
|
||||
else
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/human(synd_mob), slot_wear_suit)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/human(synd_mob), slot_head)
|
||||
|
||||
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
|
||||
E.imp_in = synd_mob
|
||||
E.implanted = 1
|
||||
|
||||
@@ -8,6 +8,8 @@ var/bomb_set
|
||||
density = 1
|
||||
var/deployable = 0.0
|
||||
var/extended = 0.0
|
||||
var/lighthack = 0
|
||||
var/opened = 0.0
|
||||
var/timeleft = 60.0
|
||||
var/timing = 0.0
|
||||
var/r_code = "ADMIN"
|
||||
@@ -15,15 +17,36 @@ var/bomb_set
|
||||
var/yes_code = 0.0
|
||||
var/safety = 1.0
|
||||
var/obj/item/weapon/disk/nuclear/auth = null
|
||||
var/list/wires = list()
|
||||
var/light_wire
|
||||
var/safety_wire
|
||||
var/timing_wire
|
||||
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open,
|
||||
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
|
||||
flags = FPRINT
|
||||
use_power = 0
|
||||
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/New()
|
||||
..()
|
||||
r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn.
|
||||
|
||||
src.wires["Red"] = 0
|
||||
src.wires["Blue"] = 0
|
||||
src.wires["Green"] = 0
|
||||
src.wires["Marigold"] = 0
|
||||
src.wires["Fuschia"] = 0
|
||||
src.wires["Black"] = 0
|
||||
src.wires["Pearl"] = 0
|
||||
var/list/w = list("Red","Blue","Green","Marigold","Black","Fuschia","Pearl")
|
||||
src.light_wire = pick(w)
|
||||
w -= src.light_wire
|
||||
src.timing_wire = pick(w)
|
||||
w -= src.timing_wire
|
||||
src.safety_wire = pick(w)
|
||||
w -= src.safety_wire
|
||||
|
||||
/obj/machinery/nuclearbomb/process()
|
||||
if (src.timing)
|
||||
bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed.
|
||||
@@ -36,6 +59,30 @@ var/bomb_set
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
src.add_fingerprint(user)
|
||||
if (src.auth)
|
||||
if (src.opened == 0)
|
||||
src.opened = 1
|
||||
overlays += image(icon, "npanel_open")
|
||||
user << "You unscrew the control panel of [src]."
|
||||
|
||||
else
|
||||
src.opened = 0
|
||||
overlays -= image(icon, "npanel_open")
|
||||
user << "You screw the control panel of [src] back on."
|
||||
else
|
||||
if (src.opened == 0)
|
||||
user << "The [src] emits a buzzing noise, the panel staying locked in."
|
||||
if (src.opened == 1)
|
||||
src.opened = 0
|
||||
overlays -= image(icon, "npanel_open")
|
||||
user << "You screw the control panel of [src] back on."
|
||||
flick("nuclearbombc", src)
|
||||
|
||||
return
|
||||
|
||||
if (src.extended)
|
||||
if (istype(O, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
@@ -119,6 +166,8 @@ var/bomb_set
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
|
||||
if (src.extended)
|
||||
if (src.opened)
|
||||
nukehack_win(user,50)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Nuclear Fission Explosive</B><BR>\nAuth. Disk: <A href='?src=\ref[];auth=1'>[]</A><HR>", src, (src.auth ? "++++++++++" : "----------"))
|
||||
if (src.auth)
|
||||
@@ -145,11 +194,23 @@ var/bomb_set
|
||||
visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!")
|
||||
else
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
flick("nuclearbombc", src)
|
||||
src.icon_state = "nuclearbomb1"
|
||||
if(!src.lighthack)
|
||||
flick("nuclearbombc", src)
|
||||
src.icon_state = "nuclearbomb1"
|
||||
src.extended = 1
|
||||
return
|
||||
|
||||
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
var/dat as text
|
||||
dat += "<TT><B>Nuclear Fission Explosive</B><BR>\nNuclear Device Wires:</A><HR>"
|
||||
for(var/wire in src.wires)
|
||||
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
|
||||
dat += text("<HR>The device is [src.timing ? "shaking!" : "still"]<BR>")
|
||||
dat += text("The device is [src.safety ? "quiet" : "whirring"].<BR>")
|
||||
dat += text("The lights are [src.lighthack ? "static" : "functional"].<BR>")
|
||||
user << browse("<HTML><HEAD><TITLE>Bomb Defusion</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=nukebomb_hack")
|
||||
onclose(user, "nukebomb_hack")
|
||||
|
||||
/obj/machinery/nuclearbomb/verb/make_deployable()
|
||||
set category = "Object"
|
||||
set name = "Make Deployable"
|
||||
@@ -161,16 +222,57 @@ var/bomb_set
|
||||
else
|
||||
usr << "\red You adjust some panels to make [src] deployable."
|
||||
src.deployable = 1
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/Topic(href, href_list)
|
||||
..()
|
||||
if (!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
if (!ishuman(usr))
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
usr << "You can't pulse a cut wire."
|
||||
else
|
||||
if(src.light_wire == temp_wire)
|
||||
src.lighthack = !src.lighthack
|
||||
spawn(100) src.lighthack = !src.lighthack
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.safety_wire == temp_wire)
|
||||
src.safety = !src.safety
|
||||
spawn(100) src.safety = !src.safety
|
||||
if(src.safety == 1)
|
||||
visible_message("\blue The [src] quiets down.")
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
else
|
||||
visible_message("\blue The [src] emits a quiet whirling noise!")
|
||||
if(href_list["act"] == "wire")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
if(src.safety_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if(src.light_wire == temp_wire)
|
||||
src.lighthack = !src.lighthack
|
||||
|
||||
if (href_list["auth"])
|
||||
if (src.auth)
|
||||
src.auth.loc = src.loc
|
||||
@@ -211,14 +313,16 @@ var/bomb_set
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
src.icon_state = "nuclearbomb2"
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb2"
|
||||
if(!src.safety)
|
||||
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
|
||||
else
|
||||
bomb_set = 0
|
||||
else
|
||||
src.icon_state = "nuclearbomb1"
|
||||
bomb_set = 0
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb1"
|
||||
if (href_list["safety"])
|
||||
src.safety = !( src.safety )
|
||||
if(safety)
|
||||
@@ -266,7 +370,8 @@ var/bomb_set
|
||||
src.timing = -1.0
|
||||
src.yes_code = 0
|
||||
src.safety = 1
|
||||
src.icon_state = "nuclearbomb3"
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb3"
|
||||
playsound(src,'sound/machines/Alarm.ogg',100,0,5)
|
||||
if (ticker && ticker.mode)
|
||||
ticker.mode.explosion_in_progress = 1
|
||||
|
||||
@@ -745,3 +745,15 @@ datum/objective/absorb
|
||||
/*-------ENDOF CULTIST------*/
|
||||
*/
|
||||
|
||||
datum/objective/blood
|
||||
proc/gen_amount_goal(low = 150, high = 400)
|
||||
target_amount = rand(low,high)
|
||||
target_amount = round(round(target_amount/5)*5)
|
||||
explanation_text = "Accumulate atleast [target_amount] units of blood in total."
|
||||
return target_amount
|
||||
|
||||
check_completion()
|
||||
if(owner && owner.vampire && owner.vampire.bloodtotal && owner.vampire.bloodtotal >= target_amount)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -29,10 +29,15 @@
|
||||
if (I.stat == 2 && I.z == 1)
|
||||
score_deadaipenalty = 1
|
||||
score_deadcrew += 1
|
||||
/* for (var/mob/living/carbon/human/I in mob_list)
|
||||
for (var/datum/ailment/disease/V in I.ailments)
|
||||
if (!V.vaccine && !V.spread != "Remissive") score_disease++
|
||||
if (I.stat == 2 && I.z == 1) score_deadcrew += 1*/
|
||||
for (var/mob/living/carbon/human/I in mob_list)
|
||||
// for (var/datum/ailment/disease/V in I.ailments)
|
||||
// if (!V.vaccine && !V.spread != "Remissive") score_disease++
|
||||
if (I.stat == 2 && I.z == 1) score_deadcrew += 1
|
||||
if (I.job == "Clown")
|
||||
for(var/thing in I.attack_log)
|
||||
if(findtext(thing, "<font color='orange'>")) score_clownabuse++
|
||||
|
||||
|
||||
for(var/mob/living/player in mob_list)
|
||||
if (player.client)
|
||||
if (player.stat != 2)
|
||||
@@ -143,17 +148,17 @@
|
||||
|
||||
// Bonus Modifiers
|
||||
//var/traitorwins = score_traitorswon
|
||||
var/deathpoints = score_deadcrew * 25
|
||||
var/deathpoints = score_deadcrew * 25 //done
|
||||
var/researchpoints = score_researchdone * 30
|
||||
var/eventpoints = score_eventsendured * 50
|
||||
var/escapoints = score_escapees * 25
|
||||
var/escapoints = score_escapees * 25 //done
|
||||
var/harvests = score_stuffharvested * 5 //done
|
||||
var/shipping = score_stuffshipped * 5
|
||||
var/mining = score_oremined * 2 //done
|
||||
var/meals = score_meals * 5 //done, but this only counts cooked meals, not drinks served
|
||||
var/power = score_powerloss * 20
|
||||
var/messpoints
|
||||
if (score_mess != 0) messpoints = score_mess
|
||||
if (score_mess != 0) messpoints = score_mess //done
|
||||
var/plaguepoints = score_disease * 30
|
||||
|
||||
// Mode Specific
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||
|
||||
vampire_blood_display = new /obj/screen()
|
||||
vampire_blood_display.name = "Vampire Blood"
|
||||
vampire_blood_display.icon_state = "dark128"
|
||||
vampire_blood_display.screen_loc = "14:28,9:15"
|
||||
vampire_blood_display.layer = 20
|
||||
|
||||
mymob.client.screen += list(vampire_blood_display)
|
||||
@@ -0,0 +1,492 @@
|
||||
//This is the gamemode file for the ported goon gamemode vampires.
|
||||
//They get a traitor objective and a blood sucking objective
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/vampires = list()
|
||||
var/list/datum/mind/enthralled = list() //those controlled by a vampire
|
||||
var/list/thralls = list() //vammpires controlling somebody
|
||||
/datum/game_mode/vampire
|
||||
name = "vampire"
|
||||
config_tag = "vampire"
|
||||
restricted_jobs = list("AI", "Cyborg", "Mobile MMI", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain") //Consistent screening has filtered all infiltration attempts on high value jobs
|
||||
protected_jobs = list()
|
||||
required_players = 1
|
||||
required_players_secret = 15
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
|
||||
var/const/prob_int_item = 50 // intercept names the theft target half the time
|
||||
var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
|
||||
var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
|
||||
|
||||
var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
|
||||
var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
|
||||
var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
|
||||
|
||||
var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
|
||||
var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
|
||||
var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
|
||||
var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/vampire_amount = 4
|
||||
|
||||
|
||||
/datum/game_mode/vampire/announce()
|
||||
world << "<B>The current game mode is - Vampires!</B>"
|
||||
world << "<B>There are Vampires from Space Transylvania on the station, keep your blood close and neck safe!</B>"
|
||||
|
||||
/datum/game_mode/vampire/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
var/list/datum/mind/possible_vampires = get_players_for_role(BE_VAMPIRE)
|
||||
|
||||
for(var/datum/mind/player in possible_vampires)
|
||||
for(var/job in restricted_jobs)//Removing robots from the list
|
||||
if(player.assigned_role == job)
|
||||
possible_vampires -= player
|
||||
|
||||
vampire_amount = max(1,round(num_players() / 10)) //1 + round(num_players() / 10)
|
||||
|
||||
if(possible_vampires.len>0)
|
||||
for(var/i = 0, i < vampire_amount, i++)
|
||||
if(!possible_vampires.len) break
|
||||
var/datum/mind/vampire = pick(possible_vampires)
|
||||
possible_vampires -= vampire
|
||||
vampires += vampire
|
||||
modePlayer += vampires
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/game_mode/vampire/post_setup()
|
||||
for(var/datum/mind/vampire in vampires)
|
||||
grant_vampire_powers(vampire.current)
|
||||
vampire.special_role = "Vampire"
|
||||
forge_vampire_objectives(vampire)
|
||||
greet_vampire(vampire)
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_vampire()
|
||||
if(vampires.len)
|
||||
var/text = "<FONT size = 2><B>The vampires were:</B></FONT>"
|
||||
for(var/datum/mind/vampire in vampires)
|
||||
var/traitorwin = 1
|
||||
|
||||
text += "<br>[vampire.key] was [vampire.name] ("
|
||||
if(vampire.current)
|
||||
if(vampire.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(vampire.current.real_name != vampire.name)
|
||||
text += " as [vampire.current.real_name]"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
if(vampire.objectives.len)//If the traitor had no objectives, don't need to process this.
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in vampire.objectives)
|
||||
if(objective.check_completion())
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
||||
else
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
||||
traitorwin = 0
|
||||
count++
|
||||
|
||||
var/special_role_text
|
||||
if(vampire.special_role)
|
||||
special_role_text = lowertext(vampire.special_role)
|
||||
else
|
||||
special_role_text = "antagonist"
|
||||
|
||||
if(traitorwin)
|
||||
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
|
||||
feedback_add_details("traitor_success","SUCCESS")
|
||||
else
|
||||
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
|
||||
feedback_add_details("traitor_success","FAIL")
|
||||
world << text
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_enthralled()
|
||||
if(enthralled.len)
|
||||
var/text = "<FONT size = 2><B>The Enthralled were:</B></FONT>"
|
||||
for(var/datum/mind/enthralled in enthralled)
|
||||
text += "<br>[enthralled.key] was [enthralled.name] ("
|
||||
if(enthralled.current)
|
||||
if(enthralled.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(enthralled.current.real_name != enthralled.name)
|
||||
text += " as [enthralled.current.real_name]"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
world << text
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/forge_vampire_objectives(var/datum/mind/vampire)
|
||||
//Objectives are traitor objectives plus blood objectives
|
||||
|
||||
var/datum/objective/blood/blood_objective = new
|
||||
blood_objective.owner = vampire
|
||||
blood_objective.gen_amount_goal(150, 400)
|
||||
vampire.objectives += blood_objective
|
||||
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = vampire
|
||||
kill_objective.find_target()
|
||||
vampire.objectives += kill_objective
|
||||
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = vampire
|
||||
steal_objective.find_target()
|
||||
vampire.objectives += steal_objective
|
||||
|
||||
|
||||
switch(rand(1,100))
|
||||
if(1 to 80)
|
||||
if (!(locate(/datum/objective/escape) in vampire.objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = vampire
|
||||
vampire.objectives += escape_objective
|
||||
else
|
||||
if (!(locate(/datum/objective/survive) in vampire.objectives))
|
||||
var/datum/objective/survive/survive_objective = new
|
||||
survive_objective.owner = vampire
|
||||
vampire.objectives += survive_objective
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/grant_vampire_powers(mob/living/carbon/vampire_mob)
|
||||
if(!istype(vampire_mob)) return
|
||||
vampire_mob.make_vampire()
|
||||
|
||||
/datum/game_mode/proc/greet_vampire(var/datum/mind/vampire, var/you_are=1)
|
||||
var/dat
|
||||
if (you_are)
|
||||
dat = "<B>\red You are a Vampire! \black</br></B>"
|
||||
dat += {"To bite someone, target the head and use harm intent with an empty hand. Drink blood to gain new powers.
|
||||
You are weak to holy things and starlight. Don't go into space and avoid the Chaplain, the chapel and especially Holy Water."}
|
||||
vampire.current << dat
|
||||
vampire.current << "<B>You must complete the following tasks:</B>"
|
||||
|
||||
if (vampire.current.mind)
|
||||
if (vampire.current.mind.assigned_role == "Clown")
|
||||
vampire.current << "Your lust for blood has allowed you to overcome your clumsy nature allowing you to wield weapons without harming yourself."
|
||||
vampire.current.mutations.Remove(CLUMSY)
|
||||
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in vampire.objectives)
|
||||
vampire.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
return
|
||||
|
||||
/datum/vampire
|
||||
var/bloodtotal = 0 // CHANGE TO ZERO WHEN PLAYTESTING HAPPENS
|
||||
var/bloodusable = 0 // CHANGE TO ZERO WHEN PLAYTESTING HAPPENS
|
||||
var/mob/living/owner = null
|
||||
var/gender = FEMALE
|
||||
var/iscloaking = 0 // handles the vampire cloak toggle
|
||||
var/list/powers = list() // list of available powers and passives, see defines in setup.dm
|
||||
var/mob/living/carbon/human/draining // who the vampire is draining of blood
|
||||
var/nullified = 0 //Nullrod makes them useless for a short while.
|
||||
/datum/vampire/New(gend = FEMALE)
|
||||
gender = gend
|
||||
|
||||
/mob/proc/make_vampire()
|
||||
if(!mind) return
|
||||
if(!mind.vampire)
|
||||
mind.vampire = new /datum/vampire(gender)
|
||||
mind.vampire.owner = src
|
||||
verbs += /client/proc/vampire_rejuvinate
|
||||
verbs += /client/proc/vampire_hypnotise
|
||||
verbs += /client/proc/vampire_glare
|
||||
//testing purposes REMOVE BEFORE PUSH TO MASTER
|
||||
/*for(var/handler in typesof(/client/proc))
|
||||
if(findtext("[handler]","vampire_"))
|
||||
verbs += handler*/
|
||||
for(var/i = 1; i <= 3; i++) // CHANGE TO 3 RATHER THAN 12 AFTER TESTING IS DONE
|
||||
if(!(i in mind.vampire.powers))
|
||||
mind.vampire.powers.Add(i)
|
||||
|
||||
|
||||
for(var/n in mind.vampire.powers)
|
||||
switch(n)
|
||||
if(VAMP_SHAPE)
|
||||
verbs += /client/proc/vampire_shapeshift
|
||||
if(VAMP_VISION)
|
||||
continue
|
||||
if(VAMP_DISEASE)
|
||||
verbs += /client/proc/vampire_disease
|
||||
if(VAMP_CLOAK)
|
||||
verbs += /client/proc/vampire_cloak
|
||||
if(VAMP_BATS)
|
||||
verbs += /client/proc/vampire_bats
|
||||
if(VAMP_SCREAM)
|
||||
verbs += /client/proc/vampire_screech
|
||||
if(VAMP_JAUNT)
|
||||
verbs += /client/proc/vampire_jaunt
|
||||
if(VAMP_BLINK)
|
||||
verbs += /client/proc/vampire_shadowstep
|
||||
if(VAMP_SLAVE)
|
||||
verbs += /client/proc/vampire_enthrall
|
||||
if(VAMP_FULL)
|
||||
continue
|
||||
/mob/proc/remove_vampire_powers()
|
||||
for(var/handler in typesof(/client/proc))
|
||||
if(findtext("[handler]","vampire_"))
|
||||
verbs -= handler
|
||||
|
||||
/mob/proc/handle_bloodsucking(mob/living/carbon/human/H)
|
||||
src.mind.vampire.draining = H
|
||||
var/blood = 0
|
||||
var/bloodtotal = 0 //used to see if we increased our blood total
|
||||
var/bloodusable = 0 //used to see if we increased our blood usable
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='red'>Bit [src.name] ([src.ckey]) in the neck and draining their blood</font>")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been bit in the neck by [src.name] ([src.ckey])</font>")
|
||||
log_attack("[src.name] ([src.ckey]) bit [H.name] ([H.ckey]) in the neck")
|
||||
src.visible_message("\red <b>[src.name] bites [H.name]'s neck!<b>", "\red <b>You bite [H.name]'s neck and begin to drain their blood.", "\blue You hear a soft puncture and a wet sucking noise")
|
||||
while(do_mob(src, H, 50))
|
||||
if(!mind.vampire || !(mind in ticker.mode.vampires))
|
||||
src << "\red Your fangs have disappeared!"
|
||||
return 0
|
||||
bloodtotal = src.mind.vampire.bloodtotal
|
||||
bloodusable = src.mind.vampire.bloodusable
|
||||
if(!H.vessel.get_reagent_amount("blood"))
|
||||
src << "\red They've got no blood left to give."
|
||||
break
|
||||
if(H.stat < 2) //alive
|
||||
blood = min(10, H.vessel.get_reagent_amount("blood"))// if they have less than 10 blood, give them the remnant else they get 10 blood
|
||||
src.mind.vampire.bloodtotal += blood
|
||||
src.mind.vampire.bloodusable += blood
|
||||
H.adjustCloneLoss(5) // beep boop 10 damage
|
||||
else
|
||||
blood = min(5, H.vessel.get_reagent_amount("blood"))// The dead only give 5 bloods
|
||||
src.mind.vampire.bloodtotal += blood
|
||||
if(bloodtotal != src.mind.vampire.bloodtotal)
|
||||
src << "\blue <b>You have accumulated [src.mind.vampire.bloodtotal] [src.mind.vampire.bloodtotal > 1 ? "units" : "unit"] of blood[src.mind.vampire.bloodusable != bloodusable ?", and have [src.mind.vampire.bloodusable] left to use" : "."]"
|
||||
check_vampire_upgrade(mind)
|
||||
H.vessel.remove_reagent("blood",25)
|
||||
|
||||
src.mind.vampire.draining = null
|
||||
src << "\blue You stop draining [H.name] of blood."
|
||||
return 1
|
||||
|
||||
/mob/proc/check_vampire_upgrade(datum/mind/v)
|
||||
if(!v) return
|
||||
if(!v.vampire) return
|
||||
var/datum/vampire/vamp = v.vampire
|
||||
var/list/old_powers = vamp.powers.Copy()
|
||||
|
||||
// This used to be a switch statement.
|
||||
// Don't use switch statements for shit like this, since blood can be any random-ass value.
|
||||
// if(100) requires the blood to be at EXACTLY 100 units to trigger.
|
||||
// if(blud >= 100) activates when blood is at or over 100 units.
|
||||
// TODO: Make this modular.
|
||||
|
||||
// TIER 1
|
||||
if(vamp.bloodtotal >= 100)
|
||||
if(!(VAMP_VISION in vamp.powers))
|
||||
vamp.powers.Add(VAMP_VISION)
|
||||
if(!(VAMP_SHAPE in vamp.powers))
|
||||
vamp.powers.Add(VAMP_SHAPE)
|
||||
|
||||
// TIER 2
|
||||
if(vamp.bloodtotal >= 150)
|
||||
if(!(VAMP_CLOAK in vamp.powers))
|
||||
vamp.powers.Add(VAMP_CLOAK)
|
||||
if(!(VAMP_DISEASE in vamp.powers))
|
||||
vamp.powers.Add(VAMP_DISEASE)
|
||||
|
||||
// TIER 3
|
||||
if(vamp.bloodtotal >= 200)
|
||||
if(!(VAMP_BATS in vamp.powers))
|
||||
vamp.powers.Add(VAMP_BATS)
|
||||
if(!(VAMP_SCREAM in vamp.powers))
|
||||
vamp.powers.Add(VAMP_SCREAM)
|
||||
// Commented out until we can figured out a way to stop this from spamming.
|
||||
//src << "\blue Your rejuvination abilities have improved and will now heal you over time when used."
|
||||
|
||||
// TIER 3.5 (/vg/)
|
||||
if(vamp.bloodtotal >= 250)
|
||||
if(!(VAMP_BLINK in vamp.powers))
|
||||
vamp.powers.Add(VAMP_BLINK)
|
||||
|
||||
// TIER 4
|
||||
if(vamp.bloodtotal >= 300)
|
||||
if(!(VAMP_JAUNT in vamp.powers))
|
||||
vamp.powers.Add(VAMP_JAUNT)
|
||||
if(!(VAMP_SLAVE in vamp.powers))
|
||||
vamp.powers.Add(VAMP_SLAVE)
|
||||
|
||||
// TIER 5
|
||||
if(vamp.bloodtotal >= 500)
|
||||
if(!(VAMP_FULL in vamp.powers))
|
||||
vamp.powers.Add(VAMP_FULL)
|
||||
|
||||
announce_new_power(old_powers, vamp.powers)
|
||||
|
||||
/mob/proc/announce_new_power(list/old_powers, list/new_powers)
|
||||
for(var/n in new_powers)
|
||||
if(!(n in old_powers))
|
||||
switch(n)
|
||||
if(VAMP_SHAPE)
|
||||
src << "\blue You have gained the shapeshifting ability, at the cost of stored blood you can change your form permanently."
|
||||
verbs += /client/proc/vampire_shapeshift
|
||||
if(VAMP_VISION)
|
||||
src << "\blue Your vampiric vision has improved."
|
||||
//no verb
|
||||
if(VAMP_DISEASE)
|
||||
src << "\blue You have gained the Diseased Touch ability which causes those you touch to die shortly after unless treated medically."
|
||||
verbs += /client/proc/vampire_disease
|
||||
if(VAMP_CLOAK)
|
||||
src << "\blue You have gained the Cloak of Darkness ability which when toggled makes you near invisible in the shroud of darkness."
|
||||
verbs += /client/proc/vampire_cloak
|
||||
if(VAMP_BATS)
|
||||
src << "\blue You have gained the Summon Bats ability."
|
||||
verbs += /client/proc/vampire_bats // work in progress
|
||||
if(VAMP_SCREAM)
|
||||
src << "\blue You have gained the Chriopteran Screech ability which stuns anything with ears in a large radius and shatters glass in the process."
|
||||
verbs += /client/proc/vampire_screech
|
||||
if(VAMP_JAUNT)
|
||||
src << "\blue You have gained the Mist Form ability which allows you to take on the form of mist for a short period and pass over any obstacle in your path."
|
||||
verbs += /client/proc/vampire_jaunt
|
||||
if(VAMP_SLAVE)
|
||||
src << "\blue You have gained the Enthrall ability which at a heavy blood cost allows you to enslave a human that is not loyal to any other for a random period of time."
|
||||
verbs += /client/proc/vampire_enthrall
|
||||
if(VAMP_BLINK)
|
||||
src << "\blue You have gained the ability to shadowstep, which makes you disappear into nearby shadows at the cost of blood."
|
||||
verbs += /client/proc/vampire_shadowstep
|
||||
if(VAMP_FULL)
|
||||
src << "\blue You have reached your full potential and are no longer weak to the effects of anything holy and your vision has been improved greatly."
|
||||
//no verb
|
||||
//prepare for copypaste
|
||||
/datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind)
|
||||
var/ref = "\ref[vampire_mind]"
|
||||
if(ref in thralls)
|
||||
if(vampire_mind.current)
|
||||
if(vampire_mind.current.client)
|
||||
var/I = image('icons/mob/mob.dmi', loc = vampire_mind.current, icon_state = "vampire")
|
||||
vampire_mind.current.client.images += I
|
||||
for(var/headref in thralls)
|
||||
for(var/datum/mind/t_mind in thralls[headref])
|
||||
var/datum/mind/head = locate(headref)
|
||||
if(head)
|
||||
if(head.current)
|
||||
if(head.current.client)
|
||||
var/I = image('icons/mob/mob.dmi', loc = t_mind.current, icon_state = "vampthrall")
|
||||
head.current.client.images += I
|
||||
if(t_mind.current)
|
||||
if(t_mind.current.client)
|
||||
var/I = image('icons/mob/mob.dmi', loc = head.current, icon_state = "vampire")
|
||||
t_mind.current.client.images += I
|
||||
if(t_mind.current)
|
||||
if(t_mind.current.client)
|
||||
var/I = image('icons/mob/mob.dmi', loc = t_mind.current, icon_state = "vampthrall")
|
||||
t_mind.current.client.images += I
|
||||
|
||||
/datum/game_mode/proc/update_vampire_icons_removed(datum/mind/vampire_mind)
|
||||
for(var/headref in thralls)
|
||||
var/datum/mind/head = locate(headref)
|
||||
for(var/datum/mind/t_mind in thralls[headref])
|
||||
if(t_mind.current)
|
||||
if(t_mind.current.client)
|
||||
for(var/image/I in t_mind.current.client.images)
|
||||
if((I.icon_state == "vampthrall" || I.icon_state == "vampire") && I.loc == vampire_mind.current)
|
||||
//world.log << "deleting [vampire_mind] overlay"
|
||||
del(I)
|
||||
if(head)
|
||||
//world.log << "found [head.name]"
|
||||
if(head.current)
|
||||
if(head.current.client)
|
||||
for(var/image/I in head.current.client.images)
|
||||
if((I.icon_state == "vampthrall" || I.icon_state == "vampire") && I.loc == vampire_mind.current)
|
||||
//world.log << "deleting [vampire_mind] overlay"
|
||||
del(I)
|
||||
if(vampire_mind.current)
|
||||
if(vampire_mind.current.client)
|
||||
for(var/image/I in vampire_mind.current.client.images)
|
||||
if(I.icon_state == "vampthrall" || I.icon_state == "vampire")
|
||||
del(I)
|
||||
|
||||
/datum/game_mode/proc/remove_vampire_mind(datum/mind/vampire_mind, datum/mind/head)
|
||||
//var/list/removal
|
||||
if(!istype(head))
|
||||
head = vampire_mind //workaround for removing a thrall's control over the enthralled
|
||||
var/ref = "\ref[head]"
|
||||
if(ref in thralls)
|
||||
thralls[ref] -= vampire_mind
|
||||
enthralled -= vampire_mind
|
||||
vampire_mind.special_role = null
|
||||
update_vampire_icons_removed(vampire_mind)
|
||||
//world << "Removed [vampire_mind.current.name] from vampire shit"
|
||||
vampire_mind.current << "\red <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were enthralled until now.</B></FONT>"
|
||||
|
||||
/mob/living/carbon/human/proc/check_sun()
|
||||
|
||||
var/ax = x
|
||||
var/ay = y
|
||||
|
||||
for(var/i = 1 to 20)
|
||||
ax += sun.dx
|
||||
ay += sun.dy
|
||||
|
||||
var/turf/T = locate( round(ax,0.5),round(ay,0.5),z)
|
||||
|
||||
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy)
|
||||
break
|
||||
|
||||
if(T.density)
|
||||
return
|
||||
if(prob(35))
|
||||
switch(health)
|
||||
if(80 to 100)
|
||||
src << "\red Your skin flakes away..."
|
||||
if(60 to 80)
|
||||
src << "<span class='warning'>Your skin sizzles!</span>"
|
||||
if((-INFINITY) to 60)
|
||||
if(!on_fire)
|
||||
src << "<b>\red Your skin catches fire!</b>"
|
||||
else
|
||||
src << "<b>\red You continue to burn!</b>"
|
||||
fire_stacks += 5
|
||||
IgniteMob()
|
||||
emote("scream")
|
||||
else
|
||||
switch(health)
|
||||
if((-INFINITY) to 60)
|
||||
fire_stacks++
|
||||
IgniteMob()
|
||||
adjustFireLoss(3)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_vampire()
|
||||
if(hud_used)
|
||||
if(!hud_used.vampire_blood_display)
|
||||
hud_used.vampire_hud()
|
||||
//hud_used.human_hud(hud_used.ui_style)
|
||||
hud_used.vampire_blood_display.maptext_width = 64
|
||||
hud_used.vampire_blood_display.maptext_height = 26
|
||||
hud_used.vampire_blood_display.maptext = "<div align='left' valign='top' style='position:relative; top:0px; left:6px'> U:<font color='#33FF33' size='1'>[mind.vampire.bloodusable]</font><br> T:<font color='#FFFF00' size='1'>[mind.vampire.bloodtotal]</font></div>"
|
||||
handle_vampire_cloak()
|
||||
if(istype(loc, /turf/space))
|
||||
check_sun()
|
||||
mind.vampire.nullified = max(0, mind.vampire.nullified - 1)
|
||||
@@ -0,0 +1,469 @@
|
||||
//This should hold all the vampire related powers
|
||||
|
||||
|
||||
/mob/proc/vampire_power(required_blood=0, max_stat=0)
|
||||
|
||||
if(!src.mind) return 0
|
||||
if(!ishuman(src))
|
||||
src << "<span class='warning'>You are in too weak of a form to do this!</span>"
|
||||
return 0
|
||||
|
||||
var/datum/vampire/vampire = src.mind.vampire
|
||||
|
||||
if(!vampire)
|
||||
world.log << "[src] has vampire verbs but isn't a vampire."
|
||||
return 0
|
||||
|
||||
var/fullpower = (VAMP_FULL in vampire.powers)
|
||||
|
||||
if(src.stat > max_stat)
|
||||
src << "<span class='warning'>You are incapacitated.</span>"
|
||||
return 0
|
||||
|
||||
if(vampire.nullified)
|
||||
if(!fullpower)
|
||||
src << "<span class='warning'>Something is blocking your powers!</span>"
|
||||
return 0
|
||||
if(vampire.bloodusable < required_blood)
|
||||
src << "<span class='warning'>You require at least [required_blood] units of usable blood to do that!</span>"
|
||||
return 0
|
||||
//chapel check
|
||||
if(istype(loc.loc, /area/chapel))
|
||||
if(!fullpower)
|
||||
src << "<span class='warning'>Your powers are useless on this holy ground.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/proc/vampire_affected(datum/mind/M)
|
||||
//Other vampires aren't affected
|
||||
if(mind && mind.vampire) return 0
|
||||
//Vampires who have reached their full potential can affect nearly everything
|
||||
if(M && M.vampire && (VAMP_FULL in M.vampire.powers))
|
||||
return 1
|
||||
//Chaplains are resistant to vampire powers
|
||||
if(mind && mind.assigned_role == "Chaplain")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/proc/vampire_can_reach(mob/M as mob, active_range = 1)
|
||||
if(M.loc == src.loc) return 1 //target and source are in the same thing
|
||||
if(!isturf(src.loc) || !isturf(M.loc)) return 0 //One is inside, the other is outside something.
|
||||
if(AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, active_range)) //If a path exists, good!
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/proc/vampire_active(required_blood=0, max_stat=0, active_range=1)
|
||||
var/pass = vampire_power(required_blood, max_stat)
|
||||
if(!pass) return
|
||||
var/datum/vampire/vampire = mind.vampire
|
||||
if(!vampire) return
|
||||
var/list/victims = list()
|
||||
for(var/mob/living/carbon/C in oview(active_range))
|
||||
victims += C
|
||||
var/mob/living/carbon/T = input(src, "Victim?") as null|anything in victims
|
||||
|
||||
if(!T) return
|
||||
if(!(T in view(active_range))) return
|
||||
if(!vampire_can_reach(T, active_range)) return
|
||||
if(!vampire_power(required_blood, max_stat)) return
|
||||
return T
|
||||
|
||||
/client/proc/vampire_rejuvinate()
|
||||
set category = "Vampire"
|
||||
set name = "Rejuvinate "
|
||||
set desc= "Flush your system with spare blood to remove any incapacitating effects"
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(0, 1))
|
||||
M.current.weakened = 0
|
||||
M.current.stunned = 0
|
||||
M.current.paralysis = 0
|
||||
//M.vampire.bloodusable -= 10
|
||||
M.current << "\blue You flush your system with clean blood and remove any incapacitating effects."
|
||||
spawn(1)
|
||||
if(M.vampire.bloodtotal >= 200)
|
||||
for(var/i = 0; i < 5; i++)
|
||||
M.current.adjustBruteLoss(-2)
|
||||
M.current.adjustOxyLoss(-5)
|
||||
M.current.adjustToxLoss(-2)
|
||||
M.current.adjustFireLoss(-2)
|
||||
sleep(35)
|
||||
M.current.verbs -= /client/proc/vampire_rejuvinate
|
||||
spawn(200)
|
||||
M.current.verbs += /client/proc/vampire_rejuvinate
|
||||
|
||||
/client/proc/vampire_hypnotise()
|
||||
set category = "Vampire"
|
||||
set name = "Hypnotise (20)"
|
||||
set desc= "A piercing stare that incapacitates your victim for a good length of time."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
|
||||
var/mob/living/carbon/C = M.current.vampire_active(20, 0, 1)
|
||||
|
||||
if(!C) return
|
||||
M.current.visible_message("<span class='warning'>[M]'s eyes flash briefly as he stares into [C.name]'s eyes</span>")
|
||||
M.current.remove_vampire_blood(20)
|
||||
M.current.verbs -= /client/proc/vampire_hypnotise
|
||||
spawn(1800)
|
||||
M.current.verbs += /client/proc/vampire_hypnotise
|
||||
if(do_mob(M.current, C, 50))
|
||||
if(C.mind && C.mind.vampire)
|
||||
M.current << "\red Your piercing gaze fails to knock out [C.name]."
|
||||
C << "\blue [M.current]'s feeble gaze is ineffective."
|
||||
return
|
||||
else
|
||||
M.current << "\red Your piercing gaze knocks out [C.name]."
|
||||
C << "\red You find yourself unable to move and barely able to speak"
|
||||
C.Weaken(20)
|
||||
C.Stun(20)
|
||||
C.stuttering = 20
|
||||
else
|
||||
M.current << "\red You broke your gaze."
|
||||
return
|
||||
|
||||
/client/proc/vampire_disease()
|
||||
set category = "Vampire"
|
||||
set name = "Diseased Touch (100)"
|
||||
set desc = "Touches your victim with infected blood giving them the Shutdown Syndrome which quickly shutsdown their major organs resulting in a quick painful death."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
|
||||
var/mob/living/carbon/C = M.current.vampire_active(100, 0, 1)
|
||||
if(!C) return
|
||||
if(!M.current.vampire_can_reach(C, 1))
|
||||
M.current << "\red <b>You cannot touch [C.name] from where you are standing!"
|
||||
return
|
||||
M.current << "\red You stealthily infect [C.name] with your diseased touch."
|
||||
/*var/t_him = "it"
|
||||
if (src.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (src.gender == FEMALE)
|
||||
t_him = "her"
|
||||
M.current.visible_message("\blue [M] shakes [src] trying to wake [t_him] up!" )
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)*/
|
||||
C.help_shake_act(M.current) // i use da colon
|
||||
if(!C.vampire_affected(M))
|
||||
M.current << "\red They seem to be unaffected."
|
||||
return
|
||||
var/datum/disease2/disease/shutdown = new /datum/disease2/disease
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
var/datum/disease2/effect/organs/vampire/O = new /datum/disease2/effect/organs/vampire
|
||||
holder.effect += O
|
||||
holder.chance = 10
|
||||
shutdown.infectionchance = 100
|
||||
shutdown.antigen |= text2num(pick(ANTIGENS))
|
||||
shutdown.antigen |= text2num(pick(ANTIGENS))
|
||||
shutdown.spreadtype = "None"
|
||||
shutdown.uniqueID = rand(0,10000)
|
||||
shutdown.effects += holder
|
||||
shutdown.speed = 1
|
||||
shutdown.stage = 2
|
||||
shutdown.clicks = 185
|
||||
infect_virus2(C,shutdown,0)
|
||||
M.current.remove_vampire_blood(100)
|
||||
M.current.verbs -= /client/proc/vampire_disease
|
||||
spawn(1800) M.current.verbs += /client/proc/vampire_disease
|
||||
|
||||
/client/proc/vampire_glare()
|
||||
set category = "Vampire"
|
||||
set name = "Glare"
|
||||
set desc= "A scary glare that incapacitates people for a short while around you."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(0, 1))
|
||||
M.current.visible_message("\red <b>[M.current]'s eyes emit a blinding flash!")
|
||||
//M.vampire.bloodusable -= 10
|
||||
M.current.verbs -= /client/proc/vampire_glare
|
||||
spawn(300)
|
||||
M.current.verbs += /client/proc/vampire_glare
|
||||
if(istype(M.current:glasses, /obj/item/clothing/glasses/sunglasses/blindfold))
|
||||
M.current << "<span class='warning'>You're blindfolded!</span>"
|
||||
return
|
||||
for(var/mob/living/carbon/C in oview(1))
|
||||
if(!C.vampire_affected(M)) continue
|
||||
if(!M.current.vampire_can_reach(C, 1)) continue
|
||||
C.Stun(8)
|
||||
C.Weaken(8)
|
||||
C.stuttering = 20
|
||||
C << "\red You are blinded by [M.current]'s glare"
|
||||
|
||||
/client/proc/vampire_shapeshift()
|
||||
set category = "Vampire"
|
||||
set name = "Shapeshift (50)"
|
||||
set desc = "Changes your name and appearance at the cost of 50 blood and has a cooldown of 3 minutes."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(50, 0))
|
||||
M.current.visible_message("<span class='warning'>[M.current] transforms!</span>")
|
||||
M.current.client.prefs.real_name = random_name(M.current.gender)
|
||||
M.current.client.prefs.randomize_appearance_for(M.current)
|
||||
M.current.regenerate_icons()
|
||||
M.current.remove_vampire_blood(50)
|
||||
M.current.verbs -= /client/proc/vampire_shapeshift
|
||||
spawn(1800) M.current.verbs += /client/proc/vampire_shapeshift
|
||||
|
||||
/client/proc/vampire_screech()
|
||||
set category = "Vampire"
|
||||
set name = "Chiroptean Screech (30)"
|
||||
set desc = "An extremely loud shriek that stuns nearby humans and breaks windows as well."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(30, 0))
|
||||
M.current.visible_message("\red [M.current.name] lets out an ear piercing shriek!", "\red You let out a loud shriek.", "\red You hear a loud painful shriek!")
|
||||
for(var/mob/living/carbon/C in ohearers(4, M.current))
|
||||
if(C == M.current) continue
|
||||
if(ishuman(C) && (C:l_ear || C:r_ear) && istype((C:l_ear || C:r_ear), /obj/item/clothing/ears/earmuffs)) continue
|
||||
if(!C.vampire_affected(M)) continue
|
||||
C << "<span class='warning'><font size='3'><b>You hear a ear piercing shriek and your senses dull!</font></b></span>"
|
||||
C.Weaken(8)
|
||||
C.ear_deaf = 20
|
||||
C.stuttering = 20
|
||||
C.Stun(8)
|
||||
C.make_jittery(150)
|
||||
for(var/obj/structure/window/W in oview(3))
|
||||
new W.shardtype(W.loc)
|
||||
if(W.reinf) new /obj/item/stack/rods(W.loc)
|
||||
del(W)
|
||||
playsound(M.current.loc, 'sound/effects/creepyshriek.ogg', 100, 1)
|
||||
M.current.remove_vampire_blood(30)
|
||||
M.current.verbs -= /client/proc/vampire_screech
|
||||
spawn(1800) M.current.verbs += /client/proc/vampire_screech
|
||||
|
||||
/client/proc/vampire_enthrall()
|
||||
set category = "Vampire"
|
||||
set name = "Enthrall (300)"
|
||||
set desc = "You use a large portion of your power to sway those loyal to none to be loyal to you only."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
var/mob/living/carbon/C = M.current.vampire_active(300, 0, 1)
|
||||
if(!C) return
|
||||
M.current.visible_message("\red [M.current.name] bites [C.name]'s neck!", "\red You bite [C.name]'s neck and begin the flow of power.")
|
||||
C << "<span class='warning'>You feel the tendrils of evil invade your mind.</span>"
|
||||
if(!ishuman(C))
|
||||
M.current << "\red You can only enthrall humans"
|
||||
return
|
||||
|
||||
if(do_mob(M.current, C, 50))
|
||||
if(M.current.can_enthrall(C) && M.current.vampire_power(300, 0)) // recheck
|
||||
M.current.handle_enthrall(C)
|
||||
M.current.remove_vampire_blood(300)
|
||||
M.current.verbs -= /client/proc/vampire_enthrall
|
||||
spawn(1800) M.current.verbs += /client/proc/vampire_enthrall
|
||||
else
|
||||
M.current << "\red You or your target either moved or you dont have enough usable blood."
|
||||
return
|
||||
|
||||
|
||||
|
||||
/client/proc/vampire_cloak()
|
||||
set category = "Vampire"
|
||||
set name = "Cloak of Darkness (toggle)"
|
||||
set desc = "Toggles whether you are currently cloaking yourself in darkness."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(0, 0))
|
||||
M.vampire.iscloaking = !M.vampire.iscloaking
|
||||
M.current << "\blue You will now be [M.vampire.iscloaking ? "hidden" : "seen"] in darkness."
|
||||
|
||||
/mob/proc/handle_vampire_cloak()
|
||||
if(!mind || !mind.vampire || !ishuman(src))
|
||||
alpha = 255
|
||||
return
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
|
||||
if(!istype(T))
|
||||
return 0
|
||||
|
||||
if(!mind.vampire.iscloaking)
|
||||
alpha = 255
|
||||
return 0
|
||||
if(T.lighting_lumcount <= 2)
|
||||
alpha = round((255 * 0.15))
|
||||
return 1
|
||||
else
|
||||
alpha = round((255 * 0.80))
|
||||
|
||||
/mob/proc/can_enthrall(mob/living/carbon/C)
|
||||
if(!C)
|
||||
world.log << "something bad happened on enthralling a mob src is [src] [src.key] \ref[src]"
|
||||
return 0
|
||||
if(!C.mind)
|
||||
src << "\red [C.name]'s mind is not there for you to enthrall."
|
||||
return 0
|
||||
if((/obj/item/weapon/implant/traitor in C.contents) || (/obj/item/weapon/implant/loyalty in C.contents )||( C.mind in ticker.mode.vampires )||( C.mind.vampire )||( C.mind in ticker.mode.enthralled ))
|
||||
C.visible_message("\red [C] seems to resist the takeover!", "\blue You feel a familiar sensation in your skull that quickly dissipates.")
|
||||
return 0
|
||||
if(!C.vampire_affected(mind))
|
||||
C.visible_message("\red [C] seems to resist the takeover!", "\blue Your faith of [ticker.Bible_deity_name] has kept your mind clear of all evil")
|
||||
if(!ishuman(C))
|
||||
src << "\red You can only enthrall humans!"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/proc/handle_enthrall(mob/living/carbon/human/H as mob)
|
||||
if(!istype(H))
|
||||
src << "<b>\red SOMETHING WENT WRONG, YELL AT POMF OR NEXIS</b>"
|
||||
return 0
|
||||
var/ref = "\ref[src.mind]"
|
||||
if(!(ref in ticker.mode.thralls))
|
||||
ticker.mode.thralls[ref] = list(H.mind)
|
||||
else
|
||||
ticker.mode.thralls[ref] += H.mind
|
||||
ticker.mode.enthralled.Add(H.mind)
|
||||
ticker.mode.enthralled[H.mind] = src.mind
|
||||
H.mind.special_role = "VampThrall"
|
||||
H << "<b>\red You have been Enthralled by [name]. Follow their every command.</b>"
|
||||
src << "\red You have successfully Enthralled [H.name]. <i>If they refuse to do as you say just adminhelp.</i>"
|
||||
ticker.mode.update_vampire_icons_added(H.mind)
|
||||
ticker.mode.update_vampire_icons_added(src.mind)
|
||||
log_admin("[ckey(src.key)] has mind-slaved [ckey(H.key)].")
|
||||
|
||||
/client/proc/vampire_bats()
|
||||
set category = "Vampire"
|
||||
set name = "Summon Bats (75)"
|
||||
set desc = "You summon a pair of space bats who attack nearby targets until they or their target is dead."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
if(M.current.vampire_power(75, 0))
|
||||
var/list/turf/locs = new
|
||||
var/number = 0
|
||||
for(var/direction in alldirs) //looking for bat spawns
|
||||
if(locs.len == 2) //we found 2 locations and thats all we need
|
||||
break
|
||||
var/turf/T = get_step(M.current,direction) //getting a loc in that direction
|
||||
if(AStar(M.current.loc, T, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 1)) // if a path exists, so no dense objects in the way its valid salid
|
||||
locs += T
|
||||
if(locs.len)
|
||||
for(var/turf/tospawn in locs)
|
||||
number++
|
||||
new /mob/living/simple_animal/hostile/scarybat(tospawn, M.current)
|
||||
if(number != 2) //if we only found one location, spawn one on top of our tile so we dont get stacked bats
|
||||
new /mob/living/simple_animal/hostile/scarybat(M.current.loc, M.current)
|
||||
else // we had no good locations so make two on top of us
|
||||
new /mob/living/simple_animal/hostile/scarybat(M.current.loc, M.current)
|
||||
new /mob/living/simple_animal/hostile/scarybat(M.current.loc, M.current)
|
||||
M.current.remove_vampire_blood(75)
|
||||
M.current.verbs -= /client/proc/vampire_bats
|
||||
spawn(1200) M.current.verbs += /client/proc/vampire_bats
|
||||
|
||||
/client/proc/vampire_jaunt()
|
||||
//AHOY COPY PASTE INCOMING
|
||||
set category = "Vampire"
|
||||
set name = "Mist Form (30)"
|
||||
set desc = "You take on the form of mist for a short period of time."
|
||||
var/jaunt_duration = 50 //in deciseconds
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
|
||||
if(M.current.vampire_power(30, 0))
|
||||
if(M.current.buckled) M.current.buckled.unbuckle()
|
||||
spawn(0)
|
||||
var/mobloc = get_turf(M.current.loc)
|
||||
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
|
||||
animation.name = "water"
|
||||
animation.density = 0
|
||||
animation.anchored = 1
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.icon_state = "liquify"
|
||||
animation.layer = 5
|
||||
animation.master = holder
|
||||
M.current.ExtinguishMob()
|
||||
if(M.current.buckled)
|
||||
M.current.buckled.unbuckle()
|
||||
flick("liquify",animation)
|
||||
M.current.loc = holder
|
||||
M.current.client.eye = holder
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, mobloc)
|
||||
steam.start()
|
||||
sleep(jaunt_duration)
|
||||
mobloc = get_turf(M.current.loc)
|
||||
animation.loc = mobloc
|
||||
steam.location = mobloc
|
||||
steam.start()
|
||||
M.current.canmove = 0
|
||||
sleep(20)
|
||||
flick("reappear",animation)
|
||||
sleep(5)
|
||||
if(!M.current.Move(mobloc))
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
var/turf/T = get_step(mobloc, direction)
|
||||
if(T)
|
||||
if(M.current.Move(T))
|
||||
break
|
||||
M.current.canmove = 1
|
||||
M.current.client.eye = M.current
|
||||
del(animation)
|
||||
del(holder)
|
||||
M.current.remove_vampire_blood(30)
|
||||
M.current.verbs -= /client/proc/vampire_jaunt
|
||||
spawn(600) M.current.verbs += /client/proc/vampire_jaunt
|
||||
|
||||
// Blink for vamps
|
||||
// Less smoke spam.
|
||||
/client/proc/vampire_shadowstep()
|
||||
set category = "Vampire"
|
||||
set name = "Shadowstep (30)"
|
||||
set desc = "Vanish into the shadows."
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!M) return
|
||||
|
||||
// Teleport radii
|
||||
var/inner_tele_radius = 0
|
||||
var/outer_tele_radius = 6
|
||||
|
||||
// Maximum lighting_lumcount.
|
||||
var/max_lum = 1
|
||||
|
||||
if(M.current.vampire_power(30, 0))
|
||||
if(M.current.buckled) M.current.buckled.unbuckle()
|
||||
spawn(0)
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in range(usr,outer_tele_radius))
|
||||
if(T in range(usr,inner_tele_radius)) continue
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
|
||||
|
||||
// LIGHTING CHECK
|
||||
if(T.lighting_lumcount > max_lum) continue
|
||||
turfs += T
|
||||
|
||||
if(!turfs.len)
|
||||
usr << "\red You cannot find darkness to step to."
|
||||
return
|
||||
|
||||
var/turf/picked = pick(turfs)
|
||||
|
||||
if(!picked || !isturf(picked))
|
||||
return
|
||||
M.current.ExtinguishMob()
|
||||
if(M.current.buckled)
|
||||
M.current.buckled.unbuckle()
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( get_turf(usr) )
|
||||
animation.name = usr.name
|
||||
animation.density = 0
|
||||
animation.anchored = 1
|
||||
animation.icon = usr.icon
|
||||
animation.alpha = 127
|
||||
animation.layer = 5
|
||||
//animation.master = src
|
||||
usr.loc = picked
|
||||
spawn(10)
|
||||
del(animation)
|
||||
M.current.remove_vampire_blood(30)
|
||||
M.current.verbs -= /client/proc/vampire_shadowstep
|
||||
spawn(20)
|
||||
M.current.verbs += /client/proc/vampire_shadowstep
|
||||
|
||||
/mob/proc/remove_vampire_blood(amount = 0)
|
||||
var/bloodold
|
||||
if(!mind || !mind.vampire)
|
||||
return
|
||||
bloodold = mind.vampire.bloodusable
|
||||
mind.vampire.bloodusable = max(0, (mind.vampire.bloodusable - amount))
|
||||
if(bloodold != mind.vampire.bloodusable)
|
||||
src << "\blue <b>You have [mind.vampire.bloodusable] left to use.</b>"
|
||||
@@ -0,0 +1,206 @@
|
||||
|
||||
/////////Apprentice Contract//////////
|
||||
|
||||
/obj/item/weapon/contract
|
||||
name = "contract"
|
||||
desc = "A magic contract previously signed by an apprentice. In exchange for instruction in the magical arts, they are bound to answer your call for aid."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
var/used = 0
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
|
||||
/obj/item/weapon/contract/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(used)
|
||||
dat = "<B>You have already summoned your apprentice.</B><BR>"
|
||||
else
|
||||
dat = "<B>Contract of Apprenticeship:</B><BR>"
|
||||
dat += "<I>Using this contract, you may summon an apprentice to aid you on your mission.</I><BR>"
|
||||
dat += "<I>If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.</I><BR>"
|
||||
dat += "<B>Which school of magic is your apprentice studying?:</B><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];school=destruction'>Destruction</A><BR>"
|
||||
dat += "<I>Your apprentice is skilled in offensive magic. They know Magic Missile and Fireball.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];school=bluespace'>Bluespace Manipulation</A><BR>"
|
||||
dat += "<I>Your apprentice is able to defy physics, melting through solid objects and travelling great distances in the blink of an eye. They know Teleport and Ethereal Jaunt.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];school=healing'>Healing</A><BR>"
|
||||
dat += "<I>Your apprentice is training to cast spells that will aid your survival. They know Forcewall and Charge and come with a Staff of Healing.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];school=robeless'>Robeless</A><BR>"
|
||||
dat += "<I>Your apprentice is training to cast spells without their robes. They know Knock and Mindswap.</I><BR>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/contract/Topic(href, href_list)
|
||||
..()
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(H.stat || H.restrained())
|
||||
return
|
||||
if(!istype(H, /mob/living/carbon/human))
|
||||
return 1
|
||||
|
||||
if(loc == H || (in_range(src, H) && istype(loc, /turf)))
|
||||
H.set_machine(src)
|
||||
if(href_list["school"])
|
||||
if (used)
|
||||
H << "You already used this contract!"
|
||||
return
|
||||
var/list/candidates = get_candidates(BE_WIZARD)
|
||||
if(candidates.len)
|
||||
src.used = 1
|
||||
var/client/C = pick(candidates)
|
||||
new /obj/effect/effect/harmless_smoke(H.loc)
|
||||
var/mob/living/carbon/human/M = new/mob/living/carbon/human(H.loc)
|
||||
M.key = C.key
|
||||
M << "<B>You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals."
|
||||
switch(href_list["school"])
|
||||
if("destruction")
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(M)
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/dumbfire/fireball(M)
|
||||
M << "<B>Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned powerful, destructive spells. You are able to cast magic missile and fireball."
|
||||
if("bluespace")
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(M)
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(M)
|
||||
M << "<B>Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned reality bending mobility spells. You are able to cast teleport and ethereal jaunt."
|
||||
if("healing")
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/targeted/charge(M)
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(M)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/magic/staff/healing(M), slot_r_hand)
|
||||
M << "<B>Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall."
|
||||
if("robeless")
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/knock(M)
|
||||
M.spell_list += new /obj/effect/proc_holder/spell/targeted/mind_transfer(M)
|
||||
M << "<B>Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap."
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll/apprentice(M), slot_r_store)
|
||||
var/wizard_name_first = pick(wizard_first)
|
||||
var/wizard_name_second = pick(wizard_second)
|
||||
var/randomname = "[wizard_name_first] [wizard_name_second]"
|
||||
var/newname = copytext(sanitize(input(M, "You are the wizard's apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
|
||||
|
||||
if (!newname)
|
||||
newname = randomname
|
||||
M.mind.name = newname
|
||||
M.real_name = newname
|
||||
M.name = newname
|
||||
var/datum/objective/protect/new_objective = new /datum/objective/protect
|
||||
new_objective.owner = M:mind
|
||||
new_objective:target = H:mind
|
||||
new_objective.explanation_text = "Protect [H.real_name], the wizard."
|
||||
M.mind.objectives += new_objective
|
||||
ticker.mode.traitors += M.mind
|
||||
M.mind.special_role = "apprentice"
|
||||
|
||||
else
|
||||
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."
|
||||
return
|
||||
|
||||
|
||||
///////////////////////////Veil Render//////////////////////
|
||||
|
||||
/obj/item/weapon/veilrender
|
||||
name = "veil render"
|
||||
desc = "A wicked curved blade of alien origin, recovered from the ruins of a vast city."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
item_state = "render"
|
||||
flags = FPRINT | TABLEPASS
|
||||
force = 15
|
||||
throwforce = 10
|
||||
w_class = 3
|
||||
var/charged = 1
|
||||
|
||||
/obj/effect/rend
|
||||
name = "tear in the fabric of reality"
|
||||
desc = "You should run now"
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "rift"
|
||||
density = 1
|
||||
unacidable = 1
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/rend/New()
|
||||
spawn(50)
|
||||
new /obj/machinery/singularity/narsie/wizard(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/veilrender/attack_self(mob/user as mob)
|
||||
if(charged == 1)
|
||||
new /obj/effect/rend(get_turf(usr))
|
||||
charged = 0
|
||||
visible_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
|
||||
else
|
||||
user << "\red The unearthly energies that powered the blade are now dormant."
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/veilrender/vealrender
|
||||
name = "veal render"
|
||||
desc = "A wicked curved blade of alien origin, recovered from the ruins of a vast farm."
|
||||
|
||||
/obj/item/weapon/veilrender/vealrender/attack_self(mob/user as mob)
|
||||
if(charged)
|
||||
new /obj/effect/rend/cow(get_turf(usr))
|
||||
charged = 0
|
||||
visible_message("\red <B>[src] hums with power as [usr] deals a blow to hunger itself!</B>")
|
||||
else
|
||||
user << "\red The unearthly energies that powered the blade are now dormant."
|
||||
|
||||
/obj/effect/rend/cow
|
||||
desc = "Reverberates with the sound of ten thousand moos."
|
||||
var/cowsleft = 20
|
||||
|
||||
/obj/effect/rend/cow/New()
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
|
||||
/obj/effect/rend/cow/process()
|
||||
if(locate(/mob) in loc) return
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
cowsleft--
|
||||
if(cowsleft <= 0)
|
||||
del src
|
||||
|
||||
/obj/effect/rend/cow/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/nullrod))
|
||||
visible_message("\red <b>[I] strikes a blow against \the [src], banishing it!</b>")
|
||||
spawn(1)
|
||||
del src
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/////////////////////////////////////////Scrying///////////////////
|
||||
|
||||
/obj/item/weapon/scrying
|
||||
name = "scrying orb"
|
||||
desc = "An incandescent orb of otherworldly energy, staring into it gives you vision beyond mortal means."
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state ="bluespace"
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
throwforce = 15
|
||||
damtype = BURN
|
||||
force = 15
|
||||
flags = FPRINT | TABLEPASS
|
||||
hitsound = 'sound/items/welder2.ogg'
|
||||
|
||||
/obj/item/weapon/scrying/attack_self(mob/user as mob)
|
||||
user << "\blue You can see...everything!"
|
||||
visible_message("\red <B>[usr] stares into [src], their eyes glazing over.</B>")
|
||||
user.ghostize(1)
|
||||
return
|
||||
@@ -1,62 +1,111 @@
|
||||
|
||||
|
||||
/mob/proc/rightandwrong()
|
||||
usr << "<B>You summoned guns!</B>"
|
||||
message_admins("[key_name_admin(usr, 1)] summoned guns!")
|
||||
/mob/proc/rightandwrong(var/summon_type) //0 = Summon Guns, 1 = Summon Magic
|
||||
usr << "<B>You summoned [summon_type ? "magic" : "guns"]!</B>"
|
||||
message_admins("[key_name_admin(usr, 1)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
if(prob(25))
|
||||
if(H.mind)
|
||||
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice") continue
|
||||
if(prob(25) && !(H.mind in ticker.mode.traitors))
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = H.mind
|
||||
H.mind.objectives += survive
|
||||
H.attack_log += "\[[time_stamp()]\] <font color='red'>Was made into a survivor, and trusts no one!</font>"
|
||||
H << "<B>You are the survivor! Your own safety matters above all else, trust no one and kill anyone who gets in your way. However, armed as you are, now would be the perfect time to settle that score or grab that pair of yellow gloves you've been eyeing...</B>"
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
var/randomize = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
|
||||
switch (randomize)
|
||||
if("taser")
|
||||
new /obj/item/weapon/gun/energy/taser(get_turf(H))
|
||||
if("egun")
|
||||
new /obj/item/weapon/gun/energy/gun(get_turf(H))
|
||||
if("laser")
|
||||
new /obj/item/weapon/gun/energy/laser(get_turf(H))
|
||||
if("revolver")
|
||||
new /obj/item/weapon/gun/projectile/revolver(get_turf(H))
|
||||
if("detective")
|
||||
new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H))
|
||||
if("smg")
|
||||
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
|
||||
if("nuclear")
|
||||
new /obj/item/weapon/gun/energy/gun/nuclear(get_turf(H))
|
||||
if("deagle")
|
||||
new /obj/item/weapon/gun/projectile/automatic/deagle/camo(get_turf(H))
|
||||
if("gyrojet")
|
||||
new /obj/item/weapon/gun/projectile/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
|
||||
if("silenced")
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H))
|
||||
new /obj/item/weapon/silencer(get_turf(H))
|
||||
if("cannon")
|
||||
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
|
||||
if("doublebarrel")
|
||||
new /obj/item/weapon/gun/projectile/revolver/doublebarrel/(get_turf(H))
|
||||
if("shotgun")
|
||||
new /obj/item/weapon/gun/projectile/shotgun/(get_turf(H))
|
||||
if("combatshotgun")
|
||||
new /obj/item/weapon/gun/projectile/shotgun/combat(get_turf(H))
|
||||
if("mateba")
|
||||
new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H))
|
||||
if("smg")
|
||||
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
|
||||
if("uzi")
|
||||
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||
if("crossbow")
|
||||
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
|
||||
if("saw")
|
||||
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
|
||||
var/randomizeguns = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
|
||||
var/randomizemagic = pick("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge","wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying")
|
||||
if(!summon_type)
|
||||
switch (randomizeguns)
|
||||
if("taser")
|
||||
new /obj/item/weapon/gun/energy/taser(get_turf(H))
|
||||
if("egun")
|
||||
new /obj/item/weapon/gun/energy/gun(get_turf(H))
|
||||
if("laser")
|
||||
new /obj/item/weapon/gun/energy/laser(get_turf(H))
|
||||
if("revolver")
|
||||
new /obj/item/weapon/gun/projectile/revolver(get_turf(H))
|
||||
if("detective")
|
||||
new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H))
|
||||
if("smg")
|
||||
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
|
||||
if("nuclear")
|
||||
new /obj/item/weapon/gun/energy/gun/nuclear(get_turf(H))
|
||||
if("deagle")
|
||||
new /obj/item/weapon/gun/projectile/automatic/deagle/camo(get_turf(H))
|
||||
if("gyrojet")
|
||||
new /obj/item/weapon/gun/projectile/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
|
||||
if("silenced")
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H))
|
||||
new /obj/item/weapon/silencer(get_turf(H))
|
||||
if("cannon")
|
||||
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
|
||||
if("doublebarrel")
|
||||
new /obj/item/weapon/gun/projectile/revolver/doublebarrel(get_turf(H))
|
||||
if("shotgun")
|
||||
new /obj/item/weapon/gun/projectile/shotgun/(get_turf(H))
|
||||
if("combatshotgun")
|
||||
new /obj/item/weapon/gun/projectile/shotgun/combat(get_turf(H))
|
||||
if("mateba")
|
||||
new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H))
|
||||
if("smg")
|
||||
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
|
||||
if("uzi")
|
||||
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||
if("crossbow")
|
||||
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
|
||||
if("saw")
|
||||
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
|
||||
else
|
||||
switch (randomizemagic)
|
||||
if("fireball")
|
||||
new /obj/item/weapon/spellbook/oneuse/fireball(get_turf(H))
|
||||
if("smoke")
|
||||
new /obj/item/weapon/spellbook/oneuse/smoke(get_turf(H))
|
||||
if("blind")
|
||||
new /obj/item/weapon/spellbook/oneuse/blind(get_turf(H))
|
||||
if("mindswap")
|
||||
new /obj/item/weapon/spellbook/oneuse/mindswap(get_turf(H))
|
||||
if("forcewall")
|
||||
new /obj/item/weapon/spellbook/oneuse/forcewall(get_turf(H))
|
||||
if("knock")
|
||||
new /obj/item/weapon/spellbook/oneuse/knock(get_turf(H))
|
||||
if("horsemask")
|
||||
new /obj/item/weapon/spellbook/oneuse/horsemask(get_turf(H))
|
||||
if("charge")
|
||||
new /obj/item/weapon/spellbook/oneuse/charge(get_turf(H))
|
||||
if("wandnothing")
|
||||
new /obj/item/weapon/gun/magic/wand(get_turf(H))
|
||||
if("wanddeath")
|
||||
new /obj/item/weapon/gun/magic/wand/death(get_turf(H))
|
||||
if("wandresurrection")
|
||||
new /obj/item/weapon/gun/magic/wand/resurrection(get_turf(H))
|
||||
if("wandpolymorph")
|
||||
new /obj/item/weapon/gun/magic/wand/polymorph(get_turf(H))
|
||||
if("wandteleport")
|
||||
new /obj/item/weapon/gun/magic/wand/teleport(get_turf(H))
|
||||
if("wanddoor")
|
||||
new /obj/item/weapon/gun/magic/wand/door(get_turf(H))
|
||||
if("staffchange")
|
||||
new /obj/item/weapon/gun/magic/staff/change(get_turf(H))
|
||||
if("staffhealing")
|
||||
new /obj/item/weapon/gun/magic/staff/healing(get_turf(H))
|
||||
if("armor")
|
||||
new /obj/item/clothing/suit/space/rig/wizard(get_turf(H))
|
||||
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(H))
|
||||
if("scrying")
|
||||
new /obj/item/weapon/scrying(get_turf(H))
|
||||
if (!(XRAY in H.mutations))
|
||||
H.mutations.Add(XRAY)
|
||||
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
H << "\blue The walls suddenly disappear."
|
||||
|
||||
@@ -19,9 +19,15 @@
|
||||
if(istype(M, /mob/living/carbon/human/dummy))
|
||||
return..()
|
||||
|
||||
if(M.has_brain_worms()) //Borer stuff - RR
|
||||
user << "<span class='warning'>This being is corrupted by an alien intelligence and cannot be soul trapped.</span>"
|
||||
return..()
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
|
||||
|
||||
|
||||
transfer_soul("VICTIM", M, user)
|
||||
return
|
||||
@@ -173,9 +179,8 @@
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
del(T)
|
||||
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
|
||||
Z << "<B>You are a Juggernaut. Though slow, your shell can withstand extreme punishment, create shield walls and even deflect energy weapons, and rip apart enemies and walls alike.</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall(Z)
|
||||
Z.cancel_camera()
|
||||
del(C)
|
||||
|
||||
@@ -189,9 +194,8 @@
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
del(T)
|
||||
Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
|
||||
Z << "<B>You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift(Z)
|
||||
Z.cancel_camera()
|
||||
del(C)
|
||||
|
||||
@@ -205,12 +209,8 @@
|
||||
ticker.mode.cult+=Z.mind
|
||||
ticker.mode.update_cult_icons_added(Z.mind)
|
||||
del(T)
|
||||
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
|
||||
Z << "<B>You are an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, use magic missile, repair allied constructs (by clicking on them), </B><I>and most important of all create new constructs</I><B> (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).</B>"
|
||||
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/wall(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/floor(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone(Z)
|
||||
Z.cancel_camera()
|
||||
del(C)
|
||||
else
|
||||
|
||||
@@ -12,6 +12,19 @@
|
||||
var/max_uses = 5
|
||||
var/op = 1
|
||||
|
||||
/obj/item/weapon/spellbook/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/contract))
|
||||
var/obj/item/weapon/contract/contract = O
|
||||
if(contract.used)
|
||||
user << "The contract has been used, you can't get your points back now."
|
||||
else
|
||||
user << "You feed the contract back into the spellbook, refunding your points."
|
||||
src.max_uses++
|
||||
src.uses++
|
||||
del (O)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
@@ -24,39 +37,89 @@
|
||||
dat += "<HR>"
|
||||
dat += "<B>Memorize which spell:</B><BR>"
|
||||
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=magicmissile'>Magic Missile</A> (10)<BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=magicmissile'>Magic Missile</A> (15)<BR>"
|
||||
dat += "<I>This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=fireball'>Fireball</A> (10)<BR>"
|
||||
//dat += "<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<I>This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<I>This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=disabletech'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<I>This spell disables all weapons, cameras and most other technology in range.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR>"
|
||||
dat += "<I>This spell spawns a cloud of choking smoke at your location and does not require wizard garb.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=blind'>Blind</A> (30)<BR>"
|
||||
dat += "<I>This spell temporarly blinds a single person and does not require wizard garb.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=mindswap'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<I>This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=forcewall'>Forcewall</A> (10)<BR>"
|
||||
dat += "<I>This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=blink'>Blink</A> (2)<BR>"
|
||||
dat += "<I>This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=teleport'>Teleport</A> (60)<BR>"
|
||||
dat += "<I>This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=mutate'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=etherealjaunt'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<I>This spell causes you to turn into a hulk and gain telekinesis for a short while.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=etherealjaunt'>Ethereal Jaunt</A> (30)<BR>"
|
||||
dat += "<I>This spell creates your ethereal form, temporarily making you invisible and able to pass through walls.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=knock'>Knock</A> (10)<BR>"
|
||||
dat += "<I>This spell opens nearby doors and does not require wizard garb.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=horseman'>Curse of the Horseman</A> (15)<BR>"
|
||||
// if(op)
|
||||
// dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
|
||||
dat += "<I>This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require wizard garb.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=fleshtostone'>Flesh to Stone</A> (60)<BR>"
|
||||
dat += "<I>This spell will curse a person to immediately turn into an unmoving statue. The effect will eventually wear off if the statue is not destroyed.</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
|
||||
dat += "<I>Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill eachother. Just be careful not to get hit in the crossfire!</I><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=summonmagic'>Summon Magic</A> (One time use, global spell)<BR>"
|
||||
dat += "<I>Share the wonders of magic with the crew and show them why they aren't to be trusted with it at the same time.</I><BR>"
|
||||
|
||||
dat += "<HR>"
|
||||
dat += "<B>Artefacts:</B><BR>"
|
||||
dat += "Powerful items imbued with eldritch magics. Summoning one will count towards your maximum number of spells.<BR>"
|
||||
dat += "It is recommended that only experienced wizards attempt to wield such artefacts.<BR>"
|
||||
dat += "<HR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=staffchange'>Staff of Change</A><BR>"
|
||||
dat += "<I>An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself.</I><BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=mentalfocus'>Mental Focus</A><BR>"
|
||||
dat += "<HR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=soulstone'>Six Soul Stone Shards and the spell Artificer</A><BR>"
|
||||
dat += "<I>Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot.</I><BR>"
|
||||
dat += "<HR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=armor'>Mastercrafted Armor Set</A><BR>"
|
||||
dat += "<I>An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space.</I><BR>"
|
||||
dat += "<HR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=staffanimation'>Staff of Animation</A><BR>"
|
||||
dat += "<I>An arcane staff capable of shooting bolts of eldritch energy which cause inanimate objects to come to life. This magic doesn't affect machines.</I><BR>"
|
||||
dat += "<HR>"
|
||||
if(op)
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=rememorize'>Re-memorize Spells</A><BR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=contract'>Contract of Apprenticeship</A><BR>"
|
||||
dat += "<I>A magical contract binding an apprentice wizard to your service, using it will summon them to your side.</I><BR>"
|
||||
dat += "<HR>"
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=scrying'>Scrying Orb</A><BR>"
|
||||
dat += "<I>An incandescent orb of crackling energy, using it will allow you to ghost while alive, allowing you to spy upon the station with ease. In addition, buying it will permanently grant you x-ray vision.</I><BR>"
|
||||
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=rememorize'>Re-memorize Spells</A><BR>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
@@ -70,6 +133,10 @@
|
||||
if(!istype(H, /mob/living/carbon/human))
|
||||
return 1
|
||||
|
||||
if(H.mind.special_role == "apprentice")
|
||||
temp = "If you got caught sneaking a peak from your teacher's spellbook, you'd likely be expelled from the Wizard Academy. Better not."
|
||||
return
|
||||
|
||||
if(loc == H || (in_range(src, H) && istype(loc, /turf)))
|
||||
H.set_machine(src)
|
||||
if(href_list["spell_choice"])
|
||||
@@ -86,14 +153,36 @@
|
||||
uses--
|
||||
/*
|
||||
*/
|
||||
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", summonguns = "Summon Guns", staffchange = "Staff of Change", mentalfocus = "Mental Focus", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation")
|
||||
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", fleshtostone = "Flesh to Stone", summonguns = "Summon Guns", summonmagic = "Summon Magic", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation")
|
||||
var/already_knows = 0
|
||||
for(var/obj/effect/proc_holder/spell/aspell in H.spell_list)
|
||||
if(available_spells[href_list["spell_choice"]] == aspell.name)
|
||||
if(available_spells[href_list["spell_choice"]] == initial(aspell.name))
|
||||
already_knows = 1
|
||||
temp = "You already know that spell."
|
||||
uses++
|
||||
break
|
||||
if(aspell.spell_level >= aspell.level_max)
|
||||
temp = "This spell cannot be improved further."
|
||||
uses++
|
||||
break
|
||||
else
|
||||
aspell.name = initial(aspell.name)
|
||||
aspell.spell_level++
|
||||
aspell.charge_max = round(initial(aspell.charge_max) - aspell.spell_level * (initial(aspell.charge_max) - aspell.cooldown_min)/ aspell.level_max)
|
||||
if(aspell.charge_max < aspell.charge_counter)
|
||||
aspell.charge_counter = aspell.charge_max
|
||||
switch(aspell.spell_level)
|
||||
if(1)
|
||||
temp = "You have improved [aspell.name] into Efficient [aspell.name]."
|
||||
aspell.name = "Efficient [aspell.name]"
|
||||
if(2)
|
||||
temp = "You have further improved [aspell.name] into Quickened [aspell.name]."
|
||||
aspell.name = "Quickened [aspell.name]"
|
||||
if(3)
|
||||
temp = "You have further improved [aspell.name] into Free [aspell.name]."
|
||||
aspell.name = "Free [aspell.name]"
|
||||
if(4)
|
||||
temp = "You have further improved [aspell.name] into Instant [aspell.name]."
|
||||
aspell.name = "Instant [aspell.name]"
|
||||
if(aspell.spell_level >= aspell.level_max)
|
||||
temp += " This spell cannot be strengthened any further."
|
||||
/*
|
||||
*/
|
||||
if(!already_knows)
|
||||
@@ -101,79 +190,83 @@
|
||||
if("magicmissile")
|
||||
feedback_add_details("wizard_spell_learned","MM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(H)
|
||||
temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
temp = "You have learned magic missile."
|
||||
if("fireball")
|
||||
feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/dumbfire/fireball(H)
|
||||
temp = "This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
temp = "You have learned fireball."
|
||||
if("disintegrate")
|
||||
feedback_add_details("wizard_spell_learned","DG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate(H)
|
||||
temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
temp = "You have learned disintegrate."
|
||||
if("disabletech")
|
||||
feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech(H)
|
||||
temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
temp = "You have learned disable technology."
|
||||
if("smoke")
|
||||
feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/smoke(H)
|
||||
temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
temp = "You have learned smoke."
|
||||
if("blind")
|
||||
feedback_add_details("wizard_spell_learned","BD") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/trigger/blind(H)
|
||||
temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
temp = "You have learned blind."
|
||||
if("mindswap")
|
||||
feedback_add_details("wizard_spell_learned","MT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/mind_transfer(H)
|
||||
temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
temp = "You have learned mindswap."
|
||||
if("forcewall")
|
||||
feedback_add_details("wizard_spell_learned","FW") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(H)
|
||||
temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
temp = "You have learned forcewall."
|
||||
if("blink")
|
||||
feedback_add_details("wizard_spell_learned","BL") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(H)
|
||||
temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
temp = "You have learned blink."
|
||||
if("teleport")
|
||||
feedback_add_details("wizard_spell_learned","TP") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(H)
|
||||
temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
temp = "You have learned teleport."
|
||||
if("mutate")
|
||||
feedback_add_details("wizard_spell_learned","MU") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/genetic/mutate(H)
|
||||
temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
temp = "You have learned mutate."
|
||||
if("etherealjaunt")
|
||||
feedback_add_details("wizard_spell_learned","EJ") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(H)
|
||||
temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
temp = "You have learned ethereal jaunt."
|
||||
if("knock")
|
||||
feedback_add_details("wizard_spell_learned","KN") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/knock(H)
|
||||
temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
temp = "You have learned knock."
|
||||
if("horseman")
|
||||
feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/horsemask(H)
|
||||
temp = "This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require a wizard garb. Do note the curse will disintegrate the target's current mask if they are wearing one."
|
||||
temp = "You have learned curse of the horseman."
|
||||
if("fleshtostone")
|
||||
feedback_add_details("wizard_spell_learned","FS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/targeted/inflict_handler/flesh_to_stone(H)
|
||||
temp = "You have learned flesh to stone."
|
||||
if("summonguns")
|
||||
feedback_add_details("wizard_spell_learned","SG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.rightandwrong()
|
||||
H.rightandwrong(0)
|
||||
max_uses--
|
||||
temp = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill eachother. Just be careful not to get hit in the crossfire!"
|
||||
temp = "You have cast summon guns."
|
||||
if("summonmagic")
|
||||
feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
H.rightandwrong(1)
|
||||
max_uses--
|
||||
temp = "You have cast summon magic."
|
||||
if("staffchange")
|
||||
feedback_add_details("wizard_spell_learned","ST") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/gun/energy/staff(get_turf(H))
|
||||
temp = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||
max_uses--
|
||||
if("mentalfocus")
|
||||
feedback_add_details("wizard_spell_learned","MF") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/gun/energy/staff/focus(get_turf(H))
|
||||
temp = "An artefact that channels the will of the user into destructive bolts of force."
|
||||
new /obj/item/weapon/gun/magic/staff/change(get_turf(H))
|
||||
temp = "You have purchased a staff of change."
|
||||
max_uses--
|
||||
if("soulstone")
|
||||
feedback_add_details("wizard_spell_learned","SS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/storage/belt/soulstone/full(get_turf(H))
|
||||
H.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct(H)
|
||||
temp = "Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot."
|
||||
temp = "You have purchased a belt full of soulstones and have learned the artificer spell."
|
||||
max_uses--
|
||||
if("armor")
|
||||
feedback_add_details("wizard_spell_learned","HS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
@@ -181,12 +274,28 @@
|
||||
new /obj/item/clothing/gloves/purple(get_turf(H))//To complete the outfit
|
||||
new /obj/item/clothing/suit/space/rig/wizard(get_turf(H))
|
||||
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(H))
|
||||
temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
|
||||
temp = "You have purchased a suit of wizard armor."
|
||||
max_uses--
|
||||
if("staffanimation")
|
||||
feedback_add_details("wizard_spell_learned","SA") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/gun/energy/staff/animate(get_turf(H))
|
||||
temp = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
new /obj/item/weapon/gun/magic/staff/animate(get_turf(H))
|
||||
temp = "You have purchased a staff of animation."
|
||||
max_uses--
|
||||
if("contract")
|
||||
feedback_add_details("wizard_spell_learned","CT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/contract(get_turf(H))
|
||||
temp = "You have purchased a contract of apprenticeship."
|
||||
max_uses--
|
||||
if("scrying")
|
||||
feedback_add_details("wizard_spell_learned","SO") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/weapon/scrying(get_turf(H))
|
||||
if (!(XRAY in H.mutations))
|
||||
H.mutations.Add(XRAY)
|
||||
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
H << "\blue The walls suddenly disappear."
|
||||
temp = "You have purchased a scrying orb, and gained x-ray vision."
|
||||
max_uses--
|
||||
else
|
||||
if(href_list["temp"])
|
||||
@@ -194,3 +303,154 @@
|
||||
attack_self(H)
|
||||
|
||||
return
|
||||
|
||||
//Single Use Spellbooks//
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse
|
||||
var/spell = /obj/effect/proc_holder/spell/targeted/projectile/magic_missile //just a placeholder to avoid runtimes if someone spawned the generic
|
||||
var/spellname = "sandbox"
|
||||
var/used = 0
|
||||
name = "spellbook of "
|
||||
uses = 1
|
||||
max_uses = 1
|
||||
desc = "This template spellbook was never meant for the eyes of man..."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/New()
|
||||
..()
|
||||
name += spellname
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/attack_self(mob/user as mob)
|
||||
var/obj/effect/proc_holder/spell/S = new spell
|
||||
for(var/obj/effect/proc_holder/spell/knownspell in user.spell_list)
|
||||
if(knownspell.type == S.type)
|
||||
if(user.mind)
|
||||
if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard")
|
||||
user <<"<span class='notice'>You're already far more versed in this spell than this flimsy how-to book can provide.</span>"
|
||||
else
|
||||
user <<"<span class='notice'>You've already read this one.</span>"
|
||||
return
|
||||
if(used)
|
||||
recoil(user)
|
||||
else
|
||||
user.spell_list += S
|
||||
user <<"<span class='notice'>you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>"
|
||||
onlearned(user)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user as mob)
|
||||
user.visible_message("<span class='warning'>[src] glows in a black light!</span>")
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/proc/onlearned(mob/user as mob)
|
||||
used = 1
|
||||
user.visible_message("<span class='caution'>[src] glows dark for a second!</span>")
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/attackby()
|
||||
return
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/fireball
|
||||
spell = /obj/effect/proc_holder/spell/dumbfire/fireball
|
||||
spellname = "fireball"
|
||||
icon_state ="bookfireball"
|
||||
desc = "This book feels warm to the touch."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/fireball/recoil(mob/user as mob)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke
|
||||
spell = /obj/effect/proc_holder/spell/targeted/smoke
|
||||
spellname = "smoke"
|
||||
icon_state ="booksmoke"
|
||||
desc = "This book is overflowing with the dank arts."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='caution'>Your stomach rumbles...</span>"
|
||||
if(user.nutrition)
|
||||
user.nutrition -= 200
|
||||
if(user.nutrition <= 0)
|
||||
user.nutrition = 0
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/blind
|
||||
spell = /obj/effect/proc_holder/spell/targeted/trigger/blind
|
||||
spellname = "blind"
|
||||
icon_state ="bookblind"
|
||||
desc = "This book looks blurry, no matter how you look at it."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You go blind!</span>"
|
||||
user.eye_blind = 10
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap
|
||||
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
spellname = "mindswap"
|
||||
icon_state ="bookmindswap"
|
||||
desc = "This book's cover is pristine, though its pages look ragged and torn."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap/onlearned()
|
||||
spellname = pick("fireball","smoke","blind","forcewall","knock","horses","charge")
|
||||
icon_state = "book[spellname]"
|
||||
name = "spellbook of [spellname]" //Note, desc doesn't change by design
|
||||
..()
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You suddenly don't feel like yourself!</span>"
|
||||
wabbajack(user)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/forcewall
|
||||
spell = /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall
|
||||
spellname = "forcewall"
|
||||
icon_state ="bookforcewall"
|
||||
desc = "This book has a dedication to mimes everywhere inside the front cover."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/forcewall/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You suddenly feel very solid!</span>"
|
||||
var/obj/structure/closet/statue/S = new /obj/structure/closet/statue(user.loc, user)
|
||||
S.timer = 30
|
||||
user.drop_item()
|
||||
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/knock
|
||||
spell = /obj/effect/proc_holder/spell/aoe_turf/knock
|
||||
spellname = "knock"
|
||||
icon_state ="bookknock"
|
||||
desc = "This book is hard to hold closed properly."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/knock/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>You're knocked down!</span>"
|
||||
user.Stun(20)
|
||||
user.Weaken(20)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/horsemask
|
||||
spell = /obj/effect/proc_holder/spell/targeted/horsemask
|
||||
spellname = "horses"
|
||||
icon_state ="bookhorses"
|
||||
desc = "This book is more horse than your mind has room for."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/horsemask/recoil(mob/living/carbon/user as mob)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
user <<"<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>"
|
||||
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
|
||||
magichead.canremove = 0 //curses!
|
||||
magichead.flags_inv = null //so you can still see their face
|
||||
magichead.voicechange = 1 //NEEEEIIGHH
|
||||
user.drop_from_inventory(user.wear_mask)
|
||||
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
||||
del(src)
|
||||
else
|
||||
user <<"<span class='notice'>I say thee neigh</span>"
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/charge
|
||||
spell = /obj/effect/proc_holder/spell/targeted/charge
|
||||
spellname = "charging"
|
||||
icon_state ="bookcharge"
|
||||
desc = "This book is made of 100% post-consumer wizard."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/charge/recoil(mob/user as mob)
|
||||
..()
|
||||
user <<"<span class='warning'>[src] suddenly feels very warm!</span>"
|
||||
empulse(src, 1, 1)
|
||||
@@ -1,39 +0,0 @@
|
||||
/obj/item/weapon/veilrender
|
||||
name = "veil render"
|
||||
desc = "A wicked curved blade of alien origin, recovered from the ruins of a vast city."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
item_state = "render"
|
||||
flags = FPRINT | TABLEPASS
|
||||
force = 15
|
||||
throwforce = 10
|
||||
w_class = 3
|
||||
var/charged = 1
|
||||
|
||||
|
||||
/obj/effect/rend
|
||||
name = "Tear in the fabric of reality"
|
||||
desc = "You should run now"
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "rift"
|
||||
density = 1
|
||||
unacidable = 1
|
||||
anchored = 1.0
|
||||
|
||||
|
||||
/obj/effect/rend/New()
|
||||
spawn(50)
|
||||
new /obj/machinery/singularity/narsie/wizard(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/veilrender/attack_self(mob/user as mob)
|
||||
if(charged == 1)
|
||||
new /obj/effect/rend(get_turf(usr))
|
||||
charged = 0
|
||||
visible_message("\red <B>[src] hums with power as [usr] deals a blow to reality itself!</B>")
|
||||
else
|
||||
user << "\red The unearthly energies that powered the blade are now dormant"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/wizards = list()
|
||||
|
||||
@@ -18,7 +17,6 @@
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
|
||||
/datum/game_mode/wizard/announce()
|
||||
world << "<B>The current game mode is - Wizard!</B>"
|
||||
world << "<B>There is a \red SPACE WIZARD\black on the station. You can't let him achieve his objective!</B>"
|
||||
@@ -31,6 +29,7 @@
|
||||
if(possible_wizards.len==0)
|
||||
return 0
|
||||
var/datum/mind/wizard = pick(possible_wizards)
|
||||
|
||||
wizards += wizard
|
||||
modePlayer += wizard
|
||||
wizard.assigned_role = "MODE" //So they aren't chosen for other jobs.
|
||||
@@ -41,15 +40,16 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/wizard/pre_setup()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
wizard.current.loc = pick(wizardstart)
|
||||
for(var/datum/mind/wiz in wizards)
|
||||
wiz.current.loc = pick(wizardstart)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/wizard/post_setup()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
log_game("[wizard.key] (ckey) has been selected as a Wizard")
|
||||
forge_wizard_objectives(wizard)
|
||||
//learn_basic_spells(wizard.current)
|
||||
equip_wizard(wizard.current)
|
||||
@@ -86,7 +86,7 @@
|
||||
escape_objective.owner = wizard
|
||||
wizard.objectives += escape_objective
|
||||
|
||||
if(61 to 100)
|
||||
if(61 to 85)
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = wizard
|
||||
kill_objective.find_target()
|
||||
@@ -169,8 +169,7 @@
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head)
|
||||
if(wizard_mob.backbag == 2) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(wizard_mob), slot_back)
|
||||
if(wizard_mob.backbag == 3) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(wizard_mob), slot_back)
|
||||
if(wizard_mob.backbag == 4) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(wizard_mob), slot_back)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box(wizard_mob), slot_in_backpack)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(wizard_mob), slot_in_backpack)
|
||||
// wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/scrying_gem(wizard_mob), slot_l_store) For scrying gem.
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/spellbook(wizard_mob), slot_r_hand)
|
||||
@@ -188,6 +187,7 @@
|
||||
return ..()
|
||||
|
||||
var/wizards_alive = 0
|
||||
var/traitors_alive = 0
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
if(!istype(wizard.current,/mob/living/carbon))
|
||||
continue
|
||||
@@ -195,7 +195,15 @@
|
||||
continue
|
||||
wizards_alive++
|
||||
|
||||
if (wizards_alive)
|
||||
if(!wizards_alive)
|
||||
for(var/datum/mind/traitor in traitors)
|
||||
if(!istype(traitor.current,/mob/living/carbon))
|
||||
continue
|
||||
if(traitor.current.stat==2)
|
||||
continue
|
||||
traitors_alive++
|
||||
|
||||
if (wizards_alive || traitors_alive)
|
||||
return ..()
|
||||
else
|
||||
finished = 1
|
||||
@@ -213,18 +221,18 @@
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_wizard()
|
||||
if(wizards.len)
|
||||
var/text = "<FONT size = 2><B>The wizards/witches were:</B></FONT>"
|
||||
var/text = "<br><font size=3><b>the wizards/witches were:</b></font>"
|
||||
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
|
||||
text += "<br>[wizard.key] was [wizard.name] ("
|
||||
text += "<br><b>[wizard.key]</b> was <b>[wizard.name]</b> ("
|
||||
if(wizard.current)
|
||||
if(wizard.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(wizard.current.real_name != wizard.name)
|
||||
text += " as [wizard.current.real_name]"
|
||||
text += " as <b>[wizard.current.real_name]</b>"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
@@ -247,6 +255,15 @@
|
||||
else
|
||||
text += "<br><font color='red'><B>The wizard has failed!</B></font>"
|
||||
feedback_add_details("wizard_success","FAIL")
|
||||
if(wizard.current && wizard.current.spell_list)
|
||||
text += "<br><B>[wizard.name] used the following spells: </B>"
|
||||
var/i = 1
|
||||
for(var/obj/effect/proc_holder/spell/S in wizard.current.spell_list)
|
||||
text += "[S.name]"
|
||||
if(wizard.current.spell_list.len > i)
|
||||
text += ", "
|
||||
i++
|
||||
text += "<br>"
|
||||
|
||||
world << text
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/xenos = list()
|
||||
|
||||
|
||||
/datum/game_mode/xenos
|
||||
name = "xenos"
|
||||
config_tag = "xenos"
|
||||
required_players = 15
|
||||
recommended_players = 20
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
recommended_enemies = 5
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/list/raid_objectives = list() //Raid objectives.
|
||||
|
||||
/datum/game_mode/xenos/announce()
|
||||
world << "<B>The current game mode is - Xenos!</B>"
|
||||
world << "<B>There is a \red Xenos Attack\black on the station. You can't let them take over!</B>"
|
||||
|
||||
/datum/game_mode/xenos/can_start()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/list/candidates = get_players_for_role(BE_ALIEN)
|
||||
var/playersready = 0
|
||||
var/xenos_num
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player.client)&&(player.ready))
|
||||
playersready += 1
|
||||
|
||||
|
||||
//Check that we have enough alien candidates
|
||||
if(candidates.len < required_enemies)
|
||||
return 0
|
||||
if (playersready < recommended_players)
|
||||
xenos_num = required_enemies
|
||||
if (playersready >= recommended_players)
|
||||
xenos_num = recommended_enemies
|
||||
|
||||
//Grab candidates randomly until we have enough.
|
||||
while(xenos_num > 0)
|
||||
var/datum/mind/new_xenos = pick(candidates)
|
||||
xenos += new_xenos
|
||||
candidates -= new_xenos
|
||||
xenos_num--
|
||||
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
xeno.assigned_role = "MODE"
|
||||
xeno.special_role = "Alien"
|
||||
return 1
|
||||
|
||||
/datum/game_mode/xenos/pre_setup()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/xenos/post_setup()
|
||||
|
||||
var/list/turf/xenos_spawn = list()
|
||||
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
if(A.name == "Xenos-Spawn")
|
||||
xenos_spawn += get_turf(A)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
var/xenoai_selected = 0
|
||||
var/xenoborg_selected=0
|
||||
var/xenoqueen_selected=0
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
xeno_mind.current.loc = xenos_spawn[spawnpos]
|
||||
//XenoAI selection
|
||||
if(!xenoai_selected)
|
||||
var/mob/living/silicon/ai/O = new(xeno_mind.current.loc, base_law_type,,1)//No MMI but safety is in effect.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
O.mind.original = O
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name == "XenoAI")
|
||||
loc_landmark = sloc
|
||||
O.loc = loc_landmark.loc
|
||||
O.icon_state = "ai-alien"
|
||||
O.verbs.Remove(/mob/living/silicon/ai/verb/pick_icon)
|
||||
O.laws = new /datum/ai_laws/alienmov
|
||||
O.name = "Alien AI"
|
||||
xenoai_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xeno_mind.current.loc)
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
xenoqueen_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoBorg Selection
|
||||
if(!xenoborg_selected)
|
||||
var/mob/living/silicon/robot/O = new(xeno_mind.current.loc,0,0,1)
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.alien = 1
|
||||
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
|
||||
O.cell = new(O)
|
||||
O.cell.maxcharge = 15000
|
||||
O.cell.charge = 15000
|
||||
O.gender = xeno_mind.current.gender
|
||||
O.invisibility = 0
|
||||
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
O.job = "Alien Cyborg"
|
||||
O.name = "Alien Cyborg"
|
||||
|
||||
xenoborg_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xeno_mind.current.loc)
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
spawnpos++
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
return ..()
|
||||
@@ -128,7 +128,7 @@
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/melee/baton/ntcane(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/melee/baton/loaded/ntcane(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo/fluff/nt_rep(H.back), slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
|
||||
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
density = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
|
||||
/obj/machinery/sleep_console/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -72,10 +77,11 @@
|
||||
if(occupant.reagents)
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "[connected.available_chemicals[chemical]]: [occupant.reagents.get_reagent_amount(chemical)] units<br>"
|
||||
dat += "<HR><A href='?src=\ref[src];refresh=1'>Refresh meter readings each second</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];refresh=1'>Refresh Meter Readings</A><BR>"
|
||||
if(src.connected.beaker)
|
||||
dat += "<HR><A href='?src=\ref[src];removebeaker=1'>Remove Beaker</A><BR>"
|
||||
if(src.connected.filtering)
|
||||
dat += "<HR><A href='?src=\ref[src];togglefilter=1'>Stop Dialysis</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];togglefilter=1'>Stop Dialysis</A><BR>"
|
||||
dat += text("Output Beaker has [] units of free space remaining<BR><HR>", src.connected.beaker.reagents.maximum_volume - src.connected.beaker.reagents.total_volume)
|
||||
else
|
||||
dat += "<HR><A href='?src=\ref[src];togglefilter=1'>Start Dialysis</A><BR>"
|
||||
@@ -85,8 +91,8 @@
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "Inject [connected.available_chemicals[chemical]]: "
|
||||
for(var/amount in connected.amounts)
|
||||
dat += "<a href ='?src=\ref[src];chemical=[chemical];amount=[amount]'>[amount] units</a> "
|
||||
dat += "<br>"
|
||||
dat += "<a href ='?src=\ref[src];chemical=[chemical];amount=[amount]'>[amount] units</a><br> "
|
||||
dat += "<HR><A href='?src=\ref[src];ejectify=1'>Eject Patient</A>"
|
||||
else
|
||||
dat += "The sleeper is empty."
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=sleeper'>Close</A>", user)
|
||||
@@ -108,19 +114,21 @@
|
||||
src.connected.inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"]))
|
||||
else
|
||||
usr << "\red \b This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!"
|
||||
src.updateUsrDialog()
|
||||
if (href_list["refresh"])
|
||||
src.updateUsrDialog()
|
||||
if (href_list["removebeaker"])
|
||||
src.connected.remove_beaker()
|
||||
src.updateUsrDialog()
|
||||
if (href_list["togglefilter"])
|
||||
src.connected.toggle_filter()
|
||||
src.updateUsrDialog()
|
||||
if (href_list["ejectify"])
|
||||
src.connected.eject()
|
||||
src.updateUsrDialog()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/sleep_console/power_change()
|
||||
return
|
||||
@@ -144,7 +152,7 @@
|
||||
anchored = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "dermaline" = "Dermaline", "bicaridine" = "Bicaridine", "dexalin" = "Dexalin")
|
||||
var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/amounts = list(10, 20)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
@@ -192,6 +200,7 @@
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
|
||||
@@ -249,6 +249,9 @@
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)<BR><HR>")
|
||||
|
||||
if(occupant.has_brain_worms())
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<BR/>"
|
||||
|
||||
if(occupant.vessel)
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
@@ -278,6 +281,7 @@
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/robot = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/splint = ""
|
||||
@@ -294,6 +298,8 @@
|
||||
bled = "Bleeding:"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]:"
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
robot = "Prosthetic:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
if(e.implants.len)
|
||||
@@ -301,16 +307,25 @@
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!(e.status & ORGAN_DESTROYED))
|
||||
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/organ_name in occupant.internal_organs)
|
||||
var/datum/organ/internal/i = occupant.internal_organs[organ_name]
|
||||
var/mech = ""
|
||||
if(i.robotic == 1)
|
||||
mech = "Assisted:"
|
||||
if(i.robotic == 2)
|
||||
mech = "Mechanical:"
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>None:</td>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>None:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
if(occupant.sdisabilities & BLIND)
|
||||
dat += text("<font color='red'>Cataracts detected.</font><BR>")
|
||||
if(occupant.sdisabilities & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
else
|
||||
dat += "\The [src] is empty."
|
||||
else
|
||||
|
||||
+76
-364
@@ -96,7 +96,8 @@
|
||||
var/screen = AALARM_SCREEN_MAIN
|
||||
var/area_uid
|
||||
var/area/alarm_area
|
||||
var/danger_level = 0
|
||||
var/local_danger_level = 0
|
||||
var/alarmActivated = 0 // Manually activated (independent from danger level)
|
||||
var/danger_averted_confidence=0
|
||||
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
|
||||
|
||||
@@ -226,10 +227,8 @@
|
||||
target_temperature = T0C + MIN_TEMPERATURE
|
||||
|
||||
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
|
||||
var/heat_capacity = 0
|
||||
if(gas)
|
||||
heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
|
||||
//Use power. Assuming that each power unit represents 1000 watts....
|
||||
use_power(energy_used/1000, ENVIRON)
|
||||
@@ -247,15 +246,15 @@
|
||||
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
|
||||
"You hear a click as a faint electronic humming stops.")
|
||||
|
||||
var/old_level = danger_level
|
||||
danger_level = overall_danger_level()
|
||||
if(danger_level < old_level)
|
||||
var/old_level = local_danger_level
|
||||
var/new_danger = calculate_local_danger_level()
|
||||
if(new_danger < old_level)
|
||||
danger_averted_confidence++
|
||||
// Only change danger level if:
|
||||
// we're going up a level
|
||||
// OR if we're going down a level and have sufficient confidence (prevents doors smashing open and closed).
|
||||
if (old_level < danger_level || (danger_averted_confidence >= 5 && danger_level < old_level))
|
||||
refresh_danger_level()
|
||||
// OR if we're going down a level and have sufficient confidence (prevents spamming update_icon).
|
||||
if (old_level < new_danger || (danger_averted_confidence >= 5 && new_danger < old_level))
|
||||
setDangerLevel(new_danger)
|
||||
update_icon()
|
||||
danger_averted_confidence=0 // Reset counter.
|
||||
|
||||
@@ -269,7 +268,7 @@
|
||||
if(RCON_NO)
|
||||
remote_control = 0
|
||||
if(RCON_AUTO)
|
||||
if(danger_level == 2)
|
||||
if(local_danger_level == 2)
|
||||
remote_control = 1
|
||||
else
|
||||
remote_control = 0
|
||||
@@ -279,7 +278,7 @@
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/alarm/proc/overall_danger_level()
|
||||
/obj/machinery/alarm/proc/calculate_local_danger_level()
|
||||
var/turf/simulated/location = loc
|
||||
if(!istype(location)) return//returns if loc is not simulated
|
||||
|
||||
@@ -335,7 +334,8 @@
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
icon_state = "alarmp"
|
||||
return
|
||||
switch(max(danger_level, alarm_area.atmosalm))
|
||||
|
||||
switch(max(local_danger_level, alarm_area.atmosalm-1))
|
||||
if (0)
|
||||
icon_state = "alarm0"
|
||||
if (1)
|
||||
@@ -344,7 +344,7 @@
|
||||
icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/alarm/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(stat & (NOPOWER|BROKEN) || !alarm_area)
|
||||
return
|
||||
if (alarm_area.master_air_alarm != src)
|
||||
if (master_is_operating())
|
||||
@@ -457,23 +457,14 @@
|
||||
for(var/device_id in alarm_area.air_vent_names)
|
||||
send_signal(device_id, list("power"= 0) )
|
||||
|
||||
/obj/machinery/alarm/proc/apply_danger_level(var/new_danger_level)
|
||||
if (alarm_area.atmosalert(new_danger_level))
|
||||
// This sets our danger level, and, if it's changed, forces a new election of danger levels.
|
||||
/obj/machinery/alarm/proc/setDangerLevel(var/new_danger_level)
|
||||
if(local_danger_level==new_danger_level)
|
||||
return
|
||||
local_danger_level=new_danger_level
|
||||
if(alarm_area.updateDangerLevel())
|
||||
post_alert(new_danger_level)
|
||||
|
||||
if(danger_level > 1)
|
||||
air_doors_close(0)
|
||||
else
|
||||
air_doors_open(0)
|
||||
|
||||
update_icon()
|
||||
|
||||
for (var/area/A in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
|
||||
AA.danger_level=new_danger_level
|
||||
AA.update_icon()
|
||||
|
||||
/obj/machinery/alarm/proc/post_alert(alert_level)
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(alarm_frequency)
|
||||
if(!frequency)
|
||||
@@ -494,15 +485,6 @@
|
||||
|
||||
frequency.post_signal(src, alert_signal)
|
||||
|
||||
/obj/machinery/alarm/proc/refresh_danger_level()
|
||||
var/level = 0
|
||||
for (var/area/A in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
if (AA.danger_level > level)
|
||||
level = AA.danger_level
|
||||
apply_danger_level(level)
|
||||
|
||||
/obj/machinery/alarm/proc/air_doors_close(manual)
|
||||
var/area/A = get_area(src)
|
||||
if(!A.master.air_doors_activated)
|
||||
@@ -601,9 +583,8 @@
|
||||
apply_mode()
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
|
||||
if (alarm_area.atmosalert(2))
|
||||
apply_danger_level(2)
|
||||
alarmActivated=1
|
||||
alarm_area.updateDangerLevel()
|
||||
spawn(1)
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
@@ -665,8 +646,8 @@
|
||||
apply_mode()
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
if (alarm_area.atmosalert(0))
|
||||
apply_danger_level(0)
|
||||
alarmActivated=0
|
||||
alarm_area.updateDangerLevel()
|
||||
spawn(1)
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
@@ -767,10 +748,11 @@
|
||||
data["danger"]=danger
|
||||
return data
|
||||
|
||||
|
||||
/obj/machinery/alarm/proc/get_nano_data(mob/user, fromAtmosConsole=0)
|
||||
|
||||
var/data[0]
|
||||
data["air"]=ui_air_status()
|
||||
data["alarmActivated"]=alarmActivated || local_danger_level==2
|
||||
data["sensors"]=TLV
|
||||
data["locked"]=fromAtmosConsole || (!(istype(user, /mob/living/silicon)) && locked)
|
||||
data["rcon"]=rcon_setting
|
||||
@@ -818,11 +800,13 @@
|
||||
data["scrubbers"]=scrubbers
|
||||
return data
|
||||
|
||||
|
||||
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(user.stat && !isobserver(user))
|
||||
return
|
||||
|
||||
var/list/data=src.get_nano_data(user,FALSE)
|
||||
|
||||
if (!ui) // no ui has been passed, so we'll search for one
|
||||
{
|
||||
ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
@@ -888,288 +872,6 @@
|
||||
ui_interact(user)
|
||||
|
||||
return
|
||||
/*
|
||||
/obj/machinery/alarm/proc/return_text(mob/user)
|
||||
if(!(istype(user, /mob/living/silicon)) && locked)
|
||||
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
||||
else
|
||||
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
|
||||
|
||||
/obj/machinery/alarm/proc/return_status()
|
||||
var/turf/location = get_turf(src)
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
var/total = environment.oxygen + environment.carbon_dioxide + environment.toxins + environment.nitrogen
|
||||
var/output = "<b>Air Status:</b><br>"
|
||||
|
||||
if(total == 0)
|
||||
output += "<font color='red'><b>Warning: Cannot obtain air sample for analysis.</b></font>"
|
||||
return output
|
||||
|
||||
output += {"
|
||||
<style>
|
||||
.dl0 { color: green; }
|
||||
.dl1 { color: orange; }
|
||||
.dl2 { color: red; font-weght: bold;}
|
||||
.scrub1 { color: red; font-weight:bold; }
|
||||
.scrub0 { color: green; }
|
||||
</style>
|
||||
"}
|
||||
|
||||
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
|
||||
|
||||
var/list/current_settings = TLV["pressure"]
|
||||
var/environment_pressure = environment.return_pressure()
|
||||
var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
|
||||
|
||||
current_settings = TLV["oxygen"]
|
||||
var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, current_settings)
|
||||
var/oxygen_percent = round(environment.oxygen / total * 100, 2)
|
||||
|
||||
current_settings = TLV["carbon_dioxide"]
|
||||
var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, current_settings)
|
||||
var/co2_percent = round(environment.carbon_dioxide / total * 100, 2)
|
||||
|
||||
current_settings = TLV["plasma"]
|
||||
var/plasma_dangerlevel = get_danger_level(environment.toxins*partial_pressure, current_settings)
|
||||
var/plasma_percent = round(environment.toxins / total * 100, 2)
|
||||
|
||||
current_settings = TLV["other"]
|
||||
var/other_moles = 0.0
|
||||
for(var/datum/gas/G in environment.trace_gases)
|
||||
other_moles+=G.moles
|
||||
var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
|
||||
|
||||
current_settings = TLV["temperature"]
|
||||
var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
|
||||
|
||||
output += {"
|
||||
Pressure: <span class='dl[pressure_dangerlevel]'>[environment_pressure]</span>kPa<br>
|
||||
Oxygen: <span class='dl[oxygen_dangerlevel]'>[oxygen_percent]</span>%<br>
|
||||
Carbon dioxide: <span class='dl[co2_dangerlevel]'>[co2_percent]</span>%<br>
|
||||
Toxins: <span class='dl[plasma_dangerlevel]'>[plasma_percent]</span>%<br>
|
||||
"}
|
||||
if (other_dangerlevel==2)
|
||||
output += "Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"
|
||||
else if (other_dangerlevel==1)
|
||||
output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
|
||||
|
||||
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K ([round(environment.temperature - T0C, 0.1)]C)<br>"
|
||||
|
||||
//Overall status
|
||||
output += "Local Status: "
|
||||
switch(max(pressure_dangerlevel,oxygen_dangerlevel,co2_dangerlevel,plasma_dangerlevel,other_dangerlevel,temperature_dangerlevel))
|
||||
if(2)
|
||||
output += "<span class='dl2'>DANGER: Internals Required</span>"
|
||||
if(1)
|
||||
output += "<span class='dl1'>Caution</span>"
|
||||
if(0)
|
||||
if(alarm_area.atmosalm)
|
||||
output += {"<span class='dl1'>Caution: Atmos alert in area</span>"}
|
||||
else
|
||||
output += {"<span class='dl0'>Optimal</span>"}
|
||||
|
||||
return output
|
||||
|
||||
/obj/machinery/alarm/proc/rcon_text()
|
||||
var/dat = "<table width=\"100%\"><td align=\"center\"><b>Remote Control:</b><br>"
|
||||
if(rcon_setting == RCON_NO)
|
||||
dat += "<b>Off</b>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
|
||||
dat += " | "
|
||||
if(rcon_setting == RCON_AUTO)
|
||||
dat += "<b>Auto</b>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
|
||||
dat += " | "
|
||||
if(rcon_setting == RCON_YES)
|
||||
dat += "<b>On</b>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a></td>"
|
||||
|
||||
//Hackish, I know. I didn't feel like bothering to rework all of this.
|
||||
dat += "<td align=\"center\"><b>Thermostat:</b><br><a href='?src=\ref[src];temperature=1'>[target_temperature - T0C]C</a></td></table>"
|
||||
|
||||
return dat
|
||||
|
||||
/obj/machinery/alarm/proc/fmtScrubberGasStatus(var/id_tag,var/code,var/list/data)
|
||||
var/label=replacetext(uppertext(code),"2","<sub>2</sub>")
|
||||
if(code=="tox")
|
||||
label="Plasma"
|
||||
return "<A href='?src=\ref[src];id_tag=[id_tag];command=[code]_scrub;val=[!data["filter_"+code]]' class='scrub[data["filter_"+code]]'>[label]</A>"
|
||||
|
||||
/obj/machinery/alarm/proc/return_controls()
|
||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
||||
|
||||
switch(screen)
|
||||
if (AALARM_SCREEN_MAIN)
|
||||
if(alarm_area.atmosalm)
|
||||
output += "<a href='?src=\ref[src];atmos_reset=1'>Reset - Atmospheric Alarm</a><hr>"
|
||||
else
|
||||
output += "<a href='?src=\ref[src];atmos_alarm=1'>Activate - Atmospheric Alarm</a><hr>"
|
||||
|
||||
output += {"
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
|
||||
<HR>
|
||||
"}
|
||||
if (mode==AALARM_MODE_PANIC)
|
||||
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
|
||||
else
|
||||
output += "<A href='?src=\ref[src];mode=[AALARM_MODE_PANIC]'><font color='red'>ACTIVATE PANIC SYPHON IN AREA</font></A>"
|
||||
|
||||
|
||||
if (AALARM_SCREEN_VENT)
|
||||
var/sensor_data = ""
|
||||
if(alarm_area.air_vent_names.len)
|
||||
for(var/id_tag in alarm_area.air_vent_names)
|
||||
var/long_name = alarm_area.air_vent_names[id_tag]
|
||||
var/list/data = alarm_area.air_vent_info[id_tag]
|
||||
if(!data)
|
||||
continue;
|
||||
var/state = ""
|
||||
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
||||
<BR>
|
||||
<B>Pressure checks:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
||||
<BR>
|
||||
<B>External pressure bound:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
||||
[data["external"]]
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
|
||||
<BR>
|
||||
"}
|
||||
if (data["direction"] == "siphon")
|
||||
sensor_data += {"
|
||||
<B>Direction:</B>
|
||||
siphoning
|
||||
<BR>
|
||||
"}
|
||||
sensor_data += {"<HR>"}
|
||||
else
|
||||
sensor_data = "No vents connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
if (AALARM_SCREEN_SCRUB)
|
||||
var/sensor_data = ""
|
||||
if(alarm_area.air_scrub_names.len)
|
||||
for(var/id_tag in alarm_area.air_scrub_names)
|
||||
var/long_name = alarm_area.air_scrub_names[id_tag]
|
||||
var/list/data = alarm_area.air_scrub_info[id_tag]
|
||||
if(!data)
|
||||
continue;
|
||||
var/state = ""
|
||||
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
||||
<B>Type:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
||||
"}
|
||||
|
||||
if(data["scrubbing"])
|
||||
sensor_data += {"
|
||||
<B>Filtering:</B>
|
||||
[fmtScrubberGasStatus(id_tag,"co2",data)],
|
||||
[fmtScrubberGasStatus(id_tag,"tox",data)],
|
||||
[fmtScrubberGasStatus(id_tag,"n2o",data)],
|
||||
[fmtScrubberGasStatus(id_tag,"o2",data)]
|
||||
<BR>
|
||||
"}
|
||||
sensor_data += {"
|
||||
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
||||
<HR>
|
||||
"}
|
||||
else
|
||||
sensor_data = "No scrubbers connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
|
||||
if (AALARM_SCREEN_MODE)
|
||||
output += "<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br><b>Air machinery mode for the area:</b><ul>"
|
||||
var/list/modes = list(
|
||||
AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
|
||||
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
|
||||
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
|
||||
AALARM_MODE_CYCLE = "<font color='red'>Cycle - Siphons air before replacing</font>",\
|
||||
AALARM_MODE_FILL = "<font color='green'>Fill - Shuts off scrubbers and opens vents</font>",\
|
||||
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
|
||||
for (var/m=1,m<=modes.len,m++)
|
||||
if (mode==m)
|
||||
output += "<li><A href='?src=\ref[src];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"
|
||||
else
|
||||
output += "<li><A href='?src=\ref[src];mode=[m]'>[modes[m]]</A></li>"
|
||||
output += {"</ul>
|
||||
<hr><br><b>Sensor presets:</b><br><i>(Note, this only sets sensors, air supplied to vents must still be changed.)</i><ul>"}
|
||||
var/list/presets = list(
|
||||
AALARM_PRESET_HUMAN = "Human - Checks for Oxygen and Nitrogen",\
|
||||
AALARM_PRESET_VOX = "Vox - Checks for Nitrogen only",\
|
||||
AALARM_PRESET_SERVER = "Coldroom - For server rooms and freezers")
|
||||
for(var/p=1;p<=presets.len;p++)
|
||||
if (preset==p)
|
||||
output += "<li><A href='?src=\ref[src];preset=[p]'><b>[presets[p]]</b></A> (selected)</li>"
|
||||
else
|
||||
output += "<li><A href='?src=\ref[src];preset=[p]'>[presets[p]]</A></li>"
|
||||
output += "</ul>"
|
||||
|
||||
if (AALARM_SCREEN_SENSORS)
|
||||
output += {"
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
||||
<b>Alarm thresholds:</b><br>
|
||||
Partial pressure for gases
|
||||
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
|
||||
table td { border-left: 1px solid black; border-top: 1px solid black;}
|
||||
table tr:first-child th { border-left: 1px solid black;}
|
||||
table th:first-child { border-top: 1px solid black; font-weight: normal;}
|
||||
table tr:first-child th:first-child { border: none;}
|
||||
.dl0 { color: green; }
|
||||
.dl1 { color: orange; }
|
||||
.dl2 { color: red; font-weght: bold;}
|
||||
</style><table cellspacing=0>
|
||||
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
|
||||
"}
|
||||
var/list/gases = list(
|
||||
"oxygen" = "O<sub>2</sub>",
|
||||
"carbon_dioxide" = "CO<sub>2</sub>",
|
||||
"plasma" = "Toxin",
|
||||
"other" = "Other",)
|
||||
|
||||
var/list/selected
|
||||
for (var/g in gases)
|
||||
output += "<TR><th>[gases[g]]</th>"
|
||||
selected = TLV[g]
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=[g];var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
selected = TLV["pressure"]
|
||||
output += " <TR><th>Pressure</th>"
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=pressure;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
selected = TLV["temperature"]
|
||||
output += "<TR><th>Temperature</th>"
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=temperature;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR></table>"
|
||||
|
||||
return output
|
||||
*/
|
||||
|
||||
/obj/machinery/alarm/Topic(href, href_list)
|
||||
var/changed=0
|
||||
@@ -1225,8 +927,8 @@ table tr:first-child th:first-child { border: none;}
|
||||
var/threshold = text2num(href_list["var"])
|
||||
var/list/selected = TLV[env]
|
||||
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
|
||||
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
|
||||
if (isnull(newval) || ..() || (locked && issilicon(usr)))
|
||||
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as num|null
|
||||
if (isnull(newval) || ..() || (locked && !issilicon(usr)))
|
||||
return
|
||||
if (newval<0)
|
||||
selected[threshold] = -1.0
|
||||
@@ -1287,14 +989,14 @@ table tr:first-child th:first-child { border: none;}
|
||||
*/
|
||||
|
||||
if(href_list["atmos_alarm"])
|
||||
if (alarm_area.atmosalert(2))
|
||||
apply_danger_level(2)
|
||||
alarmActivated=1
|
||||
alarm_area.updateDangerLevel()
|
||||
update_icon()
|
||||
changed=1
|
||||
|
||||
if(href_list["atmos_reset"])
|
||||
if (alarm_area.atmosalert(0))
|
||||
apply_danger_level(0)
|
||||
alarmActivated=0
|
||||
alarm_area.updateDangerLevel()
|
||||
update_icon()
|
||||
changed=1
|
||||
|
||||
@@ -1446,6 +1148,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
usr << "It is not wired."
|
||||
if (buildstage < 1)
|
||||
usr << "The circuit is missing."
|
||||
|
||||
/*
|
||||
AIR ALARM CIRCUIT
|
||||
Just a object used in constructing air alarms
|
||||
@@ -1525,8 +1228,6 @@ FIRE ALARM
|
||||
var/wiresexposed = 0
|
||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
||||
|
||||
var/area/A
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
|
||||
if(wiresexposed)
|
||||
@@ -1656,38 +1357,49 @@ FIRE ALARM
|
||||
stat |= NOPOWER
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/firealarm/New()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/firealarm/attack_hand(var/mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
/obj/machinery/firealarm/attack_hand(mob/user as mob)
|
||||
if((user.stat && !isobserver(user)) || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
if (buildstage != 2)
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/ui_interact(mob/user, ui_key = "fire_alarm")
|
||||
A = src.loc.loc
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(user.stat || user.restrained()) return
|
||||
var/data[0]
|
||||
data["working"] = working
|
||||
data["time"] = round(time)
|
||||
data["timing"] = timing
|
||||
data["securityLevel"] = uppertext(get_security_level())
|
||||
data["fire"] = A.fire
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "firealarm.tmpl", "Fire Alarm", 375, 250)
|
||||
ui.set_initial_data(data)
|
||||
ui.set_auto_update(1)
|
||||
ui.open()
|
||||
user.set_machine(src)
|
||||
var/area/A = src.loc
|
||||
var/d1
|
||||
var/d2
|
||||
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
|
||||
A = A.loc
|
||||
|
||||
if (A.fire)
|
||||
d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src)
|
||||
else
|
||||
d1 = text("<A href='?src=\ref[];alarm=1'>Alarm - Lockdown</A>", src)
|
||||
if (src.timing)
|
||||
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Lock</A>", src)
|
||||
else
|
||||
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Lock</A>", src)
|
||||
var/second = round(src.time) % 60
|
||||
var/minute = (round(src.time) - second) / 60
|
||||
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>Fire alarm</B> [d1]\n<HR>The current alert level is: [get_security_level()]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? "[minute]:" : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
||||
user << browse(dat, "window=firealarm")
|
||||
onclose(user, "firealarm")
|
||||
else
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
|
||||
A = A.loc
|
||||
if (A.fire)
|
||||
d1 = text("<A href='?src=\ref[];reset=1'>[]</A>", src, stars("Reset - Lockdown"))
|
||||
else
|
||||
d1 = text("<A href='?src=\ref[];alarm=1'>[]</A>", src, stars("Alarm - Lockdown"))
|
||||
if (src.timing)
|
||||
d2 = text("<A href='?src=\ref[];time=0'>[]</A>", src, stars("Stop Time Lock"))
|
||||
else
|
||||
d2 = text("<A href='?src=\ref[];time=1'>[]</A>", src, stars("Initiate Time Lock"))
|
||||
var/second = round(src.time) % 60
|
||||
var/minute = (round(src.time) - second) / 60
|
||||
var/dat = "<HTML><HEAD></HEAD><BODY><TT><B>[stars("Fire alarm")]</B> [d1]\n<HR><b>The current alert level is: [stars(get_security_level())]</b><br><br>\nTimer System: [d2]<BR>\nTime Left: [(minute ? text("[]:", minute) : null)][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>\n</TT></BODY></HTML>"
|
||||
user << browse(dat, "window=firealarm")
|
||||
onclose(user, "firealarm")
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/Topic(href, href_list)
|
||||
..()
|
||||
@@ -1844,7 +1556,7 @@ Code shamelessly copied from apc_frame
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/partyalarm/attack_hand(mob/user as mob)
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
if((user.stat && !isobserver(user)) || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
|
||||
@@ -74,7 +74,7 @@ obj/machinery/air_sensor
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/computer/general_air_control
|
||||
/obj/machinery/computer/general_air_control
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "tank"
|
||||
|
||||
@@ -89,13 +89,18 @@ obj/machinery/computer/general_air_control
|
||||
attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
user << browse(return_text(),"window=computer")
|
||||
var/html=return_text()+"</body></html>"
|
||||
testing("Remember to remove [__FILE__]:[__LINE__]!")
|
||||
var/f = file("data/gac_debug.html")
|
||||
fdel(f)
|
||||
f << html
|
||||
user << browse(html,"window=gac")
|
||||
user.set_machine(src)
|
||||
onclose(user, "computer")
|
||||
onclose(user, "gac")
|
||||
|
||||
process()
|
||||
..()
|
||||
src.updateDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -144,35 +149,77 @@ obj/machinery/computer/general_air_control
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/data = sensor_information[id_tag]
|
||||
var/sensor_part = "<B>[long_name]</B>:<BR>"
|
||||
var/sensor_part = "<fieldset><legend>[long_name]</legend>"
|
||||
|
||||
if(data)
|
||||
sensor_part += "<table>"
|
||||
if(data["pressure"])
|
||||
sensor_part += " <B>Pressure:</B> [data["pressure"]] kPa<BR>"
|
||||
sensor_part += "<tr><th>Pressure:</th><td>[data["pressure"]] kPa</td></tr>"
|
||||
if(data["temperature"])
|
||||
sensor_part += " <B>Temperature:</B> [data["temperature"]] K<BR>"
|
||||
sensor_part += "<tr><th>Temperature:</th><td>[data["temperature"]] K</td></tr>"
|
||||
if(data["oxygen"]||data["toxins"]||data["nitrogen"]||data["carbon_dioxide"])
|
||||
sensor_part += " <B>Gas Composition :</B>"
|
||||
sensor_part += "<tr><th>Gas Composition :</th><td><ul>"
|
||||
if(data["oxygen"])
|
||||
sensor_part += "[data["oxygen"]]% O2; "
|
||||
sensor_part += "<li>[data["oxygen"]]% O<sub>2</sub></li>"
|
||||
if(data["nitrogen"])
|
||||
sensor_part += "[data["nitrogen"]]% N; "
|
||||
sensor_part += "<li>[data["nitrogen"]]% N</li>"
|
||||
if(data["carbon_dioxide"])
|
||||
sensor_part += "[data["carbon_dioxide"]]% CO2; "
|
||||
sensor_part += "<li>[data["carbon_dioxide"]]% CO<sub>2</sub></li>"
|
||||
if(data["toxins"])
|
||||
sensor_part += "[data["toxins"]]% TX; "
|
||||
sensor_part += "<HR>"
|
||||
sensor_part += "<li>[data["toxins"]]% Plasma</li>"
|
||||
sensor_part += "</ul></td></tr>"
|
||||
sensor_part += "</table>"
|
||||
|
||||
else
|
||||
sensor_part = "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
|
||||
|
||||
sensor_part += "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
|
||||
sensor_part += "</fieldset>"
|
||||
sensor_data += sensor_part
|
||||
|
||||
else
|
||||
sensor_data = "No sensors connected."
|
||||
sensor_data = "<em>No sensors connected.</em>"
|
||||
|
||||
var/output = {"<B>[name]</B><HR>
|
||||
<B>Sensor Data:</B><HR><HR>[sensor_data]"}
|
||||
var/output = {"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<style type="text/css">
|
||||
html,body {
|
||||
font-family:sans-serif,verdana;
|
||||
font-size:smaller;
|
||||
color:#666;
|
||||
}
|
||||
h1 {
|
||||
border-bottom:1px solid maroon;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td, th {
|
||||
margin: 0;
|
||||
font-size: small;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border:1px solid #ccc;
|
||||
background: #efefef;
|
||||
}
|
||||
legend {
|
||||
font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
<h2>Sensor Data:</h2>
|
||||
[sensor_data]"}
|
||||
|
||||
return output
|
||||
|
||||
@@ -197,36 +244,62 @@ obj/machinery/computer/general_air_control
|
||||
|
||||
var/pressure_setting = ONE_ATMOSPHERE * 45
|
||||
|
||||
process()
|
||||
..()
|
||||
if(!input_info && input_tag)
|
||||
request_device_refresh(input_tag)
|
||||
if(!output_info && output_tag)
|
||||
request_device_refresh(output_tag)
|
||||
|
||||
return_text()
|
||||
var/output = ..()
|
||||
//if(signal.data)
|
||||
// input_info = signal.data // Attempting to fix intake control -- TLE
|
||||
|
||||
output += "<B>Tank Control System</B><BR>"
|
||||
if(input_info)
|
||||
var/power = (input_info["power"])
|
||||
var/volume_rate = input_info["volume_rate"]
|
||||
output += {"<B>Input</B>: [power?("Injecting"):("On Hold")] <A href='?src=\ref[src];in_refresh_status=1'>Refresh</A><BR>
|
||||
Rate: [volume_rate] L/sec<BR>"}
|
||||
output += "Command: <A href='?src=\ref[src];in_toggle_injector=1'>Toggle Power</A><BR>"
|
||||
output += "<h2>Tank Control System</h2><BR>"
|
||||
if(input_tag)
|
||||
if(input_info)
|
||||
var/power = (input_info["power"])
|
||||
var/volume_rate = input_info["volume_rate"]
|
||||
output += {"
|
||||
<fieldset>
|
||||
<legend>Input (<A href='?src=\ref[src];in_refresh_status=1'>Refresh</A>)</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th>State:</th>
|
||||
<td><A href='?src=\ref[src];in_toggle_injector=1'>[power?("Injecting"):("On Hold")]</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rate:</th>
|
||||
<td>[volume_rate] L/sec</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
"}
|
||||
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find input port</FONT> <A href='?src=\ref[src];in_refresh_status=1'>Search</A><BR>"
|
||||
|
||||
output += "<BR>"
|
||||
|
||||
if(output_info)
|
||||
var/power = (output_info["power"])
|
||||
var/output_pressure = output_info["internal"]
|
||||
output += {"<B>Output</B>: [power?("Open"):("On Hold")] <A href='?src=\ref[src];out_refresh_status=1'>Refresh</A><BR>
|
||||
Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
output += "Command: <A href='?src=\ref[src];out_toggle_power=1'>Toggle Power</A> <A href='?src=\ref[src];out_set_pressure=1'>Set Pressure</A><BR>"
|
||||
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find output port</FONT> <A href='?src=\ref[src];out_refresh_status=1'>Search</A><BR>"
|
||||
|
||||
output += "Max Output Pressure Set: <A href='?src=\ref[src];adj_pressure=-1000'>-</A> <A href='?src=\ref[src];adj_pressure=-100'>-</A> <A href='?src=\ref[src];adj_pressure=-10'>-</A> <A href='?src=\ref[src];adj_pressure=-1'>-</A> [pressure_setting] kPa <A href='?src=\ref[src];adj_pressure=1'>+</A> <A href='?src=\ref[src];adj_pressure=10'>+</A> <A href='?src=\ref[src];adj_pressure=100'>+</A> <A href='?src=\ref[src];adj_pressure=1000'>+</A><BR>"
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find input port</FONT> <A href='?src=\ref[src];in_refresh_status=1'>Search</A><BR>"
|
||||
if(output_tag)
|
||||
if(output_info)
|
||||
var/power = (output_info["power"])
|
||||
var/output_pressure = output_info["internal"]
|
||||
output += {"
|
||||
<fieldset>
|
||||
<legend>Output (<A href='?src=\ref[src];out_refresh_status=1'>Refresh</A>)</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th>State:</th>
|
||||
<td><A href='?src=\ref[src];out_toggle_power=1'>[power?("Open"):("On Hold")]</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Max Output Pressure:</th>
|
||||
<td><A href='?src=\ref[src];out_set_pressure=1'>[output_pressure]</A> kPa</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
"}
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find output port</FONT> <A href='?src=\ref[src];out_refresh_status=1'>Search</A><BR>"
|
||||
|
||||
return output
|
||||
|
||||
@@ -237,21 +310,34 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
|
||||
if(input_tag == id_tag)
|
||||
input_info = signal.data
|
||||
updateUsrDialog()
|
||||
else if(output_tag == id_tag)
|
||||
output_info = signal.data
|
||||
updateUsrDialog()
|
||||
else
|
||||
..(signal)
|
||||
|
||||
proc/request_device_refresh(var/device)
|
||||
send_signal(list("tag"=device, "status"))
|
||||
|
||||
proc/send_signal(var/list/data)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.source = src
|
||||
signal.data=data
|
||||
signal.data["sigtype"]="command"
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
pressure_setting = between(0, pressure_setting + change, 50*ONE_ATMOSPHERE)
|
||||
spawn(1)
|
||||
src.updateDialog()
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["out_set_pressure"])
|
||||
var/response=input(usr,"Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
|
||||
pressure_setting = text2num(response)
|
||||
pressure_setting = between(0, pressure_setting, 50*ONE_ATMOSPHERE)
|
||||
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
@@ -262,27 +348,28 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
input_info = null
|
||||
signal.data = list ("tag" = input_tag, "status")
|
||||
|
||||
if(href_list["in_toggle_injector"])
|
||||
else if(href_list["in_toggle_injector"])
|
||||
input_info = null
|
||||
signal.data = list ("tag" = input_tag, "power_toggle")
|
||||
|
||||
if(href_list["out_refresh_status"])
|
||||
else if(href_list["out_refresh_status"])
|
||||
output_info = null
|
||||
signal.data = list ("tag" = output_tag, "status")
|
||||
|
||||
if(href_list["out_toggle_power"])
|
||||
else if(href_list["out_toggle_power"])
|
||||
output_info = null
|
||||
signal.data = list ("tag" = output_tag, "power_toggle")
|
||||
|
||||
if(href_list["out_set_pressure"])
|
||||
else if(href_list["out_set_pressure"])
|
||||
output_info = null
|
||||
signal.data = list ("tag" = output_tag, "set_internal_pressure" = "[pressure_setting]")
|
||||
else
|
||||
testing("Bad Topic() to GAC \"[src.name]\": [href]")
|
||||
return // NOPE.
|
||||
|
||||
signal.data["sigtype"]="command"
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
spawn(5)
|
||||
src.updateDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
fuel_injection
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
|
||||
@@ -718,9 +718,7 @@ Auto Patrol: []"},
|
||||
Sa.overlays += image('icons/obj/aibots.dmi', "hs_hole")
|
||||
Sa.created_name = src.name
|
||||
new /obj/item/device/assembly/prox_sensor(Tsec)
|
||||
|
||||
var/obj/item/weapon/melee/baton/B = new /obj/item/weapon/melee/baton(Tsec)
|
||||
B.charges = 0
|
||||
new /obj/item/weapon/melee/baton(Tsec)
|
||||
|
||||
if(prob(50))
|
||||
new /obj/item/robot_parts/l_arm(Tsec)
|
||||
|
||||
@@ -166,19 +166,17 @@
|
||||
|
||||
// -- Mode/mind specific stuff goes here
|
||||
|
||||
switch(ticker.mode.name)
|
||||
if("revolution")
|
||||
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
|
||||
ticker.mode.update_all_rev_icons() //So the icon actually appears
|
||||
if("nuclear emergency")
|
||||
if(H.mind in ticker.mode.syndicates)
|
||||
ticker.mode.update_all_synd_icons()
|
||||
if("cult")
|
||||
if (H.mind in ticker.mode.cult)
|
||||
ticker.mode.add_cultist(src.occupant.mind)
|
||||
ticker.mode.update_all_cult_icons() //So the icon actually appears
|
||||
if("\ref[H.mind]" in ticker.mode.implanter || H.mind in ticker.mode.implanted)
|
||||
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
|
||||
ticker.mode.update_all_rev_icons() //So the icon actually appears
|
||||
if(H.mind in ticker.mode.syndicates)
|
||||
ticker.mode.update_all_synd_icons()
|
||||
if (H.mind in ticker.mode.cult)
|
||||
ticker.mode.add_cultist(src.occupant.mind)
|
||||
ticker.mode.update_all_cult_icons() //So the icon actually appears
|
||||
if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted))
|
||||
ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears
|
||||
if(("\ref[H.mind]" in ticker.mode.thralls) || (H.mind in ticker.mode.enthralled))
|
||||
ticker.mode.update_vampire_icons_added(H.mind)
|
||||
|
||||
// -- End mode specific stuff
|
||||
|
||||
|
||||
@@ -523,6 +523,10 @@
|
||||
w_class = 2
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
user << "\blue [src] can now be concealed."
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -443,7 +443,6 @@
|
||||
//Sender isn't faking as someone who exists
|
||||
if(isnull(PDARec))
|
||||
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
|
||||
customrecepient.tnote += "<i><b>← From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
|
||||
if (!customrecepient.silent)
|
||||
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, customrecepient.loc))
|
||||
@@ -457,7 +456,11 @@
|
||||
//Sender is faking as someone who exists
|
||||
else
|
||||
src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
|
||||
customrecepient.tnote += "<i><b>← From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[PDARec]'>[PDARec.owner]</a> ([customjob]):</b></i><br>[custommessage]<br>"
|
||||
customrecepient.tnote.Add(list(list("sent" = 0, "owner" = "[PDARec.owner]", "job" = "[customjob]", "message" = "[custommessage]", "target" ="\ref[PDARec]")))
|
||||
|
||||
if(!customrecepient.conversations.Find("\ref[PDARec]"))
|
||||
customrecepient.conversations.Add("\ref[PDARec]")
|
||||
|
||||
if (!customrecepient.silent)
|
||||
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, customrecepient.loc))
|
||||
|
||||
@@ -191,6 +191,9 @@
|
||||
if(z_co == 2 || z_co < 1 || z_co > 6)
|
||||
usr << "\red Error: Z is less than 1, greater than 6, or equal to 2."
|
||||
fail = 1
|
||||
if(istype(get_area(locate(x_co,y_co,z_co)), /area/security/armoury/gamma))
|
||||
usr << "\red Error: Attempting to access telescience-protected area."
|
||||
fail = 1
|
||||
return fail
|
||||
|
||||
/obj/machinery/computer/telescience/Topic(href, href_list)
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#define XENOS_SHUTTLE_MOVE_TIME 240
|
||||
#define XENOS_SHUTTLE_COOLDOWN 200
|
||||
|
||||
/obj/machinery/computer/xenos_station
|
||||
name = "xenos shuttle terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "xenocontrol"
|
||||
req_access = list()
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/New()
|
||||
curr_location= locate(/area/xenos_station/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/proc/xenos_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + XENOS_SHUTTLE_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/xenos_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(XENOS_SHUTTLE_MOVE_TIME)
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/xenos_station/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/xenos_station/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/xenos_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + XENOS_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + XENOS_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=\ref[src];xenos=1'>Xenos Space</a><br>
|
||||
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
|
||||
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
|
||||
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/Topic(href, href_list)
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if(href_list["xenos"])
|
||||
xenos_move_to(/area/xenos_station/start)
|
||||
else if(href_list["station_nw"])
|
||||
xenos_move_to(/area/xenos_station/northwest)
|
||||
else if(href_list["station_n"])
|
||||
xenos_move_to(/area/xenos_station/north)
|
||||
else if(href_list["station_ne"])
|
||||
xenos_move_to(/area/xenos_station/northeast)
|
||||
else if(href_list["station_sw"])
|
||||
xenos_move_to(/area/xenos_station/southwest)
|
||||
else if(href_list["station_s"])
|
||||
xenos_move_to(/area/xenos_station/south)
|
||||
else if(href_list["station_se"])
|
||||
xenos_move_to(/area/xenos_station/southeast)
|
||||
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/xenos_station/bullet_act(var/obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
|
||||
@@ -268,7 +268,7 @@
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
if (occupant.bodytemperature < 261 && occupant.bodytemperature > 140) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||
occupant.bodytemperature = 261
|
||||
// occupant.metabslow = 0
|
||||
occupant = null
|
||||
|
||||
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
* Cryogenic refrigeration unit. Basically a despawner.
|
||||
* Stealing a lot of concepts/code from sleepers due to massive laziness.
|
||||
* The despawn tick will only fire if it's been more than time_till_despawned ticks
|
||||
* since time_entered, which is world.time when the occupant moves in.
|
||||
* ~ Zuhayr
|
||||
*/
|
||||
|
||||
//Used for logging people entering cryosleep and important items they are carrying.
|
||||
var/global/list/frozen_crew = list()
|
||||
var/global/list/frozen_items = list()
|
||||
|
||||
//Main cryopod console.
|
||||
|
||||
/obj/machinery/computer/cryopod
|
||||
name = "cryogenic oversight console"
|
||||
desc = "An interface between crew and the cryogenic storage oversight systems."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "cellconsole"
|
||||
circuit = "/obj/item/weapon/circuitboard/cryopodcontrol"
|
||||
var/mode = null
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_paw()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/dat
|
||||
|
||||
if (!( ticker ))
|
||||
return
|
||||
|
||||
dat += "<hr/><br/><b>Cryogenic Oversight Control</b><br/>"
|
||||
dat += "<i>Welcome, [user.real_name].</i><br/><br/><hr/>"
|
||||
dat += "<a href='?src=\ref[src];log=1'>View storage log</a>.<br>"
|
||||
dat += "<a href='?src=\ref[src];item=1'>Recover object</a>.<br>"
|
||||
dat += "<a href='?src=\ref[src];allitems=1'>Recover all objects</a>.<br>"
|
||||
dat += "<a href='?src=\ref[src];crew=1'>Revive crew</a>.<br/><hr/>"
|
||||
|
||||
user << browse(dat, "window=cryopod_console")
|
||||
onclose(user, "cryopod_console")
|
||||
|
||||
obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/mob/user = usr
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(href_list["log"])
|
||||
|
||||
var/dat = "<b>Recently stored crewmembers</b><br/><hr/><br/>"
|
||||
for(var/person in frozen_crew)
|
||||
dat += "[person]<br/>"
|
||||
dat += "<hr/>"
|
||||
|
||||
user << browse(dat, "window=cryolog")
|
||||
|
||||
else if(href_list["item"])
|
||||
|
||||
if(frozen_items.len == 0)
|
||||
user << "\blue There is nothing to recover from storage."
|
||||
return
|
||||
|
||||
var/obj/item/I = input(usr, "Please choose which object to retrieve.","Object recovery",null) as obj in frozen_items
|
||||
|
||||
if(!I || frozen_items.len == 0)
|
||||
user << "\blue There is nothing to recover from storage."
|
||||
return
|
||||
|
||||
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
|
||||
|
||||
I.loc = get_turf(src)
|
||||
frozen_items -= I
|
||||
|
||||
else if(href_list["allitems"])
|
||||
|
||||
if(frozen_items.len == 0)
|
||||
user << "\blue There is nothing to recover from storage."
|
||||
return
|
||||
|
||||
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
|
||||
|
||||
for(var/obj/item/I in frozen_items)
|
||||
I.loc = get_turf(src)
|
||||
frozen_items -= I
|
||||
|
||||
else if(href_list["crew"])
|
||||
|
||||
user << "\red Functionality unavailable at this time."
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/cryopodcontrol
|
||||
name = "Circuit board (Cryogenic Oversight Console)"
|
||||
build_path = "/obj/machinery/computer/cryopod"
|
||||
origin_tech = "programming=3"
|
||||
|
||||
//Decorative structures to go alongside cryopods.
|
||||
/obj/structure/cryofeed
|
||||
|
||||
name = "\improper cryogenic feed"
|
||||
desc = "A bewildering tangle of machinery and pipes."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "cryo_rear"
|
||||
anchored = 1
|
||||
|
||||
var/orient_right = null //Flips the sprite.
|
||||
|
||||
/obj/structure/cryofeed/right
|
||||
orient_right = 1
|
||||
icon_state = "cryo_rear-r"
|
||||
|
||||
/obj/structure/cryofeed/New()
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "cryo_rear-r"
|
||||
else
|
||||
icon_state = "cryo_rear"
|
||||
..()
|
||||
|
||||
//Cryopods themselves.
|
||||
/obj/machinery/cryopod
|
||||
name = "\improper cryogenic freezer"
|
||||
desc = "A man-sized pod for entering suspended animation."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "body_scanner_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
var/mob/occupant = null // Person waiting to be despawned.
|
||||
var/orient_right = null // Flips the sprite.
|
||||
var/time_till_despawn = 9000 // 15 minutes-ish safe period before being despawned.
|
||||
var/time_entered = 0 // Used to keep track of the safe period.
|
||||
var/obj/item/device/radio/intercom/announce //
|
||||
|
||||
// These items are preserved when the process() despawn proc occurs.
|
||||
var/list/preserve_items = list(
|
||||
/obj/item/weapon/hand_tele,
|
||||
/obj/item/weapon/card/id/captains_spare,
|
||||
/obj/item/device/aicard,
|
||||
/obj/item/device/mmi,
|
||||
/obj/item/device/paicard,
|
||||
/obj/item/weapon/gun,
|
||||
/obj/item/weapon/pinpointer,
|
||||
/obj/item/clothing/suit,
|
||||
/obj/item/clothing/shoes/magboots,
|
||||
/obj/item/blueprints,
|
||||
/obj/item/clothing/head/helmet/space/
|
||||
)
|
||||
|
||||
/obj/machinery/cryopod/right
|
||||
orient_right = 1
|
||||
icon_state = "body_scanner_0-r"
|
||||
|
||||
/obj/machinery/cryopod/New()
|
||||
|
||||
announce = new /obj/item/device/radio/intercom(src)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_0-r"
|
||||
else
|
||||
icon_state = "body_scanner_0"
|
||||
..()
|
||||
|
||||
//Lifted from Unity stasis.dm and refactored. ~Zuhayr
|
||||
/obj/machinery/cryopod/process()
|
||||
if(occupant)
|
||||
|
||||
//Allow a ten minute gap between entering the pod and actually despawning.
|
||||
if(world.time - time_entered < time_till_despawn)
|
||||
return
|
||||
|
||||
if(!occupant.client && occupant.stat<2) //Occupant is living and has no client.
|
||||
|
||||
//Delete all items not on the preservation list and drop all others into the pod.
|
||||
for(var/obj/item/W in occupant)
|
||||
occupant.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
|
||||
var/preserve = null
|
||||
for(var/T in preserve_items)
|
||||
if(istype(W,T))
|
||||
preserve = 1
|
||||
break
|
||||
|
||||
if(!preserve)
|
||||
del(W)
|
||||
else
|
||||
frozen_items += W
|
||||
|
||||
var/job = occupant.mind.assigned_role
|
||||
var/role = occupant.mind.special_role
|
||||
|
||||
job_master.FreeRole(job)
|
||||
|
||||
if(role == "traitor" || role == "MODE")
|
||||
del(occupant.mind.objectives)
|
||||
occupant.mind.special_role = null
|
||||
else
|
||||
if(ticker.mode.name == "AutoTraitor")
|
||||
var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode
|
||||
current_mode.possible_traitors.Remove(occupant)
|
||||
|
||||
// Delete them from datacore.
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == occupant.real_name))
|
||||
del(R)
|
||||
for(var/datum/data/record/T in data_core.security)
|
||||
if ((T.fields["name"] == occupant.real_name))
|
||||
del(T)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
if ((G.fields["name"] == occupant.real_name))
|
||||
del(G)
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_0-r"
|
||||
else
|
||||
icon_state = "body_scanner_0"
|
||||
|
||||
//TODO: Check objectives/mode, update new targets if this mob is the target, spawn new antags?
|
||||
|
||||
//This should guarantee that ghosts don't spawn.
|
||||
occupant.ckey = null
|
||||
|
||||
//Make an announcement and log the person entering storage.
|
||||
frozen_crew += "[occupant.real_name]"
|
||||
|
||||
announce.autosay("[occupant.real_name] has entered long-term storage.", "Cryogenic Oversight")
|
||||
visible_message("\blue The crypod hums and hisses as it moves [occupant.real_name] into storage.", 3)
|
||||
|
||||
// Delete the mob.
|
||||
del(occupant)
|
||||
occupant = null
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
|
||||
if(occupant)
|
||||
user << "\blue The cryo pod is in use."
|
||||
return
|
||||
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
|
||||
var/willing = null //We don't want to allow people to be forced into despawning.
|
||||
var/mob/M = G:affecting
|
||||
|
||||
if(M.client)
|
||||
if(alert(M,"Would you like to enter cryosleep?",,"Yes","No") == "Yes")
|
||||
if(!M || !G || !G:affecting) return
|
||||
willing = 1
|
||||
else
|
||||
willing = 1
|
||||
|
||||
if(willing)
|
||||
|
||||
visible_message("[user] starts putting [G:affecting:name] into the cryo pod.", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(!M || !G || !G:affecting) return
|
||||
|
||||
M.loc = src
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_1-r"
|
||||
else
|
||||
icon_state = "body_scanner_1"
|
||||
|
||||
M << "\blue You feel cool air surround you. You go numb as your senses turn inward."
|
||||
M << "\blue <b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"
|
||||
occupant = M
|
||||
time_entered = world.time
|
||||
|
||||
// Book keeping!
|
||||
log_admin("[key_name_admin(M)] has entered a stasis pod.")
|
||||
message_admins("\blue [key_name_admin(M)] has entered a stasis pod.")
|
||||
|
||||
//Despawning occurs when process() is called with an occupant without a client.
|
||||
src.add_fingerprint(M)
|
||||
|
||||
/obj/machinery/cryopod/verb/eject()
|
||||
set name = "Eject Pod"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner0-r"
|
||||
else
|
||||
icon_state = "body_scanner0"
|
||||
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/cryopod/verb/move_inside()
|
||||
set name = "Enter Pod"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat != 0 || !(ishuman(usr) || ismonkey(usr)))
|
||||
return
|
||||
|
||||
if(src.occupant)
|
||||
usr << "\blue <B>The cryo pod is in use.</B>"
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/slime/M in range(1,usr))
|
||||
if(M.Victim == usr)
|
||||
usr << "You're too busy getting your life sucked out of you."
|
||||
return
|
||||
|
||||
visible_message("[usr] starts climbing into the cryo pod.", 3)
|
||||
|
||||
if(do_after(usr, 20))
|
||||
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
|
||||
if(src.occupant)
|
||||
usr << "\blue <B>The cryo pod is in use.</B>"
|
||||
return
|
||||
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_1-r"
|
||||
else
|
||||
icon_state = "body_scanner_1"
|
||||
|
||||
usr << "\blue You feel cool air surround you. You go numb as your senses turn inward."
|
||||
usr << "\blue <b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"
|
||||
occupant = usr
|
||||
time_entered = world.time
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/cryopod/proc/go_out()
|
||||
|
||||
if(!occupant)
|
||||
return
|
||||
|
||||
if(occupant.client)
|
||||
occupant.client.eye = src.occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
occupant.loc = get_turf(src)
|
||||
occupant = null
|
||||
|
||||
if(orient_right)
|
||||
icon_state = "body_scanner_0-r"
|
||||
else
|
||||
icon_state = "body_scanner_0"
|
||||
|
||||
return
|
||||
|
||||
|
||||
//Attacks/effects.
|
||||
/obj/machinery/cryopod/blob_act()
|
||||
return //Sorta gamey, but we don't really want these to be destroyed.
|
||||
@@ -121,13 +121,10 @@
|
||||
opacity = 1
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
|
||||
|
||||
/obj/machinery/door/airlock/hatch/delta
|
||||
name = "Delta Level Hatch"
|
||||
icon = 'icons/obj/doors/Doorhatchele.dmi'
|
||||
opacity = 1
|
||||
/obj/machinery/door/airlock/hatch/gamma
|
||||
name = "Gamma Level Hatch"
|
||||
hackProof = 1
|
||||
aiControlDisabled = 1
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_hatch
|
||||
|
||||
/obj/machinery/door/airlock/maintenance_hatch
|
||||
name = "Maintenance Hatch"
|
||||
@@ -296,6 +293,11 @@
|
||||
icon = 'icons/obj/doors/hightechsecurity.dmi'
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity
|
||||
|
||||
/obj/machinery/door/airlock/highsecurity/red
|
||||
name = "Secure Armory Airlock"
|
||||
hackProof = 1
|
||||
aiControlDisabled = 1
|
||||
|
||||
/*
|
||||
About the new airlock wires panel:
|
||||
* An airlock wire dialog can be accessed by the normal way or by using wirecutters or a multitool on the door while the wire-panel is open. This would show the following wires, which you can either wirecut/mend or send a multitool pulse through. There are 9 wires.
|
||||
@@ -1072,7 +1074,7 @@ About the new airlock wires panel:
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/hatch/delta/attackby(C as obj, mob/user as mob)
|
||||
/obj/machinery/door/airlock/hatch/gamma/attackby(C as obj, mob/user as mob)
|
||||
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
|
||||
if(!istype(usr, /mob/living/silicon))
|
||||
if(src.isElectrified())
|
||||
@@ -1094,4 +1096,30 @@ About the new airlock wires panel:
|
||||
src.update_icon()
|
||||
return
|
||||
else
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/highsecurity/red/attackby(C as obj, mob/user as mob)
|
||||
//world << text("airlock attackby src [] obj [] mob []", src, C, user)
|
||||
if(!istype(usr, /mob/living/silicon))
|
||||
if(src.isElectrified())
|
||||
if(src.shock(user, 75))
|
||||
return
|
||||
if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll))
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(W.remove_fuel(0,user))
|
||||
if(frozen)
|
||||
frozen = 0
|
||||
if(!src.welded)
|
||||
src.welded = 1
|
||||
else
|
||||
src.welded = null
|
||||
src.update_icon()
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
if (src.req_access && src.req_access.len)
|
||||
src.icon_state = "[src.icon_state]"
|
||||
src.base_state = src.icon_state
|
||||
|
||||
color = color_windows()
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/Del()
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/obj/machinery/drying_rack
|
||||
name = "drying rack"
|
||||
desc = "A large rack with a heater built into the base. Used for drying things out."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "drying_rack"
|
||||
layer = 2.9
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 50
|
||||
var/list/accepted = list()
|
||||
var/running = 0
|
||||
var/volume = 100
|
||||
|
||||
/obj/machinery/drying_rack/New()
|
||||
..()
|
||||
flags |= NOREACT
|
||||
create_reagents(volume)
|
||||
accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_arabica,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_robusta,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco_space,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea_aspera,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea_astra,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/drying_rack/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if(is_type_in_list(W,accepted))
|
||||
if(!running)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meat))
|
||||
user.u_equip(W)
|
||||
del(W)
|
||||
user << "You add the meat to the drying rack."
|
||||
src.running = 1
|
||||
use_power = 2
|
||||
icon_state = "drying_rack_on"
|
||||
sleep(60)
|
||||
icon_state = "drying_rack"
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/sosjerky(src.loc)
|
||||
use_power = 1
|
||||
src.running = 0
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/grapes))
|
||||
user.u_equip(W)
|
||||
del(W)
|
||||
user << "You add the grapes to the drying rack."
|
||||
src.running = 1
|
||||
use_power = 2
|
||||
icon_state = "drying_rack_on"
|
||||
sleep(60)
|
||||
icon_state = "drying_rack"
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
|
||||
use_power = 1
|
||||
src.running = 0
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes))
|
||||
user.u_equip(W)
|
||||
del(W)
|
||||
user << "You add the green grapes to the drying rack."
|
||||
src.running = 1
|
||||
use_power = 2
|
||||
icon_state = "drying_rack_on"
|
||||
sleep(60)
|
||||
icon_state = "drying_rack"
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
|
||||
use_power = 1
|
||||
src.running = 0
|
||||
return
|
||||
else
|
||||
if(W:dry == 0)
|
||||
var/J = W.type
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/B = W
|
||||
B.reagents.trans_to(src, B.reagents.total_volume)
|
||||
user << "You add the [W] to the drying rack."
|
||||
user.u_equip(W)
|
||||
del(W)
|
||||
src.running = 1
|
||||
use_power = 2
|
||||
icon_state = "drying_rack_on"
|
||||
sleep(60)
|
||||
icon_state = "drying_rack"
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/D = new J(src.loc)
|
||||
user << "\blue You finish drying the [D]"
|
||||
D.icon_state = "[D.icon_state]_dry"
|
||||
D.dry = 1
|
||||
D.reagents.remove_any(50)
|
||||
src.reagents.trans_to(D, src.reagents.total_volume)
|
||||
use_power = 1
|
||||
src.running = 0
|
||||
return
|
||||
else
|
||||
user << "\red That has already been dried!"
|
||||
else
|
||||
user << "\red Please wait until the last item has dried."
|
||||
else
|
||||
user << "\red You cannot add that to the drying rack."
|
||||
|
||||
|
||||
@@ -79,13 +79,15 @@
|
||||
continue
|
||||
|
||||
O.Weaken(strength)
|
||||
if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
|
||||
flick("e_flash", O:flash)
|
||||
O.eye_stat += rand(1, 2)
|
||||
if (istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
if ((E.damage > E.min_bruised_damage && prob(E.damage + 50)))
|
||||
flick("e_flash", O:flash)
|
||||
E.damage += rand(1, 5)
|
||||
else
|
||||
if(!O.blinded)
|
||||
flick("flash", O:flash)
|
||||
O.eye_stat += rand(0, 2)
|
||||
|
||||
|
||||
/obj/machinery/flasher/emp_act(severity)
|
||||
|
||||
@@ -43,10 +43,15 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
source = B.data["donor"]
|
||||
user << "The strange, sluglike seeds quiver gently and swell with blood."
|
||||
if(!source.client && source.mind)
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
for(var/mob/O in respawnable_list)
|
||||
if(O.mind == source.mind && config.revival_pod_plants)
|
||||
O << "<b><font color = #330033><font size = 3>Your blood has been placed into a replica pod seed. Return to your body if you want to be returned to life as a pod person!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
|
||||
break
|
||||
message_admins("Found mind, asking for respawn")
|
||||
switch(alert(O,"Your corpse has been placed into a pod plant. Do you want to be resurrected/cloned? Please not if you select 'No', you will be able to be cloned or borged again this round.","Pod Alert","Yes","No"))
|
||||
if("Yes")
|
||||
source.key = O.key
|
||||
return
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
user << "Nothing happens."
|
||||
return
|
||||
@@ -74,9 +79,10 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
if(source && source.stat == 2 && source.client && source.ckey && config.revival_pod_plants)
|
||||
transfer_personality(source.client)
|
||||
else // If no sample was injected or revival is not allowed, we grab an interested observer.
|
||||
message_admins("Requesting player for nymph")
|
||||
request_player()
|
||||
|
||||
spawn(75) //If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds.
|
||||
spawn(100) //If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds.
|
||||
if(!found_player)
|
||||
parent.visible_message("The pod has formed badly, and all you can do is salvage some of the seeds.")
|
||||
var/seed_count = 1
|
||||
@@ -91,18 +97,24 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
return
|
||||
|
||||
/obj/item/seeds/replicapod/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
for(var/mob/O in respawnable_list)
|
||||
if(jobban_isbanned(O, "Dionaea"))
|
||||
continue
|
||||
if(O.client)
|
||||
// message_admins("Found client for nymph")
|
||||
if(O.client.prefs.be_special & BE_PLANT)
|
||||
// message_admins("Questioning client for nymph")
|
||||
question(O.client)
|
||||
|
||||
/obj/item/seeds/replicapod/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
// message_admins("Sending popup for nymph")
|
||||
var/response = alert(C, "Someone is harvesting a replica pod. Would you like to play as a Dionaea?", "Replica pod harvest", "Yes", "No", "Never for this round.")
|
||||
if(!C || ckey)
|
||||
return
|
||||
if(response == "Yes")
|
||||
// message_admins("Transferring personality for nymph")
|
||||
transfer_personality(C)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PLANT
|
||||
@@ -112,10 +124,9 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
|
||||
if(!player) return
|
||||
|
||||
found_player = 1
|
||||
|
||||
var/mob/living/carbon/monkey/diona/podman = new(parent.loc)
|
||||
podman.ckey = player.ckey
|
||||
|
||||
respawnable_list -= player
|
||||
if(player.mob && player.mob.mind)
|
||||
player.mob.mind.transfer_to(podman)
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
|
||||
user << "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>"
|
||||
return
|
||||
if (istype(G, /obj/item/weapon/gun/energy/staff))
|
||||
return
|
||||
if(istype(G,/obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = G
|
||||
if(!L.stored_computer.battery)
|
||||
@@ -78,10 +76,10 @@ obj/machinery/recharger/process()
|
||||
return
|
||||
if(istype(charging, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
if(B.charges < initial(B.charges))
|
||||
B.charges++
|
||||
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
|
||||
B.bcell.charge += 175
|
||||
icon_state = "recharger1"
|
||||
use_power(150)
|
||||
use_power(200)
|
||||
else
|
||||
icon_state = "recharger2"
|
||||
return
|
||||
@@ -108,7 +106,8 @@ obj/machinery/recharger/emp_act(severity)
|
||||
|
||||
else if(istype(charging, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
B.charges = 0
|
||||
if(B.bcell)
|
||||
B.bcell.charge = 0
|
||||
else if(istype(charging, /obj/item/device/laptop))
|
||||
charging.emp_act(severity)
|
||||
..(severity)
|
||||
@@ -140,12 +139,12 @@ obj/machinery/recharger/wallcharger/process()
|
||||
return
|
||||
if(istype(charging, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = charging
|
||||
if(B.charges < initial(B.charges))
|
||||
B.charges++
|
||||
icon_state = "wrecharger1"
|
||||
use_power(150)
|
||||
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
|
||||
B.bcell.charge += 175
|
||||
icon_state = "recharger1"
|
||||
use_power(200)
|
||||
else
|
||||
icon_state = "wrecharger2"
|
||||
icon_state = "recharger2"
|
||||
|
||||
obj/machinery/recharger/wallcharger/update_icon()
|
||||
if(charging)
|
||||
|
||||
@@ -106,8 +106,9 @@
|
||||
else
|
||||
O:charge_tick = 0
|
||||
if(istype(O,/obj/item/weapon/melee/baton))
|
||||
if(O:charges < 10)
|
||||
O:charges += 1
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if(B.bcell)
|
||||
B.bcell.charge = B.bcell.maxcharge
|
||||
//Service
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/condiment/enzyme))
|
||||
if(O.reagents.get_reagent_amount("enzyme") < 50)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = 0
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
|
||||
+151
-181
@@ -190,12 +190,6 @@
|
||||
targeting_active = 1
|
||||
target()
|
||||
targeting_active = 0
|
||||
|
||||
if(prob(15))
|
||||
if(prob(50))
|
||||
playsound(src.loc, 'sound/effects/turret/move1.wav', 60, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/turret/move2.wav', 60, 1)
|
||||
else if(!isPopping())//else, pop down
|
||||
if(!isDown())
|
||||
popDown()
|
||||
@@ -250,7 +244,6 @@
|
||||
if ((!isPopping()) || src.popping==-1)
|
||||
invisibility = 0
|
||||
popping = 1
|
||||
playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
|
||||
if (src.cover!=null)
|
||||
flick("popup", src.cover)
|
||||
src.cover.icon_state = "openTurretCover"
|
||||
@@ -260,7 +253,6 @@
|
||||
/obj/machinery/turret/proc/popDown()
|
||||
if ((!isPopping()) || src.popping==1)
|
||||
popping = -1
|
||||
playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
|
||||
if (src.cover!=null)
|
||||
flick("popdown", src.cover)
|
||||
src.cover.icon_state = "turretCover"
|
||||
@@ -312,7 +304,7 @@
|
||||
del(src)
|
||||
|
||||
/obj/machinery/turretid
|
||||
name = "Turret deactivation control"
|
||||
name = "turret deactivation control"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "motion3"
|
||||
anchored = 1
|
||||
@@ -394,16 +386,22 @@
|
||||
user << text("Turret badly positioned - loc.loc is [].", loc)
|
||||
return
|
||||
var/area/area = loc
|
||||
var/t = "<TT><B>Turret Control Panel</B> ([area.name])<HR>"
|
||||
var/t = ""
|
||||
|
||||
if(src.locked && (!istype(user, /mob/living/silicon)))
|
||||
t += "<I>(Swipe ID card to unlock control panel.)</I><BR>"
|
||||
t += "<div class='notice icon'>Swipe ID card to unlock interface</div>"
|
||||
else
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
t += "<div class='notice icon'>Swipe ID card to lock interface</div>"
|
||||
t += text("Turrets [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable")
|
||||
t += text("Currently set for [] - <A href='?src=\ref[];toggleLethal=1'>Change to []?</a><br>\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal")
|
||||
|
||||
user << browse(t, "window=turretid")
|
||||
onclose(user, "turretid")
|
||||
//user << browse(t, "window=turretid")
|
||||
//onclose(user, "turretid")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
|
||||
popup.set_content(t)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
|
||||
@@ -436,18 +434,18 @@
|
||||
|
||||
|
||||
/obj/machinery/turretid/Topic(href, href_list)
|
||||
..()
|
||||
if(..())
|
||||
return
|
||||
if (src.locked)
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr << "Control panel is locked!"
|
||||
return
|
||||
if ( get_dist(src, usr) == 0 || issilicon(usr))
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
else if (href_list["toggleLethal"])
|
||||
src.lethal = !src.lethal
|
||||
src.updateTurrets()
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
else if (href_list["toggleLethal"])
|
||||
src.lethal = !src.lethal
|
||||
src.updateTurrets()
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/machinery/turretid/proc/updateTurrets()
|
||||
@@ -474,174 +472,146 @@
|
||||
//If he wants it back he can uncomment it
|
||||
|
||||
|
||||
/obj/structure/turret/gun_turret
|
||||
name = "Gun Turret"
|
||||
/obj/machinery/gun_turret //related to turrets but work way differentely because of being mounted on a moving ship.
|
||||
name = "machine gun turret"
|
||||
desc = "Syndicate defense turret. It really packs a bunch."
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/cooldown = 20
|
||||
var/projectiles = 100
|
||||
var/projectiles_per_shot = 2
|
||||
var/deviation = 0.3
|
||||
var/list/exclude = list()
|
||||
var/atom/cur_target
|
||||
var/scan_range = 7
|
||||
var/health = 40
|
||||
var/list/scan_for = list("human"=0,"cyborg"=0,"mecha"=0,"alien"=1)
|
||||
var/on = 0
|
||||
var/state = 0 //Like stat on mobs, 0 is alive, 1 is damaged, 2 is dead
|
||||
var/faction = "syndicate"
|
||||
var/atom/cur_target = null
|
||||
var/scan_range = 9 //You will never see them coming
|
||||
var/health = 200 //Because it lacks a cover, and is mostly to keep people from touching the syndie shuttle.
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "gun_turret"
|
||||
icon_state = "syndieturret0"
|
||||
|
||||
/obj/machinery/gun_turret/New()
|
||||
..()
|
||||
take_damage(0) //check your health
|
||||
|
||||
/obj/machinery/gun_turret/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
die()
|
||||
if(2)
|
||||
take_damage(100)
|
||||
if(3)
|
||||
take_damage(50)
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/emp_act() //Can't emp an mechanical turret.
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/meteorhit()
|
||||
die()
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/update_icon()
|
||||
if(state > 2 || state < 0) //someone fucked up the vars so fix them
|
||||
take_damage(0)
|
||||
icon_state = "syndieturret" + "[state]"
|
||||
return
|
||||
|
||||
|
||||
ex_act()
|
||||
del src
|
||||
return
|
||||
|
||||
emp_act()
|
||||
del src
|
||||
return
|
||||
|
||||
meteorhit()
|
||||
del src
|
||||
return
|
||||
|
||||
proc/update_health()
|
||||
if(src.health<=0)
|
||||
del src
|
||||
return
|
||||
|
||||
proc/take_damage(damage)
|
||||
src.health -= damage
|
||||
if(src.health<=0)
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
src.take_damage(Proj.damage)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = {"<html>
|
||||
<head><title>[src] Control</title></head>
|
||||
<body>
|
||||
<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"on":"off"]</a><br>
|
||||
<b>Scan Range: </b><a href='?src=\ref[src];scan_range=-1'>-</a> [scan_range] <a href='?src=\ref[src];scan_range=1'>+</a><br>
|
||||
<b>Scan for: </b>"}
|
||||
for(var/scan in scan_for)
|
||||
dat += "<div style=\"margin-left: 15px;\">[scan] (<a href='?src=\ref[src];scan_for=[scan]'>[scan_for[scan]?"Yes":"No"]</a>)</div>"
|
||||
|
||||
dat += {"<b>Ammo: </b>[max(0, projectiles)]<br>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=turret")
|
||||
onclose(user, "turret")
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
attack_alien(mob/user as mob)
|
||||
user.visible_message("[user] slashes at [src]", "You slash at [src]")
|
||||
src.take_damage(15)
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["power"])
|
||||
src.on = !src.on
|
||||
if(src.on)
|
||||
spawn(50)
|
||||
if(src)
|
||||
src.process()
|
||||
if(href_list["scan_range"])
|
||||
src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
|
||||
if(href_list["scan_for"])
|
||||
if(href_list["scan_for"] in scan_for)
|
||||
scan_for[href_list["scan_for"]] = !scan_for[href_list["scan_for"]]
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
proc/validate_target(atom/target)
|
||||
if(get_dist(target, src)>scan_range)
|
||||
return 0
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
if(!M.stat && !M.lying)//ninjas can't catch you if you're lying
|
||||
return 1
|
||||
else if(istype(target, /obj/mecha))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
process()
|
||||
spawn while(on)
|
||||
if(projectiles<=0)
|
||||
on = 0
|
||||
/obj/machinery/gun_turret/proc/take_damage(damage)
|
||||
health -= damage
|
||||
switch(health)
|
||||
if(101 to INFINITY)
|
||||
state = 0
|
||||
if(1 to 100)
|
||||
state = 1
|
||||
if(-INFINITY to 0)
|
||||
if(state != 2)
|
||||
die()
|
||||
return
|
||||
if(cur_target && !validate_target(cur_target))
|
||||
cur_target = null
|
||||
if(!cur_target)
|
||||
cur_target = get_target()
|
||||
fire(cur_target)
|
||||
sleep(cooldown)
|
||||
state = 2
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/bullet_act(var/obj/item/projectile/Proj)
|
||||
take_damage(Proj.damage)
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/proc/die()
|
||||
state = 2
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/gun_turret/attack_hand(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/attack_alien(mob/user as mob)
|
||||
user.visible_message("[user] slashes at [src]", "You slash at [src]")
|
||||
take_damage(15)
|
||||
return
|
||||
|
||||
/obj/machinery/gun_turret/proc/validate_target(atom/target)
|
||||
if(get_dist(target, src)>scan_range)
|
||||
return 0
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
if(!M.stat)
|
||||
return 1
|
||||
else if(istype(target, /obj/mecha))
|
||||
var/obj/mecha/M = target
|
||||
if(M.occupant)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/process()
|
||||
if(state == 2)
|
||||
return
|
||||
|
||||
proc/get_target()
|
||||
var/list/pos_targets = list()
|
||||
var/target = null
|
||||
if(scan_for["human"])
|
||||
for(var/mob/living/carbon/human/M in oview(scan_range,src))
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["cyborg"])
|
||||
for(var/mob/living/silicon/M in oview(scan_range,src))
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["mecha"])
|
||||
for(var/obj/mecha/M in oview(scan_range, src))
|
||||
if(M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["alien"])
|
||||
for(var/mob/living/carbon/alien/M in oview(scan_range,src))
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(pos_targets.len)
|
||||
target = pick(pos_targets)
|
||||
return target
|
||||
if(cur_target && !validate_target(cur_target))
|
||||
cur_target = null
|
||||
if(!cur_target)
|
||||
cur_target = get_target()
|
||||
if(cur_target)
|
||||
fire(cur_target)
|
||||
return
|
||||
|
||||
|
||||
proc/fire(atom/target)
|
||||
if(!target)
|
||||
cur_target = null
|
||||
return
|
||||
src.dir = get_dir(src,target)
|
||||
var/turf/targloc = get_turf(target)
|
||||
var/target_x = targloc.x
|
||||
var/target_y = targloc.y
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!src) break
|
||||
var/turf/curloc = get_turf(src)
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if (!targloc || !curloc)
|
||||
/obj/machinery/gun_turret/proc/get_target()
|
||||
var/list/pos_targets = list()
|
||||
var/target = null
|
||||
for(var/mob/living/M in view(scan_range,src))
|
||||
if(M.stat || faction == M.faction)
|
||||
continue
|
||||
pos_targets += M
|
||||
for(var/obj/mecha/M in oview(scan_range, src))
|
||||
if(M.occupant)
|
||||
if(faction == M.occupant.faction)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
continue
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
|
||||
src.projectiles--
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
if(!M.occupant)
|
||||
continue //Don't shoot at empty mechs.
|
||||
pos_targets += M
|
||||
if(pos_targets.len)
|
||||
target = pick(pos_targets)
|
||||
return target
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/proc/fire(atom/target)
|
||||
if(!target)
|
||||
cur_target = null
|
||||
return
|
||||
src.dir = get_dir(src,target)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if(!src)
|
||||
return
|
||||
var/turf/curloc = get_turf(src)
|
||||
if (!targloc || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile/bullet(curloc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
spawn(0)
|
||||
A.process()
|
||||
return
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
var/product_name = "generic"
|
||||
var/product_path = null
|
||||
var/amount = 0
|
||||
var/max_amount = 0
|
||||
var/price = 0
|
||||
var/display_color = "blue"
|
||||
|
||||
@@ -52,7 +53,7 @@
|
||||
var/const/WIRE_SHOOTINV = 4
|
||||
var/datum/wires/vending/wires = null
|
||||
var/scan_id = 1
|
||||
|
||||
var/obj/item/weapon/vending_refill/refill_canister = null //The type of refill canisters used by this machine.
|
||||
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
@@ -118,6 +119,7 @@
|
||||
R.product_name = temp.name
|
||||
R.product_path = typepath
|
||||
R.amount = amount
|
||||
R.max_amount = amount
|
||||
R.price = price
|
||||
R.display_color = pick("red","blue","green")
|
||||
|
||||
@@ -130,6 +132,36 @@
|
||||
// world << "Added: [R.product_name]] - [R.amount] - [R.product_path]"
|
||||
return
|
||||
|
||||
/obj/machinery/vending/proc/refill_inventory(obj/item/weapon/vending_refill/refill, datum/data/vending_product/machine, mob/user)
|
||||
var/total = 0
|
||||
|
||||
var/to_restock = 0
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
to_restock += machine_content.max_amount - machine_content.amount
|
||||
|
||||
if(to_restock <= refill.charges)
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
if(machine_content.amount != machine_content.max_amount)
|
||||
usr << "<span class='notice'>[machine_content.max_amount - machine_content.amount] of [machine_content.product_name]</span>"
|
||||
machine_content.amount = machine_content.max_amount
|
||||
refill.charges -= to_restock
|
||||
total = to_restock
|
||||
else
|
||||
var/tmp_charges = refill.charges
|
||||
for(var/datum/data/vending_product/machine_content in machine)
|
||||
var/restock = Ceiling(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges)
|
||||
if(restock > refill.charges)
|
||||
restock = refill.charges
|
||||
machine_content.amount += restock
|
||||
refill.charges -= restock
|
||||
total += restock
|
||||
if(restock)
|
||||
usr << "<span class='notice'>[restock] of [machine_content.product_name]</span>"
|
||||
if(refill.charges == 0) //due to rounding, we ran out of refill charges, exit.
|
||||
break
|
||||
return total
|
||||
|
||||
|
||||
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
src.emagged = 1
|
||||
@@ -163,9 +195,23 @@
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
|
||||
|
||||
|
||||
else if(istype(W, refill_canister) && refill_canister != null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
user << "<span class='notice'>It does nothing.</span>"
|
||||
else if(panel_open)
|
||||
//if the panel is open we attempt to refill the machine
|
||||
var/obj/item/weapon/vending_refill/canister = W
|
||||
if(canister.charges == 0)
|
||||
user << "<span class='notice'>This [canister.name] is empty!</span>"
|
||||
else
|
||||
var/transfered = refill_inventory(canister,product_records,user)
|
||||
if(transfered)
|
||||
user << "<span class='notice'>You loaded [transfered] items in \the [name].</span>"
|
||||
else
|
||||
user << "<span class='notice'>The [name] is fully stocked.</span>"
|
||||
return;
|
||||
else
|
||||
user << "<span class='notice'>You should probably unscrew the service panel first.</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -542,7 +588,7 @@
|
||||
vend_delay = 15
|
||||
product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?"
|
||||
product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!"
|
||||
|
||||
refill_canister = /obj/item/weapon/vending_refill/boozeomat
|
||||
/obj/machinery/vending/assist
|
||||
products = list( /obj/item/device/assembly/prox_sensor = 5,/obj/item/device/assembly/igniter = 3,/obj/item/device/assembly/signaler = 4,
|
||||
/obj/item/weapon/wirecutters = 1, /obj/item/weapon/cartridge/signal = 4)
|
||||
@@ -559,7 +605,7 @@
|
||||
products = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25,/obj/item/weapon/reagent_containers/food/drinks/tea = 25,/obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/ice = 10)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25, /obj/item/weapon/reagent_containers/food/drinks/tea = 25, /obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
|
||||
refill_canister = /obj/item/weapon/vending_refill/coffee
|
||||
|
||||
|
||||
|
||||
@@ -576,7 +622,7 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 20,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 30,/obj/item/weapon/reagent_containers/food/snacks/chips =25,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 30,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 20,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 30,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 25)
|
||||
|
||||
refill_canister = /obj/item/weapon/vending_refill/snack
|
||||
/obj/machinery/vending/chinese
|
||||
name = "Mr. Chang"
|
||||
desc = "A self-serving chinese food machine, for all your chinese food needs."
|
||||
@@ -600,7 +646,7 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/soda_cans/cola = 20,/obj/item/weapon/reagent_containers/food/drinks/soda_cans/space_mountain_wind = 20,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/dr_gibb = 20,/obj/item/weapon/reagent_containers/food/drinks/soda_cans/starkist = 20,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/space_up = 20)
|
||||
|
||||
refill_canister = /obj/item/weapon/vending_refill/cola
|
||||
//This one's from bay12
|
||||
/obj/machinery/vending/cart
|
||||
name = "PTech"
|
||||
@@ -620,11 +666,11 @@
|
||||
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
|
||||
vend_delay = 34
|
||||
icon_state = "cigs"
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 4)
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 4,/obj/item/weapon/rollingpaperpack = 5)
|
||||
contraband = list(/obj/item/weapon/lighter/zippo = 4)
|
||||
premium = list(/obj/item/clothing/mask/cigarette/cigar/havana = 2)
|
||||
prices = list(/obj/item/weapon/storage/fancy/cigarettes = 60,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 60)
|
||||
|
||||
prices = list(/obj/item/weapon/storage/fancy/cigarettes = 60,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 60, /obj/item/weapon/rollingpaperpack = 20)
|
||||
refill_canister = /obj/item/weapon/vending_refill/cigarette
|
||||
|
||||
/obj/machinery/vending/medical
|
||||
name = "NanoMed Plus"
|
||||
@@ -706,7 +752,9 @@
|
||||
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
|
||||
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
|
||||
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,
|
||||
/obj/item/seeds/coffee_arabica_seed = 3, /obj/item/seeds/tobacco_seed = 3,/obj/item/seeds/tea_aspera_seed = 3)
|
||||
|
||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
|
||||
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
|
||||
premium = list(/obj/item/weapon/reagent_containers/spray/waterflower = 1)
|
||||
@@ -731,7 +779,7 @@
|
||||
product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!"
|
||||
vend_delay = 15
|
||||
vend_reply = "Thank you for using AutoDrobe!"
|
||||
products = list(/obj/item/clothing/suit/chickensuit = 1,/obj/item/clothing/head/chicken = 1,/obj/item/clothing/under/gladiator = 1,
|
||||
products = list(/obj/item/clothing/suit/chickensuit = 1,/obj/item/clothing/head/chicken = 1, /obj/item/clothing/head/corgi = 1, /obj/item/clothing/suit/corgisuit = 1, /obj/item/clothing/under/gladiator = 1,
|
||||
/obj/item/clothing/head/helmet/gladiator = 1,/obj/item/clothing/under/gimmick/rank/captain/suit = 1,/obj/item/clothing/head/flatcap = 1,
|
||||
/obj/item/clothing/glasses/gglasses = 1,/obj/item/clothing/shoes/jackboots = 1,
|
||||
/obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/blackskirt = 1,/obj/item/clothing/head/beret = 1,
|
||||
@@ -747,15 +795,15 @@
|
||||
/obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
|
||||
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
|
||||
/obj/item/clothing/head/rabbitears =1) //Pretty much everything that had a chance to spawn.
|
||||
contraband = list(/obj/item/clothing/suit/cardborg = 1,/obj/item/clothing/head/cardborg = 1,/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1)
|
||||
contraband = list(/obj/item/clothing/suit/cardborg = 1,/obj/item/clothing/head/cardborg = 1,/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
|
||||
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/weapon/shield/riot/roman = 1)
|
||||
|
||||
refill_canister = /obj/item/weapon/vending_refill/autodrobe
|
||||
/obj/machinery/vending/dinnerware
|
||||
name = "Dinnerware"
|
||||
desc = "A kitchen and restaurant equipment vendor"
|
||||
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
|
||||
icon_state = "dinnerware"
|
||||
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/kitchen/utensil/fork = 6,/obj/item/weapon/kitchenknife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2)
|
||||
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/kitchen/utensil/fork = 6,/obj/item/weapon/kitchenknife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2,/obj/item/weapon/reagent_containers/food/condiment/pack/ketchup = 5,/obj/item/weapon/reagent_containers/food/condiment/pack/hotsauce = 5)
|
||||
contraband = list(/obj/item/weapon/kitchen/utensil/spoon = 2,/obj/item/weapon/kitchen/utensil/knife = 2,/obj/item/weapon/kitchen/rollingpin = 2, /obj/item/weapon/butch = 2)
|
||||
|
||||
/obj/machinery/vending/sovietsoda
|
||||
@@ -820,7 +868,7 @@
|
||||
/obj/machinery/vending/eva
|
||||
name = "Hardsuit Kits"
|
||||
desc = "Conversion kits for your alien hardsuit needs."
|
||||
products = list(/obj/item/weapon/modkit/tajaran = 6)
|
||||
products = list(/obj/item/weapon/modkit/tajaran = 6, /obj/item/weapon/modkit/unathi = 6)
|
||||
|
||||
|
||||
/obj/machinery/vending/sustenance
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
set_ready_state(0)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
@@ -81,10 +82,20 @@
|
||||
Bump(atom/A)
|
||||
A.bullet_act(src, def_zone)
|
||||
src.life -= 10
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")
|
||||
if(life <= 0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
name = "PBT \"Pacifier\" Mounted Taser"
|
||||
icon_state = "mecha_taser"
|
||||
@@ -186,7 +197,7 @@
|
||||
name = "LBX AC 10 \"Scattershot\""
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/midbullet
|
||||
projectile = /obj/item/projectile/bullet/midbullet10
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
|
||||
@@ -108,6 +108,12 @@
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else if(patient.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
|
||||
if(B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
C.images += holder
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS 10
|
||||
#define NUM_OF_POSTER_DESIGNS 21
|
||||
|
||||
/obj/item/weapon/contraband
|
||||
name = "contraband item"
|
||||
@@ -114,6 +114,39 @@ obj/structure/sign/poster/New(var/serial)
|
||||
if(10)
|
||||
name += " - Hacking Guide"
|
||||
desc += " This poster details the internal workings of the common Nanotrasen airlock."
|
||||
if(11)
|
||||
name += " - RIP Badger"
|
||||
desc += " This poster commemorates the day hundreds of badgers worldwide were sacrificed for the greater good."
|
||||
if(12)
|
||||
name += " - Ambrosia Vulgaris"
|
||||
desc += " This poster is lookin' pretty trippy man."
|
||||
if(13)
|
||||
name += " - Donut Corp."
|
||||
desc += " This poster is an advertisement for Donut Corp."
|
||||
if(14)
|
||||
name += " - EAT"
|
||||
desc += " This poster is advising that you eat."
|
||||
if(15)
|
||||
name += " - Tools"
|
||||
desc += " This poster is an advertisement for tools."
|
||||
if(16)
|
||||
name += " - Power"
|
||||
desc += " A poster all about power."
|
||||
if(17)
|
||||
name += " - Power to the People"
|
||||
desc += " Screw those EDF guys!"
|
||||
if(18)
|
||||
name += " - Communist state"
|
||||
desc += " All hail the Communist party!"
|
||||
if(19)
|
||||
name += " - Lamarr"
|
||||
desc += " This poster depicts Lamarr. Probably made by the research director."
|
||||
if(20)
|
||||
name += " - Borg Fancy"
|
||||
desc += " Being fancy can be for any borg, Just need a suit."
|
||||
if(21)
|
||||
name += " - Borg Fancy v2"
|
||||
desc += " Borg Fancy, Now only taking the most fancy."
|
||||
else
|
||||
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
|
||||
desc = "Why are you still here?"
|
||||
|
||||
@@ -1114,3 +1114,88 @@ steam.start() -- spawns the effect
|
||||
dmglevel = 3
|
||||
|
||||
if(dmglevel<4) holder.ex_act(dmglevel)
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
//////SPARKELS FIREWORKS
|
||||
/////////////////////////////////
|
||||
////////////////////////////
|
||||
/obj/effects/sparkels
|
||||
name = "sparkel"
|
||||
icon = 'icons/obj/fireworks.dmi'//findback
|
||||
icon_state = "sparkel"
|
||||
var/amount = 6.0
|
||||
anchored = 1.0
|
||||
mouse_opacity = 0
|
||||
/obj/effects/sparkels/New()
|
||||
..()
|
||||
var/icon/I = new(src.icon,src.icon_state)
|
||||
var/r = rand(0,255)
|
||||
var/g = rand(0,255)
|
||||
var/b = rand(0,255)
|
||||
world.log << "Colour , [r],[g],[b]"
|
||||
I.Blend(rgb(r,g,b),ICON_MULTIPLY)
|
||||
src.icon = I
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(3000,100)
|
||||
spawn (100)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effects/sparkels/Del()
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(3000,100)
|
||||
..()
|
||||
return
|
||||
/obj/effects/sparkels/Move()
|
||||
..()
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(3000,100)
|
||||
return
|
||||
|
||||
|
||||
/datum/effects/system/sparkel_spread
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
var/turf/location
|
||||
var/atom/holder
|
||||
var/total_sparks = 0 // To stop it being spammed and lagging!
|
||||
|
||||
/datum/effects/system/sparkel_spread/proc/set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effects/system/sparkel_spread/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
/datum/effects/system/sparkel_spread/proc/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
if(src.total_sparks > 20)
|
||||
return
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effects/sparkels/sparks = new(src.location)
|
||||
src.total_sparks++
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
spawn(20)
|
||||
del(sparks)
|
||||
src.total_sparks--
|
||||
+16
-17
@@ -542,29 +542,28 @@
|
||||
"\red You stab yourself in the eyes with [src]!" \
|
||||
)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/internal/eyes/eyes = H.internal_organs["eyes"]
|
||||
eyes.damage += rand(3,4)
|
||||
if(eyes.damage >= eyes.min_bruised_damage)
|
||||
if(M.stat != 2)
|
||||
if(eyes.robotic <= 1) //robot eyes bleeding might be a bit silly
|
||||
M << "\red Your eyes start to bleed profusely!"
|
||||
if(prob(50))
|
||||
if(M.stat != 2)
|
||||
M << "\red You drop what you're holding and clutch at your eyes!"
|
||||
M.drop_item()
|
||||
M.eye_blurry += 10
|
||||
M.Paralyse(1)
|
||||
M.Weaken(4)
|
||||
if (eyes.damage >= eyes.min_broken_damage)
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting.take_damage(7))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
M.eye_blurry += rand(3,4)
|
||||
M.eye_stat += rand(2,4)
|
||||
if (M.eye_stat >= 10)
|
||||
M.eye_blurry += 15+(0.1*M.eye_blurry)
|
||||
M.disabilities |= NEARSIGHTED
|
||||
if(M.stat != 2)
|
||||
M << "\red Your eyes start to bleed profusely!"
|
||||
if(prob(50))
|
||||
if(M.stat != 2)
|
||||
M << "\red You drop what you're holding and clutch at your eyes!"
|
||||
M.drop_item()
|
||||
M.eye_blurry += 10
|
||||
M.Paralyse(1)
|
||||
M.Weaken(4)
|
||||
if (prob(M.eye_stat - 10 + 1))
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= BLIND
|
||||
return
|
||||
|
||||
/obj/item/clean_blood()
|
||||
|
||||
@@ -26,7 +26,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/f_lum = 2 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
var/tnote[0] //Current Texts
|
||||
var/last_text //No text spamming
|
||||
var/last_honk //Also no honk spamming that's bad too
|
||||
var/ttone = "beep" //The ringtone!
|
||||
@@ -38,6 +38,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/cart = "" //A place to stick cartridge menu information
|
||||
var/detonate = 1 // Can the PDA be blown up?
|
||||
var/hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/active_conversation = null // New variable that allows us to only view a single conversation.
|
||||
var/list/conversations = list() // For keeping up with who we have PDA messsages from.
|
||||
var/newmessage = 0 //To remove hackish overlay check
|
||||
|
||||
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
|
||||
var/ownjob = null //related to above
|
||||
@@ -46,23 +49,23 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/medical
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-medical"
|
||||
icon_state = "pda-m"
|
||||
|
||||
/obj/item/device/pda/viro
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-virology"
|
||||
icon_state = "pda-v"
|
||||
|
||||
/obj/item/device/pda/engineering
|
||||
default_cartridge = /obj/item/weapon/cartridge/engineering
|
||||
icon_state = "pda-engineer"
|
||||
icon_state = "pda-e"
|
||||
|
||||
/obj/item/device/pda/security
|
||||
default_cartridge = /obj/item/weapon/cartridge/security
|
||||
icon_state = "pda-security"
|
||||
icon_state = "pda-s"
|
||||
|
||||
/obj/item/device/pda/detective
|
||||
default_cartridge = /obj/item/weapon/cartridge/detective
|
||||
icon_state = "pda-detective"
|
||||
icon_state = "pda-det"
|
||||
|
||||
/obj/item/device/pda/warden
|
||||
default_cartridge = /obj/item/weapon/cartridge/security
|
||||
@@ -70,12 +73,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/janitor
|
||||
default_cartridge = /obj/item/weapon/cartridge/janitor
|
||||
icon_state = "pda-janitor"
|
||||
icon_state = "pda-j"
|
||||
ttone = "slip"
|
||||
|
||||
/obj/item/device/pda/toxins
|
||||
default_cartridge = /obj/item/weapon/cartridge/signal/toxins
|
||||
icon_state = "pda-science"
|
||||
icon_state = "pda-tox"
|
||||
ttone = "boom"
|
||||
|
||||
/obj/item/device/pda/clown
|
||||
@@ -92,7 +95,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
default_cartridge = /obj/item/weapon/cartridge/head
|
||||
icon_state = "pda-hop"
|
||||
icon_state = "pda-h"
|
||||
|
||||
/obj/item/device/pda/heads/hop
|
||||
default_cartridge = /obj/item/weapon/cartridge/hop
|
||||
@@ -116,7 +119,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/captain
|
||||
default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
icon_state = "pda-captain"
|
||||
icon_state = "pda-c"
|
||||
detonate = 0
|
||||
//toff = 1
|
||||
|
||||
@@ -126,20 +129,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/quartermaster
|
||||
default_cartridge = /obj/item/weapon/cartridge/quartermaster
|
||||
icon_state = "pda-qm"
|
||||
icon_state = "pda-q"
|
||||
|
||||
/obj/item/device/pda/shaftminer
|
||||
icon_state = "pda-miner"
|
||||
|
||||
/obj/item/device/pda/syndicate
|
||||
default_cartridge = /obj/item/weapon/cartridge/syndicate
|
||||
icon_state = "pda-syndi"
|
||||
icon_state = "pda-syn"
|
||||
name = "Military PDA"
|
||||
owner = "John Doe"
|
||||
hidden = 1
|
||||
|
||||
/obj/item/device/pda/chaplain
|
||||
icon_state = "pda-chaplain"
|
||||
icon_state = "pda-holy"
|
||||
ttone = "holy"
|
||||
|
||||
/obj/item/device/pda/lawyer
|
||||
@@ -152,16 +155,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-hydro"
|
||||
|
||||
/obj/item/device/pda/roboticist
|
||||
icon_state = "pda-roboticist"
|
||||
icon_state = "pda-robot"
|
||||
|
||||
/obj/item/device/pda/librarian
|
||||
icon_state = "pda-library"
|
||||
icon_state = "pda-libb"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
|
||||
silent = 1 //Quiet in the library!
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
icon_state = "pda-clear"
|
||||
icon_state = "pda-transp"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
|
||||
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
|
||||
|
||||
@@ -169,19 +172,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-chef"
|
||||
|
||||
/obj/item/device/pda/bar
|
||||
icon_state = "pda-bartender"
|
||||
icon_state = "pda-bar"
|
||||
|
||||
/obj/item/device/pda/atmos
|
||||
default_cartridge = /obj/item/weapon/cartridge/atmos
|
||||
icon_state = "pda-atmos"
|
||||
icon_state = "pda-atmo"
|
||||
|
||||
/obj/item/device/pda/chemist
|
||||
default_cartridge = /obj/item/weapon/cartridge/chemistry
|
||||
icon_state = "pda-chemistry"
|
||||
icon_state = "pda-chem"
|
||||
|
||||
/obj/item/device/pda/geneticist
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-genetics"
|
||||
icon_state = "pda-gene"
|
||||
|
||||
|
||||
// Special AI/pAI PDAs that cannot explode.
|
||||
@@ -243,7 +246,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't do that because you are dead!"
|
||||
return
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[tnote]</body></html>"
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
|
||||
@@ -310,6 +319,172 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/* Notes for those wanting to modify this code or even understand it.
|
||||
There are two modes: New UI and a UI already existing.
|
||||
If the UI is new, you define your variables, if the ui already exists if it didn't have variables in data for what you want to add
|
||||
then it won't add it even if you make a data["blahblah"] for it. That's the reason for the = null all over the place, so that.
|
||||
ui.push_data(data) proc has to have the var structure already setup otherwise it can't push the update.
|
||||
|
||||
The exception to the "YOU HAVE TO DEFINE IT" rule is cartridges, we later force
|
||||
the ui to close if a cartridge is inserted so that never will be a problem.
|
||||
So there will never be a time a UI creation causes that to be a problem.
|
||||
*/
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main")
|
||||
var/title = "Personal Data Assistant"
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
|
||||
|
||||
data["owner"] = owner // Who is your daddy...
|
||||
data["ownjob"] = ownjob // ...and what does he do?
|
||||
|
||||
data["mode"] = mode // The current view
|
||||
data["scanmode"] = scanmode // Scanners
|
||||
data["fon"] = fon // Flashlight on?
|
||||
data["pai"] = (isnull(pai) ? 0 : 1) // pAI inserted?
|
||||
data["note"] = note // current pda notes
|
||||
data["silent"] = silent // does the pda make noise when it receives a message?
|
||||
data["toff"] = toff // is the messenger function turned off?
|
||||
data["active_conversation"] = active_conversation // Which conversation are we following right now?
|
||||
|
||||
|
||||
data["idInserted"] = (id ? 1 : 0)
|
||||
data["idLink"] = (id ? text("[id.registered_name], [id.assignment]") : "--------")
|
||||
|
||||
|
||||
if(cartridge)
|
||||
var/cartdata[0]
|
||||
|
||||
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
|
||||
cartdata["name"] = cartridge.name
|
||||
cartdata["access"] = list(\
|
||||
"access_security" = cartridge.access_security,\
|
||||
"access_engine" = cartridge.access_engine,\
|
||||
"access_atmos" = cartridge.access_atmos,\
|
||||
"access_medical" = cartridge.access_medical,\
|
||||
"access_clown" = cartridge.access_clown,\
|
||||
"access_mime" = cartridge.access_mime,\
|
||||
"access_janitor" = cartridge.access_janitor,\
|
||||
"access_quartermaster" = cartridge.access_quartermaster,\
|
||||
"access_hydroponics" = cartridge.access_hydroponics,\
|
||||
"access_reagent_scanner" = cartridge.access_reagent_scanner,\
|
||||
"access_remote_door" = cartridge.access_remote_door,\
|
||||
"access_status_display" = cartridge.access_status_display\
|
||||
)
|
||||
if(isnull(cartridge.radio))
|
||||
cartdata["radio"] = 0
|
||||
else
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
|
||||
cartdata["radio"] = 1
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/signal))
|
||||
cartdata["radio"] = 2
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/mule))
|
||||
cartdata["radio"] = 3
|
||||
|
||||
cartdata["type"] = cartridge.type
|
||||
cartdata["charges"] = cartridge.charges ? cartridge.charges : 0
|
||||
data["cartridge"] = cartdata
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data["stationTime"] = worldtime2text()
|
||||
data["newMessage"] = newmessage
|
||||
|
||||
|
||||
|
||||
var/convopdas[0]
|
||||
var/pdas[0]
|
||||
var/count = 0
|
||||
for (var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||
if (!P.owner||P.toff||P == src||P.hidden) continue
|
||||
if(conversations.Find("\ref[P]"))
|
||||
convopdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "1")))
|
||||
else
|
||||
pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0")))
|
||||
count++
|
||||
data["convopdas"] = convopdas
|
||||
data["pdas"] = pdas
|
||||
data["pda_count"] = count
|
||||
data["messagescount"] = tnote.len
|
||||
data["messages"] = tnote
|
||||
var/found = 0
|
||||
if(active_conversation)
|
||||
for(var/c in tnote)
|
||||
if(c["target"] == active_conversation)
|
||||
data["convo_name"] = c["owner"]
|
||||
data["convo_job"] = c["job"]
|
||||
found = 1
|
||||
break
|
||||
if(!found)
|
||||
data["convo_name"] = null
|
||||
data["convo_job"] = null
|
||||
|
||||
if(!ui || mode==41)
|
||||
data["manifest"] = data_core.get_manifest_json()
|
||||
|
||||
|
||||
if(!ui || mode==3)
|
||||
var/turf/T = get_turf_or_move(user.loc)
|
||||
if(!isnull(T))
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
if (total_moles)
|
||||
var/o2_level = environment.oxygen/total_moles
|
||||
var/n2_level = environment.nitrogen/total_moles
|
||||
var/co2_level = environment.carbon_dioxide/total_moles
|
||||
var/plasma_level = environment.toxins/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
|
||||
data["aircontents"] = list(\
|
||||
"pressure" = "[round(pressure,0.1)]",\
|
||||
"nitrogen" = "[round(n2_level*100,0.1)]",\
|
||||
"oxygen" = "[round(o2_level*100,0.1)]",\
|
||||
"carbon_dioxide" = "[round(co2_level*100,0.1)]",\
|
||||
"plasma" = "[round(plasma_level*100,0.01)]",\
|
||||
"other" = "[round(unknown_level, 0.01)]",\
|
||||
"temp" = "[round(environment.temperature-T0C,0.1)]",\
|
||||
"reading" = 1\
|
||||
)
|
||||
if(isnull(data["aircontents"]))
|
||||
data["aircontents"] = list(\
|
||||
"pressure" = null,\
|
||||
"nitrogen" = null,\
|
||||
"oxygen" = null,\
|
||||
"carbon_dioxide" = null,\
|
||||
"plasma" = null,\
|
||||
"other" = null,\
|
||||
"temp" = null,\
|
||||
"reading" = 0\
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
else
|
||||
// The UI is already open so push the new data to it
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//NOTE: graphic resources are loaded on client login
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
|
||||
@@ -318,209 +493,26 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(active_uplink_check(user))
|
||||
return
|
||||
|
||||
var/dat = "<html><head><title>Personal Data Assistant</title></head><body bgcolor=\"#808000\"><style>a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}</style>"
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Close'><img src=pda_exit.png> Close</a>"
|
||||
|
||||
if ((!isnull(cartridge)) && (mode == 0))
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><img src=pda_eject.png> Eject [cartridge]</a>"
|
||||
if (mode)
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png> Return</a>"
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Refresh</a>"
|
||||
|
||||
dat += "<br>"
|
||||
|
||||
if (!owner)
|
||||
dat += "Warning: No owner information entered. Please swipe card.<br><br>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Retry</a>"
|
||||
else
|
||||
switch (mode)
|
||||
if (0)
|
||||
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
|
||||
dat += "Owner: [owner], [ownjob]<br>"
|
||||
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
|
||||
dat += text("<br><A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br>")
|
||||
|
||||
dat += "Station Time: [worldtime2text()]"//:[world.time / 100 % 6][world.time / 100 % 10]"
|
||||
|
||||
dat += "<br><br>"
|
||||
|
||||
dat += "<h4>General Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
|
||||
//dat += "<li><a href='byond://?src=\red[src];choice=chatroom'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
|
||||
|
||||
if (cartridge)
|
||||
if (cartridge.access_clown)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><img src=pda_honk.png> Honk Synthesizer</a></li>"
|
||||
if(cartridge.access_status_display)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=42'><img src=pda_status.png> Set Status Display</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_engine)
|
||||
dat += "<h4>Engineering Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=43'><img src=pda_power.png> Power Monitor</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_medical)
|
||||
dat += "<h4>Medical Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=44'><img src=pda_medical.png> Medical Records</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Medical Scan'><img src=pda_scanner.png> [scanmode == 1 ? "Disable" : "Enable"] Medical Scanner</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_security)
|
||||
dat += "<h4>Security Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=46'><img src=pda_cuffs.png> Security Bot Access</a></li>"
|
||||
dat += "</ul>"
|
||||
else dat += "</ul>"
|
||||
if(cartridge.access_quartermaster)
|
||||
dat += "<h4>Quartermaster Functions:</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png> Supply Records</A></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=48'><img src=pda_mule.png> Delivery Bot Control</A></li>"
|
||||
dat += "</ul>"
|
||||
dat += "</ul>"
|
||||
|
||||
dat += "<h4>Utilities</h4>"
|
||||
dat += "<ul>"
|
||||
if (cartridge)
|
||||
if (cartridge.access_janitor)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=49'><img src=pda_bucket.png> Custodial Locator</a></li>"
|
||||
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
|
||||
if (cartridge.access_reagent_scanner)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
|
||||
if (cartridge.access_engine)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png> [scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
|
||||
if (cartridge.access_atmos)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
|
||||
if (cartridge.access_remote_door)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
|
||||
if (pai)
|
||||
if(pai.loc != src)
|
||||
pai = null
|
||||
else
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"
|
||||
dat += "</ul>"
|
||||
|
||||
if (1)
|
||||
dat += "<h4><img src=pda_notes.png> Notekeeper V2.1</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
|
||||
dat += note
|
||||
|
||||
if (2)
|
||||
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png> Ringer: [silent == 1 ? "Off" : "On"]</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png> Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
|
||||
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
|
||||
dat += "<ul>"
|
||||
|
||||
var/count = 0
|
||||
|
||||
if (!toff)
|
||||
for (var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||
if (!P.owner||P.toff||P == src||P.hidden) continue
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><img src=pda_honk.png>*Send Virus*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
if (count == 0)
|
||||
dat += "None detected.<br>"
|
||||
|
||||
if(21)
|
||||
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png> Clear Messages</a>"
|
||||
|
||||
dat += "<h4><img src=pda_mail.png> Messages</h4>"
|
||||
|
||||
dat += tnote
|
||||
dat += "<br>"
|
||||
|
||||
if (3)
|
||||
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
||||
|
||||
var/turf/T = get_turf_or_move(user.loc)
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
|
||||
|
||||
if (total_moles)
|
||||
var/o2_level = environment.oxygen/total_moles
|
||||
var/n2_level = environment.nitrogen/total_moles
|
||||
var/co2_level = environment.carbon_dioxide/total_moles
|
||||
var/plasma_level = environment.toxins/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
|
||||
dat += "Nitrogen: [round(n2_level*100)]%<br>"
|
||||
dat += "Oxygen: [round(o2_level*100)]%<br>"
|
||||
dat += "Carbon Dioxide: [round(co2_level*100)]%<br>"
|
||||
dat += "Plasma: [round(plasma_level*100)]%<br>"
|
||||
if(unknown_level > 0.01)
|
||||
dat += "OTHER: [round(unknown_level)]%<br>"
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
|
||||
if (5)
|
||||
dat += "<h4><img src=pda_chatroom.png> Nanotrasen Relay Chat</h4>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected Channels</h4>: <li>"
|
||||
for(var/datum/chatroom/C in chatrooms)
|
||||
dat += "<a href='byond://?src=\ref[src];pdachannel=[C.name]'>#[html_encode(lowertext(C.name))]"
|
||||
if(C.password != "")
|
||||
dat += " <img src=pda_locked.png>"
|
||||
dat += "</li>"
|
||||
|
||||
if (41) //crew manifest
|
||||
dat += "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||
dat += "Entries cannot be modified from this terminal.<br><br>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(1) // make it monochrome
|
||||
dat += "<br>"
|
||||
|
||||
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
|
||||
dat += cart
|
||||
|
||||
dat += "</body></html>"
|
||||
user << browse(dat, "window=pda;size=400x444;border=1;can_resize=1;can_close=0;can_minimize=0")
|
||||
onclose(user, "pda", src)
|
||||
ui_interact(user) //NanoUI requires this proc
|
||||
return
|
||||
|
||||
/obj/item/device/pda/Topic(href, href_list)
|
||||
if(href_list["cartmenu"] && !isnull(cartridge))
|
||||
cartridge.Topic(href, href_list)
|
||||
return 1
|
||||
if(href_list["radiomenu"] && !isnull(cartridge) && !isnull(cartridge.radio))
|
||||
cartridge.radio.Topic(href, href_list)
|
||||
return 1
|
||||
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
if (usr.stat == DEAD)
|
||||
return 0
|
||||
|
||||
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
|
||||
|
||||
add_fingerprint(U)
|
||||
@@ -532,7 +524,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if("Close")//Self explanatory
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Refresh")//Refresh, goes to the end of the proc.
|
||||
if("Return")//Return
|
||||
@@ -540,11 +532,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
mode = 0
|
||||
else
|
||||
mode = round(mode/10)
|
||||
if(mode==2)
|
||||
active_conversation = null
|
||||
if(mode==4)//Fix for cartridges. Redirects to hub.
|
||||
mode = 0
|
||||
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
id_check(U, 1)
|
||||
if("UpdateInfo")
|
||||
@@ -556,6 +549,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
cartridge.loc = T
|
||||
ui.close()
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
@@ -627,58 +622,80 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
note = replacetext(n, "\n", "<BR>")
|
||||
notehtml = n
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
ui.close()
|
||||
if("Toggle Messenger")
|
||||
toff = !toff
|
||||
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
|
||||
silent = !silent
|
||||
if("Clear")//Clears messages
|
||||
tnote = null
|
||||
if(href_list["option"] == "All")
|
||||
tnote.Cut()
|
||||
conversations.Cut()
|
||||
if(href_list["option"] == "Convo")
|
||||
var/new_tnote[0]
|
||||
for(var/i in tnote)
|
||||
if(i["target"] != active_conversation)
|
||||
new_tnote[++new_tnote.len] = i
|
||||
tnote = new_tnote
|
||||
conversations.Remove(active_conversation)
|
||||
|
||||
active_conversation = null
|
||||
if(mode==21)
|
||||
mode=2
|
||||
|
||||
if("Ringtone")
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, trim(lowertext(t)), trim(lowertext(lock_code))))
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
|
||||
U << "The PDA softly beeps."
|
||||
U << browse(null, "window=pda")
|
||||
src.mode = 0
|
||||
ui.close()
|
||||
else
|
||||
t = copytext(sanitize(t), 1, 20)
|
||||
ttone = t
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Message")
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
src.create_message(U, P)
|
||||
if(mode == 2)
|
||||
active_conversation = href_list["target"]
|
||||
mode = 21
|
||||
|
||||
if("Select Conversation")
|
||||
var/P = href_list["convo"]
|
||||
for(var/n in conversations)
|
||||
if(P == n)
|
||||
active_conversation=P
|
||||
mode=21
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:honk_charges > 0)
|
||||
cartridge:honk_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Send Silence")//Silent virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:mime_charges > 0)
|
||||
cartridge:mime_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
|
||||
@@ -697,8 +714,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:shock_charges > 0)
|
||||
cartridge:shock_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
|
||||
var/difficulty = 0
|
||||
|
||||
@@ -715,16 +732,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
else if (prob(difficulty * 3))
|
||||
U.show_message("\red Energy feeds back into your [src]!", 1)
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
explode()
|
||||
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
|
||||
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
|
||||
else
|
||||
U.show_message("\blue Success!", 1)
|
||||
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded")
|
||||
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1)
|
||||
P.explode()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
//pAI FUNCTIONS===================================
|
||||
@@ -736,33 +757,31 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
if(T)
|
||||
pai.loc = T
|
||||
pai = null
|
||||
|
||||
//LINK FUNCTIONS===================================
|
||||
|
||||
else//Cartridge menu linking
|
||||
else
|
||||
mode = text2num(href_list["choice"])
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if(cartridge)
|
||||
cartridge.mode = mode
|
||||
|
||||
|
||||
else//If not in range or not using the pda.
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
overlays.Cut()
|
||||
newmessage = 0
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
if (id)
|
||||
@@ -821,19 +840,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U << "ERROR: Cannot reach recepient."
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
|
||||
P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]")))
|
||||
if(!conversations.Find("\ref[P]"))
|
||||
conversations.Add("\ref[P]")
|
||||
if(!P.conversations.Find("\ref[src]"))
|
||||
P.conversations.Add("\ref[src]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
who = P.owner
|
||||
for(var/mob/living/silicon/ai/ai in mob_list)
|
||||
// Allows other AIs to intercept the message but the AI won't intercept their own message.
|
||||
if(ai.aiPDA != P && ai.aiPDA != src)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
@@ -846,12 +870,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
L = get(P, /mob/living/silicon)
|
||||
|
||||
|
||||
if(L)
|
||||
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
P.newmessage = 1
|
||||
else
|
||||
U << "<span class='notice'>ERROR: Messaging server is not responding.</span>"
|
||||
|
||||
@@ -921,12 +947,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
cartridge = C
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
if(ui)
|
||||
ui.close()
|
||||
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
@@ -1130,8 +1159,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
|
||||
if ((istype(M, /mob/living/carbon/human) && (M.real_name != src.owner) && (istype(src.cartridge, /obj/item/weapon/cartridge/clown))))
|
||||
if (src.cartridge:honk_charges < 5)
|
||||
src.cartridge:honk_charges++
|
||||
if (src.cartridge.charges < 5)
|
||||
src.cartridge.charges++
|
||||
|
||||
M.stop_pulling()
|
||||
M << "\blue You slipped on the PDA!"
|
||||
@@ -1174,7 +1203,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/weapon/storage/box/PDAs
|
||||
name = "spare PDAs"
|
||||
desc = "A box of spare PDA microcomputers."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "pdabox"
|
||||
|
||||
New()
|
||||
@@ -1195,4 +1224,4 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
|
||||
/obj/item/device/pda/emp_act(severity)
|
||||
for(var/atom/A in src)
|
||||
A.emp_act(severity)
|
||||
A.emp_act(severity)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,15 +31,6 @@
|
||||
|
||||
frequency.post_signal(src, signal, filter = s_filter)
|
||||
|
||||
proc/print_to_host(var/text)
|
||||
if (isnull(src.hostpda))
|
||||
return
|
||||
src.hostpda.cart = text
|
||||
|
||||
for (var/mob/M in viewers(1, src.hostpda.loc))
|
||||
if (M.client && M.machine == src.hostpda)
|
||||
src.hostpda.cartridge.unlock()
|
||||
|
||||
return
|
||||
|
||||
proc/generate_menu()
|
||||
@@ -107,7 +98,6 @@
|
||||
if("summon")
|
||||
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , s_filter = RADIO_SECBOT)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = RADIO_SECBOT)
|
||||
PDA.cartridge.unlock()
|
||||
|
||||
/obj/item/radio/integrated/mule
|
||||
var/list/botlist = null // list of bots
|
||||
@@ -163,7 +153,6 @@
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
var/obj/item/device/pda/PDA = src.hostpda
|
||||
var/cmd = "command"
|
||||
if(active) cmd = "command [active.suffix]"
|
||||
|
||||
@@ -208,7 +197,6 @@
|
||||
if("stop", "go", "home")
|
||||
post_signal(control_freq, cmd, href_list["op"], s_filter = RADIO_MULEBOT)
|
||||
post_signal(control_freq, cmd, "bot_status", s_filter = RADIO_MULEBOT)
|
||||
PDA.cartridge.unlock()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
|
||||
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
flick("flash", M.flash) //Yes, you can still get flashed wit X-Ray.
|
||||
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(!M.blinded)
|
||||
@@ -104,6 +105,8 @@
|
||||
desc = "A pen-sized light, used by medical staff."
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
brightness_on = 2
|
||||
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
else if(prob(50))
|
||||
severity -= 1
|
||||
severity = min(max(severity, 0), 4)
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
|
||||
switch(severity)
|
||||
if(0)
|
||||
@@ -87,26 +89,26 @@
|
||||
C << "<span class='info'>A small, bright dot appears in your vision.</span>"
|
||||
if(1)
|
||||
//industrial grade eye protection
|
||||
C.eye_stat += rand(0, 2)
|
||||
E.damage += rand(0, 2)
|
||||
C << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
if(2)
|
||||
//basic eye protection (sunglasses)
|
||||
flick("flash", C.flash)
|
||||
C.eye_stat += rand(1, 6)
|
||||
E.damage += rand(1, 6)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
if(3)
|
||||
//no eye protection
|
||||
if(prob(2))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash)
|
||||
C.eye_stat += rand(3, 7)
|
||||
E.damage += rand(3, 7)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
if(4)
|
||||
//the effect has been worsened by something
|
||||
if(prob(5))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash)
|
||||
C.eye_stat += rand(5, 10)
|
||||
E.damage += rand(5, 10)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
else
|
||||
outmsg = "<span class='notice'>You fail to blind [C] by shining [src] at their eyes.</span>"
|
||||
|
||||
@@ -8,122 +8,286 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
/obj/item/device/uplink
|
||||
var/welcome // Welcoming menu message
|
||||
var/items // List of items
|
||||
var/item_data // raw item text
|
||||
var/list/ItemList // Parsed list of items
|
||||
var/uses // Numbers of crystals
|
||||
var/nanoui_items[0]
|
||||
// List of items not to shove in their hands.
|
||||
var/list/purchase_log = list()
|
||||
var/show_description = null
|
||||
var/active = 0
|
||||
var/job = null
|
||||
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
..()
|
||||
welcome = ticker.mode.uplink_welcome
|
||||
if(!item_data)
|
||||
items = replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
|
||||
else
|
||||
items = replacetext(item_data)
|
||||
ItemList = text2list(src.items, ";") // Parsing the items text string
|
||||
uses = ticker.mode.uplink_uses
|
||||
nanoui_items = generate_nanoui_items()
|
||||
|
||||
/*
|
||||
Built the Items List for use with NanoUI
|
||||
*/
|
||||
|
||||
/obj/item/device/uplink/proc/generate_nanoui_items()
|
||||
var/items_nano[0]
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len != 3) //If it is not an actual item, make a break in the menu.
|
||||
if(O.len == 1) //If there is one item, it's probably a title
|
||||
items_nano[++items_nano.len] = list("Category" = "[O[1]]", "items" = list())
|
||||
continue
|
||||
|
||||
var/path_text = O[1]
|
||||
var/cost = text2num(O[2])
|
||||
|
||||
var/path_obj = text2path(path_text)
|
||||
|
||||
// Because we're using strings, this comes up if item paths change.
|
||||
// Failure to handle this error borks uplinks entirely. -Sayu
|
||||
if(!path_obj)
|
||||
error("Syndicate item is not a valid path: [path_text]")
|
||||
else
|
||||
var/itemname = O[3]
|
||||
items_nano[items_nano.len]["items"] += list(list("Name" = itemname, "Cost" = cost, "obj_path" = path_text))
|
||||
|
||||
return items_nano
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Let's build a menu!
|
||||
/obj/item/device/uplink/proc/generate_menu(mob/user as mob)
|
||||
if(!job)
|
||||
job = user.mind.assigned_role
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
|
||||
var/dat = "<B>[src.welcome]</B><BR>"
|
||||
dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Request item:</B><BR>"
|
||||
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:26: dat += "Tele-Crystals left: [src.uses]<BR>"
|
||||
dat += {"Tele-Crystals left: [src.uses]<BR>
|
||||
<HR>
|
||||
<B>Request item:</B><BR>
|
||||
<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"}
|
||||
// END AUTOFIX
|
||||
var/list/buyable_items = get_uplink_items()
|
||||
var/cost
|
||||
var/item
|
||||
var/name
|
||||
var/path_obj
|
||||
var/path_text
|
||||
var/category_items = 1 //To prevent stupid :P
|
||||
|
||||
// Loop through categories
|
||||
var/index = 0
|
||||
for(var/category in buyable_items)
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len != 3) //If it is not an actual item, make a break in the menu.
|
||||
if(O.len == 1) //If there is one item, it's probably a title
|
||||
dat += "<b>[O[1]]</b><br>"
|
||||
category_items = 0
|
||||
else //Else, it's a white space.
|
||||
if(category_items < 1) //If there were no itens in the last category...
|
||||
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
|
||||
dat += "<br>"
|
||||
continue
|
||||
|
||||
index++
|
||||
dat += "<b>[category]</b><br>"
|
||||
path_text = O[1]
|
||||
cost = text2num(O[2])
|
||||
|
||||
var/i = 0
|
||||
if(cost>uses)
|
||||
continue
|
||||
|
||||
// Loop through items in category
|
||||
for(var/datum/uplink_item/item in buyable_items[category])
|
||||
i++
|
||||
path_obj = text2path(path_text)
|
||||
|
||||
var/cost_text = ""
|
||||
var/desc = "[item.desc]"
|
||||
if(item.job && item.job.len)
|
||||
if(!(item.job.Find(job)))
|
||||
//world.log << "Skipping job item that doesn't match"
|
||||
continue
|
||||
else
|
||||
//world.log << "Found matching job item"
|
||||
if(item.cost > 0)
|
||||
cost_text = "([item.cost])"
|
||||
if(item.cost <= uses)
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[category]:[i];'>[item.name]</A> [cost_text] "
|
||||
else
|
||||
dat += "<font color='grey'><i>[item.name] [cost_text] </i></font>"
|
||||
if(item.desc)
|
||||
if(show_description == 2)
|
||||
dat += "<A href='byond://?src=\ref[src];show_desc=1'><font size=2>\[-\]</font></A><BR><font size=2>[desc]</font>"
|
||||
else
|
||||
dat += "<A href='byond://?src=\ref[src];show_desc=2'><font size=2>\[?\]</font></A>"
|
||||
dat += "<BR>"
|
||||
// Because we're using strings, this comes up if item paths change.
|
||||
// Failure to handle this error borks uplinks entirely. -Sayu
|
||||
if(!path_obj)
|
||||
error("Syndicate item is not a valid path: [path_text]")
|
||||
else
|
||||
item = new path_obj()
|
||||
name = O[3]
|
||||
del item
|
||||
|
||||
// Break up the categories, if it isn't the last.
|
||||
if(buyable_items.len != index)
|
||||
dat += "<br>"
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
|
||||
category_items++
|
||||
|
||||
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
|
||||
dat += "<HR>"
|
||||
return dat
|
||||
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/interact(mob/user as mob)
|
||||
//If 'random' was selected
|
||||
/obj/item/device/uplink/proc/chooseRandomItem()
|
||||
var/list/randomItems = list()
|
||||
|
||||
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
|
||||
dat += src.generate_menu(user)
|
||||
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
||||
//Add only items the player can afford:
|
||||
if(uses > 19)
|
||||
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\objects\items\devices\uplinks.dm:72: dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
|
||||
dat += {"<A href='byond://?src=\ref[src];lock=1'>Lock</a>
|
||||
</font></body>"}
|
||||
// END AUTOFIX
|
||||
user << browse(dat, "window=hidden")
|
||||
onclose(user, "hidden")
|
||||
return
|
||||
if(uses > 9)
|
||||
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_uplink") //Uplink Implanter
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
|
||||
|
||||
//if(uses > 8) //Nothing... yet.
|
||||
//if(uses > 7) //Nothing... yet.
|
||||
|
||||
if(uses > 6)
|
||||
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
|
||||
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
|
||||
|
||||
if(uses > 5)
|
||||
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
|
||||
|
||||
if(uses > 4)
|
||||
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
|
||||
randomItems.Add("/obj/item/device/powersink") //Powersink
|
||||
|
||||
if(uses > 3)
|
||||
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
|
||||
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
|
||||
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
|
||||
|
||||
if(uses > 2)
|
||||
randomItems.Add("/obj/item/weapon/storage/box/emps") //EMP Grenades
|
||||
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
|
||||
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
|
||||
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
|
||||
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
|
||||
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/space") //Syndicate Space Suit
|
||||
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndie_kit/imp_freedom") //Freedom Implant
|
||||
randomItems.Add("/obj/item/clothing/glasses/thermal/syndi") //Thermal Imaging Goggles
|
||||
|
||||
if(uses > 1)
|
||||
/*
|
||||
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
|
||||
var/hasRevolver = 0
|
||||
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
|
||||
if(istype(I,/obj/item/weapon/gun/projectile))
|
||||
hasRevolver = 1
|
||||
|
||||
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
*/
|
||||
randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
|
||||
randomItems.Add("/obj/item/weapon/plastique") //C4
|
||||
|
||||
if(uses > 0)
|
||||
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
|
||||
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
|
||||
|
||||
if(!randomItems.len)
|
||||
del(randomItems)
|
||||
return 0
|
||||
else
|
||||
var/buyItem = pick(randomItems)
|
||||
|
||||
switch(buyItem) //Ok, this gets a little messy, sorry.
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
uses -= 20
|
||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/box/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
||||
uses -= 10
|
||||
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
|
||||
uses -= 7
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
uses -= 6
|
||||
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
|
||||
uses -= 5
|
||||
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
|
||||
uses -= 4
|
||||
if("/obj/item/weapon/storage/box/emps" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
|
||||
"/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/box/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
|
||||
"/obj/item/weapon/storage/box/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
|
||||
uses -= 3
|
||||
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique", "/obj/item/weapon/card/id/syndicate")
|
||||
uses -= 2
|
||||
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
||||
uses -= 1
|
||||
del(randomItems)
|
||||
return buyItem
|
||||
|
||||
/obj/item/device/uplink/proc/handleStatTracking(var/boughtItem)
|
||||
//For stat tracking, sorry for making it so ugly
|
||||
if(!boughtItem) return
|
||||
|
||||
switch(boughtItem)
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
feedback_add_details("traitor_uplink_items_bought","TP")
|
||||
if("/obj/item/toy/syndicateballoon")
|
||||
feedback_add_details("traitor_uplink_items_bought","BS")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/imp_uplink")
|
||||
feedback_add_details("traitor_uplink_items_bought","UI")
|
||||
if("/obj/item/weapon/storage/box/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","BU")
|
||||
if("/obj/item/weapon/aiModule/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AI")
|
||||
if("/obj/item/device/radio/beacon/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","SB")
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
feedback_add_details("traitor_uplink_items_bought","RE")
|
||||
if("/obj/item/weapon/gun/energy/crossbow")
|
||||
feedback_add_details("traitor_uplink_items_bought","XB")
|
||||
if("/obj/item/device/powersink")
|
||||
feedback_add_details("traitor_uplink_items_bought","PS")
|
||||
if("/obj/item/weapon/melee/energy/sword")
|
||||
feedback_add_details("traitor_uplink_items_bought","ES")
|
||||
if("/obj/item/clothing/mask/gas/voice")
|
||||
feedback_add_details("traitor_uplink_items_bought","VC")
|
||||
if("/obj/item/device/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CP")
|
||||
if("/obj/item/weapon/storage/box/emps")
|
||||
feedback_add_details("traitor_uplink_items_bought","EM")
|
||||
if("/obj/item/weapon/pen/paralysis")
|
||||
feedback_add_details("traitor_uplink_items_bought","PP")
|
||||
if("/obj/item/weapon/cartridge/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","DC")
|
||||
if("/obj/item/clothing/under/chameleon")
|
||||
feedback_add_details("traitor_uplink_items_bought","CJ")
|
||||
if("/obj/item/weapon/card/id/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","AC")
|
||||
if("/obj/item/weapon/card/emag")
|
||||
feedback_add_details("traitor_uplink_items_bought","EC")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/space")
|
||||
feedback_add_details("traitor_uplink_items_bought","SS")
|
||||
if("/obj/item/device/encryptionkey/binary")
|
||||
feedback_add_details("traitor_uplink_items_bought","BT")
|
||||
if("/obj/item/weapon/storage/box/syndie_kit/imp_freedom")
|
||||
feedback_add_details("traitor_uplink_items_bought","FI")
|
||||
if("/obj/item/clothing/glasses/thermal/syndi")
|
||||
feedback_add_details("traitor_uplink_items_bought","TM")
|
||||
if("/obj/item/ammo_magazine/a357")
|
||||
feedback_add_details("traitor_uplink_items_bought","RA")
|
||||
if("/obj/item/clothing/shoes/syndigaloshes")
|
||||
feedback_add_details("traitor_uplink_items_bought","SH")
|
||||
if("/obj/item/weapon/plastique")
|
||||
feedback_add_details("traitor_uplink_items_bought","C4")
|
||||
if("/obj/item/weapon/soap/syndie")
|
||||
feedback_add_details("traitor_uplink_items_bought","SP")
|
||||
if("/obj/item/weapon/storage/toolbox/syndicate")
|
||||
feedback_add_details("traitor_uplink_items_bought","ST")
|
||||
|
||||
/obj/item/device/uplink/Topic(href, href_list)
|
||||
..()
|
||||
if(!active)
|
||||
return
|
||||
|
||||
if (href_list["buy_item"])
|
||||
|
||||
var/item = href_list["buy_item"]
|
||||
var/list/split = stringsplit(item, ":") // throw away variable
|
||||
|
||||
if(split.len == 2)
|
||||
// Collect category and number
|
||||
var/category = split[1]
|
||||
var/number = text2num(split[2])
|
||||
|
||||
var/list/buyable_items = get_uplink_items()
|
||||
|
||||
var/list/uplink = buyable_items[category]
|
||||
if(uplink && uplink.len >= number)
|
||||
var/datum/uplink_item/I = uplink[number]
|
||||
if(I)
|
||||
I.buy(src, usr)
|
||||
if(href_list["buy_item"] == "random")
|
||||
var/boughtItem = chooseRandomItem()
|
||||
if(boughtItem)
|
||||
href_list["buy_item"] = boughtItem
|
||||
feedback_add_details("traitor_uplink_items_bought","RN")
|
||||
return 1
|
||||
else
|
||||
var/text = "[key_name(usr)] tried to purchase an uplink item that doesn't exist"
|
||||
var/textalt = "[key_name(usr)] tried to purchase an uplink item that doesn't exist [item]"
|
||||
message_admins(text)
|
||||
log_game(textalt)
|
||||
admin_log.Add(textalt)
|
||||
return 0
|
||||
|
||||
else
|
||||
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
||||
return 0
|
||||
|
||||
//if(usr:mind && ticker.mode.traitors[usr:mind])
|
||||
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
|
||||
//info.spawnlist += href_list["buy_item"]
|
||||
|
||||
uses -= text2num(href_list["cost"])
|
||||
handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
|
||||
return 1
|
||||
|
||||
|
||||
else if(href_list["show_desc"])
|
||||
show_description = text2num(href_list["show_desc"])
|
||||
interact(usr)
|
||||
|
||||
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
|
||||
/* How to create an uplink in 3 easy steps!
|
||||
@@ -140,13 +304,15 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
/obj/item/device/uplink/hidden
|
||||
name = "Hidden Uplink."
|
||||
desc = "There is something wrong if you're examining this."
|
||||
var/active = 0
|
||||
var/list/purchase_log = list()
|
||||
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
spawn(2)
|
||||
if(!istype(src.loc, /obj/item))
|
||||
del(src)
|
||||
..()
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
return 1
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
@@ -167,6 +333,60 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/*
|
||||
NANO UI FOR UPLINK WOOP WOOP
|
||||
*/
|
||||
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main")
|
||||
var/title = "Syndicate Uplink"
|
||||
var/data[0]
|
||||
|
||||
data["crystals"] = uses
|
||||
data["nano_items"] = nanoui_items
|
||||
data["welcome"] = welcome
|
||||
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
else
|
||||
// The UI is already open so push the new data to it
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/hidden/interact(mob/user)
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 0
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
ui.close()
|
||||
return 1
|
||||
|
||||
if(..(href, href_list) == 1)
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
var/obj/I = new path_obj(get_turf(usr))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/A = usr
|
||||
A.put_in_any_hand_if_possible(I)
|
||||
purchase_log += "[usr] ([usr.ckey]) bought [I]."
|
||||
interact(usr)
|
||||
return 1
|
||||
|
||||
// I placed this here because of how relevant it is.
|
||||
// You place this in your uplinkable item to check if an uplink is active or not.
|
||||
// If it is, it will display the uplink menu and return 1, else it'll return false.
|
||||
@@ -207,3 +427,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.shoes)
|
||||
if((!H.wear_suit) || !(H.wear_suit.body_parts_covered & FEET))
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
|
||||
@@ -126,7 +126,7 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
perunit = 2000
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/pcrate, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
|
||||
@@ -132,6 +132,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user