Merge pull request #4337 from Baystation12/dev-freeze

0.1.8 Staging [Do not merge]
This commit is contained in:
DJSnapshot
2014-01-31 12:40:15 -08:00
260 changed files with 9783 additions and 8358 deletions

View File

@@ -179,8 +179,13 @@
#include "code\game\area\areas.dm" #include "code\game\area\areas.dm"
#include "code\game\area\Space Station 13 areas.dm" #include "code\game\area\Space Station 13 areas.dm"
#include "code\game\dna\dna2.dm" #include "code\game\dna\dna2.dm"
#include "code\game\dna\dna2_domutcheck.dm"
#include "code\game\dna\dna2_helpers.dm" #include "code\game\dna\dna2_helpers.dm"
#include "code\game\dna\dna_modifier.dm" #include "code\game\dna\dna_modifier.dm"
#include "code\game\dna\genes\disabilities.dm"
#include "code\game\dna\genes\gene.dm"
#include "code\game\dna\genes\monkey.dm"
#include "code\game\dna\genes\powers.dm"
#include "code\game\gamemodes\events.dm" #include "code\game\gamemodes\events.dm"
#include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\factions.dm"
#include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\game_mode.dm"
@@ -440,6 +445,7 @@
#include "code\game\objects\effects\decals\Cleanable\humans.dm" #include "code\game\objects\effects\decals\Cleanable\humans.dm"
#include "code\game\objects\effects\decals\Cleanable\misc.dm" #include "code\game\objects\effects\decals\Cleanable\misc.dm"
#include "code\game\objects\effects\decals\Cleanable\robots.dm" #include "code\game\objects\effects\decals\Cleanable\robots.dm"
#include "code\game\objects\effects\decals\Cleanable\tracks.dm"
#include "code\game\objects\effects\spawners\bombspawner.dm" #include "code\game\objects\effects\spawners\bombspawner.dm"
#include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\effects\spawners\vaultspawner.dm" #include "code\game\objects\effects\spawners\vaultspawner.dm"
@@ -613,6 +619,7 @@
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm"
@@ -782,6 +789,7 @@
#include "code\modules\economy\TradeDestinations.dm" #include "code\modules\economy\TradeDestinations.dm"
#include "code\modules\events\alien_infestation.dm" #include "code\modules\events\alien_infestation.dm"
#include "code\modules\events\blob.dm" #include "code\modules\events\blob.dm"
#include "code\modules\events\borers.dm"
#include "code\modules\events\brand_intelligence.dm" #include "code\modules\events\brand_intelligence.dm"
#include "code\modules\events\carp_migration.dm" #include "code\modules\events\carp_migration.dm"
#include "code\modules\events\comms_blackout.dm" #include "code\modules\events\comms_blackout.dm"
@@ -1102,6 +1110,7 @@
#include "code\modules\projectiles\guns\projectile\pistol.dm" #include "code\modules\projectiles\guns\projectile\pistol.dm"
#include "code\modules\projectiles\guns\projectile\pneumatic.dm" #include "code\modules\projectiles\guns\projectile\pneumatic.dm"
#include "code\modules\projectiles\guns\projectile\revolver.dm" #include "code\modules\projectiles\guns\projectile\revolver.dm"
#include "code\modules\projectiles\guns\projectile\rocket.dm"
#include "code\modules\projectiles\guns\projectile\shotgun.dm" #include "code\modules\projectiles\guns\projectile\shotgun.dm"
#include "code\modules\projectiles\projectile\animate.dm" #include "code\modules\projectiles\projectile\animate.dm"
#include "code\modules\projectiles\projectile\beams.dm" #include "code\modules\projectiles\projectile\beams.dm"
@@ -1132,8 +1141,10 @@
#include "code\modules\reagents\reagent_containers\robodropper.dm" #include "code\modules\reagents\reagent_containers\robodropper.dm"
#include "code\modules\reagents\reagent_containers\spray.dm" #include "code\modules\reagents\reagent_containers\spray.dm"
#include "code\modules\reagents\reagent_containers\syringes.dm" #include "code\modules\reagents\reagent_containers\syringes.dm"
#include "code\modules\reagents\reagent_containers\food\cans.dm"
#include "code\modules\reagents\reagent_containers\food\condiment.dm" #include "code\modules\reagents\reagent_containers\food\condiment.dm"
#include "code\modules\reagents\reagent_containers\food\drinks.dm" #include "code\modules\reagents\reagent_containers\food\drinks.dm"
#include "code\modules\reagents\reagent_containers\food\sandwich.dm"
#include "code\modules\reagents\reagent_containers\food\snacks.dm" #include "code\modules\reagents\reagent_containers\food\snacks.dm"
#include "code\modules\reagents\reagent_containers\food\drinks\bottle.dm" #include "code\modules\reagents\reagent_containers\food\drinks\bottle.dm"
#include "code\modules\reagents\reagent_containers\food\drinks\drinkingglass.dm" #include "code\modules\reagents\reagent_containers\food\drinks\drinkingglass.dm"
@@ -1302,6 +1313,7 @@
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm" #include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm" #include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
#include "code\WorkInProgress\Chinsky\ashtray.dm" #include "code\WorkInProgress\Chinsky\ashtray.dm"
#include "code\WorkInProgress\Chinsky\guestpass.dm"
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm" #include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
#include "code\WorkInProgress\kilakk\fax.dm" #include "code\WorkInProgress\kilakk\fax.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm" #include "code\WorkInProgress\Mini\atmos_control.dm"

View File

@@ -204,7 +204,7 @@
var/obj/structure/closet/crate/freezer/C = new(src.loc) var/obj/structure/closet/crate/freezer/C = new(src.loc)
var/num = rand(2,6) var/num = rand(2,6)
var/new_type = pick( var/new_type = pick(
/obj/item/weapon/reagent_containers/food/drinks/beer, \ /obj/item/weapon/reagent_containers/food/drinks/cans/beer, \
/obj/item/weapon/reagent_containers/food/drinks/tea, \ /obj/item/weapon/reagent_containers/food/drinks/tea, \
/obj/item/weapon/reagent_containers/food/drinks/dry_ramen, \ /obj/item/weapon/reagent_containers/food/drinks/dry_ramen, \
/obj/item/weapon/reagent_containers/food/snacks/candiedapple, \ /obj/item/weapon/reagent_containers/food/snacks/candiedapple, \

View File

@@ -17,26 +17,25 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1) if (health < 1)
return return
if (istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match)) if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if(user)
if (contents.len >= max_butts) if (contents.len >= max_butts)
user << "This ashtray is full." user << "This ashtray is full."
return return
user.u_equip(W) user.u_equip(W)
W.loc = src W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W if (istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W var/obj/item/clothing/mask/cigarette/cig = W
if (cig.lit == 1) if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.") 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) 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?" 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].") src.visible_message("[user] places [W] in [src].")
user.update_inv_l_hand() user.update_inv_l_hand()
user.update_inv_r_hand() user.update_inv_r_hand()
add_fingerprint(user) add_fingerprint(user)
@@ -62,7 +61,6 @@
if (contents.len) if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!") src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents) for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O
O.loc = src.loc O.loc = src.loc
icon_state = icon_empty icon_state = icon_empty
return ..() return ..()
@@ -70,7 +68,6 @@
/obj/item/ashtray/proc/die() /obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!") src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents) for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O
O.loc = src.loc O.loc = src.loc
icon_state = icon_broken icon_state = icon_broken

View File

@@ -0,0 +1,186 @@
/////////////////////////////////////////////
//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/New()
..()
uid = "[rand(100,999)]-G[rand(10,99)]"
/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

View File

@@ -120,7 +120,7 @@
screen_loc = "NORTH,WEST+2" screen_loc = "NORTH,WEST+2"
var/varholder = "name" var/varholder = "name"
var/valueholder = "derp" var/valueholder = "derp"
var/objholder = "/obj/structure/closet" var/objholder = /obj/structure/closet
Click(location, control, params) Click(location, control, params)
var/list/pa = params2list(params) var/list/pa = params2list(params)
@@ -145,13 +145,13 @@
if(1) if(1)
return 1 return 1
if(2) if(2)
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet") objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
var/list/removed_paths = list("/obj/effect/bhole") if(!ispath(objholder))
if(objholder in removed_paths) objholder = /obj/structure/closet
alert("That path is not allowed.") alert("That path is not allowed.")
objholder = "/obj/structure/closet" else
else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0)) if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = "/obj/structure/closet" objholder = /obj/structure/closet
if(3) if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine") var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
@@ -234,6 +234,10 @@
WIN.dir = NORTHWEST WIN.dir = NORTHWEST
if(2) if(2)
if(pa.Find("left")) if(pa.Find("left"))
if(ispath(holder.buildmode.objholder,/turf))
var/turf/T = get_turf(object)
T.ChangeTurf(holder.buildmode.objholder)
else
var/obj/A = new holder.buildmode.objholder (get_turf(object)) var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir A.dir = holder.builddir.dir
else if(pa.Find("right")) else if(pa.Find("right"))

View File

@@ -134,6 +134,7 @@ zone/proc/DebugDisplay(client/client)
client/proc/TestZASRebuild() client/proc/TestZASRebuild()
set category = "Debug"
// var/turf/turf = get_turf(mob) // var/turf/turf = get_turf(mob)
var/zone/current_zone = mob.loc:zone var/zone/current_zone = mob.loc:zone
if(!current_zone) if(!current_zone)
@@ -155,7 +156,7 @@ client/proc/TestZASRebuild()
for(var/direction in cardinal) for(var/direction in cardinal)
var/turf/simulated/adjacent = get_step(current, direction) var/turf/simulated/adjacent = get_step(current, direction)
if(!current.ZAirPass(adjacent)) if(!current.ZCanPass(adjacent))
continue continue
if(turfs.Find(adjacent)) if(turfs.Find(adjacent))
current_adjacents += adjacent current_adjacents += adjacent
@@ -211,3 +212,8 @@ client/proc/TestZASRebuild()
current.overlays -= overlays current.overlays -= overlays
return final_arrangement return final_arrangement
/client/proc/ZASSettings()
set category = "Debug"
vsc.SetDefault(mob)

View File

@@ -75,12 +75,12 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
//since the air is processed in fractions, we need to make sure not to have any minuscle residue or //since the air is processed in fractions, we need to make sure not to have any minuscle residue or
//the amount of moles might get to low for some functions to catch them and thus result in wonky behaviour //the amount of moles might get to low for some functions to catch them and thus result in wonky behaviour
if(air_contents.oxygen < 0.001) if(air_contents.oxygen < 0.1)
air_contents.oxygen = 0 air_contents.oxygen = 0
if(air_contents.toxins < 0.001) if(air_contents.toxins < 0.1)
air_contents.toxins = 0 air_contents.toxins = 0
if(fuel) if(fuel)
if(fuel.moles < 0.001) if(fuel.moles < 0.1)
air_contents.trace_gases.Remove(fuel) air_contents.trace_gases.Remove(fuel)
//check if there is something to combust //check if there is something to combust
@@ -200,7 +200,7 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid, forc
if(liquid) if(liquid)
//Liquid Fuel //Liquid Fuel
if(liquid.amount <= 0) if(liquid.amount <= 0.1)
del liquid del liquid
else else
total_fuel += liquid.amount total_fuel += liquid.amount
@@ -257,9 +257,9 @@ datum/gas_mixture/proc/check_recombustability(obj/effect/decal/cleanable/liquid_
if(oxygen && (toxins || fuel || liquid)) if(oxygen && (toxins || fuel || liquid))
if(liquid) if(liquid)
return 1 return 1
if (toxins) if(toxins >= 0.1)
return 1 return 1
if(fuel) if(fuel && fuel.moles >= 0.1)
return 1 return 1
return 0 return 0
@@ -272,9 +272,9 @@ datum/gas_mixture/proc/check_combustability(obj/effect/decal/cleanable/liquid_fu
if(oxygen && (toxins || fuel || liquid)) if(oxygen && (toxins || fuel || liquid))
if(liquid) if(liquid)
return 1 return 1
if (toxins >= 0.7) if (toxins >= 0.1)
return 1 return 1
if(fuel && fuel.moles >= 1.4) if(fuel && fuel.moles >= 0.1)
return 1 return 1
return 0 return 0

View File

@@ -67,7 +67,7 @@ var/global/vs_control/vsc = new
var/connection_insulation = 1 var/connection_insulation = 1
var/connection_insulation_NAME = "Connections - Insulation" var/connection_insulation_NAME = "Connections - Insulation"
var/connection_insulation_DESC = "How insulative a connection is, in terms of heat transfer. 1 is perfectly insulative, and 0 is perfectly conductive." var/connection_insulation_DESC = "Boolean, should doors forbid heat transfer?"
var/connection_temperature_delta = 10 var/connection_temperature_delta = 10
var/connection_temperature_delta_NAME = "Connections - Temperature Difference" var/connection_temperature_delta_NAME = "Connections - Temperature Difference"
@@ -288,6 +288,7 @@ var/global/vs_control/vsc = new
airflow_speed_decay = 1 airflow_speed_decay = 1
airflow_delay = 20 airflow_delay = 20
airflow_mob_slowdown = 3 airflow_mob_slowdown = 3
connection_insulation = 0
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>" world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"

View File

@@ -369,6 +369,7 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
Z.interactions_with_neighbors++ Z.interactions_with_neighbors++
interactions_with_neighbors++ interactions_with_neighbors++
if(!vsc.connection_insulation)
for(var/zone/Z in closed_connection_zones) for(var/zone/Z in closed_connection_zones)
//If that zone has already processed, skip it. //If that zone has already processed, skip it.
if(Z.last_update > last_update || !Z.air) if(Z.last_update > last_update || !Z.air)
@@ -662,6 +663,18 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//This implements a simplistic version of the Stefan-Boltzmann law.
var/energy_delta = ((A.temperature - B.temperature) ** 4) * 5.6704e-8 * connecting_tiles * 2.5
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
if(maximum_energy_delta > abs(energy_delta))
if(energy_delta < 0)
maximum_energy_delta *= -1
energy_delta = maximum_energy_delta
A.temperature -= energy_delta / (A.heat_capacity() * A.group_multiplier)
B.temperature += energy_delta / (B.heat_capacity() * B.group_multiplier)
/* This was bad an I feel bad.
//Shares a specific ratio of gas between mixtures using simple weighted averages. //Shares a specific ratio of gas between mixtures using simple weighted averages.
var var
//WOOT WOOT TOUCH THIS AND YOU ARE A RETARD //WOOT WOOT TOUCH THIS AND YOU ARE A RETARD
@@ -684,7 +697,7 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
A.temperature = max(0, (A.temperature - temp_avg) * (1- (ratio / max(1,A.group_multiplier)) ) + temp_avg ) A.temperature = max(0, (A.temperature - temp_avg) * (1- (ratio / max(1,A.group_multiplier)) ) + temp_avg )
B.temperature = max(0, (B.temperature - temp_avg) * (1- (ratio / max(1,B.group_multiplier)) ) + temp_avg ) B.temperature = max(0, (B.temperature - temp_avg) * (1- (ratio / max(1,B.group_multiplier)) ) + temp_avg )
*/
/////////////////// ///////////////////
//Zone Rebuilding// //Zone Rebuilding//

View File

@@ -209,8 +209,9 @@
if(M) if(M)
var/turf/ear = get_turf(M) var/turf/ear = get_turf(M)
if(ear) if(ear)
if(speaker_coverage[ear]) // Ghostship is magic: Ghosts can hear radio chatter from anywhere
. |= M if(speaker_coverage[ear] || (istype(M, /mob/dead/observer) && (M.client) && (M.client.prefs.toggles & CHAT_GHOSTRADIO)))
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
return . return .
#define SIGN(X) ((X<0)?-1:1) #define SIGN(X) ((X<0)?-1:1)

View File

@@ -94,7 +94,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
var/datum/species/S = new T var/datum/species/S = new T
all_species[S.name] = S all_species[S.name] = S
if(S.flags & WHITELISTED) if(S.flags & IS_WHITELISTED)
whitelisted_species += S.name whitelisted_species += S.name
return 1 return 1

View File

@@ -774,3 +774,13 @@ proc
var/image/I = O var/image/I = O
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY) composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite return composite
proc/adjust_brightness(var/color, var/value)
if (!color) return "#FFFFFF"
if (!value) return color
var/list/RGB = ReadRGB(color)
RGB[1] = Clamp(RGB[1]+value,0,255)
RGB[2] = Clamp(RGB[2]+value,0,255)
RGB[3] = Clamp(RGB[3]+value,0,255)
return rgb(RGB[1],RGB[2],RGB[3])

View File

@@ -195,32 +195,10 @@ proc/checkhtml(var/t)
* Text modification * Text modification
*/ */
/proc/replacetext(text, find, replacement) /proc/replacetext(text, find, replacement)
var/find_len = length(find) return list2text(text2list(text, find), replacement)
if(find_len < 1) return text
. = ""
var/last_found = 1
while(1)
var/found = findtext(text, find, last_found, 0)
. += copytext(text, last_found, found)
if(found)
. += replacement
last_found = found + find_len
continue
return .
/proc/replacetextEx(text, find, replacement) /proc/replacetextEx(text, find, replacement)
var/find_len = length(find) return list2text(text2listEx(text, find), replacement)
if(find_len < 1) return text
. = ""
var/last_found = 1
while(1)
var/found = findtextEx(text, find, last_found, 0)
. += copytext(text, last_found, found)
if(found)
. += replacement
last_found = found + find_len
continue
return .
//Adds 'u' number of zeros ahead of the text 't' //Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u) /proc/add_zero(t, u)
@@ -287,27 +265,6 @@ proc/checkhtml(var/t)
return message return message
return copytext(message, 1, length + 1) return copytext(message, 1, length + 1)
/*
* Misc
*/
/proc/stringsplit(txt, character)
var/cur_text = txt
var/last_found = 1
var/found_char = findtext(cur_text,character)
var/list/list = list()
if(found_char)
var/fs = copytext(cur_text,last_found,found_char)
list += fs
last_found = found_char+length(character)
found_char = findtext(cur_text,character,last_found)
while(found_char)
var/found_string = copytext(cur_text,last_found,found_char)
last_found = found_char+length(character)
list += found_string
found_char = findtext(cur_text,character,last_found)
list += copytext(cur_text,last_found,length(cur_text)+1)
return list
/proc/stringmerge(var/text,var/compare,replace = "*") /proc/stringmerge(var/text,var/compare,replace = "*")
//This proc fills in all spaces with the "replace" var (* by default) with whatever //This proc fills in all spaces with the "replace" var (* by default) with whatever

View File

@@ -83,22 +83,94 @@
return hex return hex
//Attaches each element of a list to a single string seperated by 'seperator'. // Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/dd_list2text(var/list/the_list, separator) /proc/list2text(list/ls, sep)
var/total = the_list.len if(ls.len <= 1) // Early-out code for empty or singleton lists.
if(!total) return ls.len ? ls[1] : ""
return
var/count = 2 var/l = ls.len // Made local for sanic speed.
var/newText = "[the_list[1]]" var/i = 0 // Incremented every time a list index is accessed.
while(count <= total)
if(separator) if(sep <> null)
newText += separator // Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
newText += "[the_list[count]]" #define S1 sep, ls[++i]
count++ #define S4 S1, S1, S1, S1
return newText #define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text.
// Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
if(l-1 & 0x01) // 'i' will always be 1 here.
. = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
if(l-i & 0x02)
. = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
if(l-i & 0x04)
. = text("[][][][][][][][][]", ., S4) // And so on....
if(l-i & 0x08)
. = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
if(l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
if(l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
if(l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64
#undef S16
#undef S4
#undef S1
else
// Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
#define S1 ls[++i]
#define S4 S1, S1, S1, S1
#define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text.
if(l-1 & 0x01) // 'i' will always be 1 here.
. += S1 // Append 1 element if the remaining elements are not a multiple of 2.
if(l-i & 0x02)
. = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
if(l-i & 0x04)
. = text("[][][][][]", ., S4) // And so on...
if(l-i & 0x08)
. = text("[][][][][][][][][]", ., S4, S4)
if(l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][]", ., S16)
if(l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
if(l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64
#undef S16
#undef S4
#undef S1
//slower then dd_list2text, but correctly processes associative lists. //slower then list2text, but correctly processes associative lists.
proc/tg_list2text(list/list, glue=",") proc/tg_list2text(list/list, glue=",")
if(!istype(list) || !list.len) if(!istype(list) || !list.len)
return return
@@ -108,62 +180,50 @@ proc/tg_list2text(list/list, glue=",")
return output return output
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator) //Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
//Returns an empty list if the text cannot be split, or the split text in a list. /proc/text2list(text, delimiter="\n")
//Not giving a "" seperator will cause the text to be broken into a list of single letters. var/delim_len = length(delimiter)
/proc/text2list(text, seperator="\n") if(delim_len < 1) return list(text)
. = list() . = list()
var/last_found = 1
var/found
do
found = findtext(text, delimiter, last_found, 0)
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
var/text_len = length(text) //length of the input text
var/seperator_len = length(seperator) //length of the seperator text
if(text_len >= seperator_len)
var/i
var/last_i = 1
for(i=1,i<=(text_len+1-seperator_len),i++)
if( cmptext(copytext(text,i,i+seperator_len), seperator) )
if(i != last_i)
. += copytext(text,last_i,i)
last_i = i + seperator_len
if(last_i <= text_len)
. += copytext(text, last_i, 0)
else
. += text
return .
//Converts a text string into a list by splitting the string at each seperator found in text (discarding the seperator)
//Returns an empty list if the text cannot be split, or the split text in a list.
//Not giving a "" seperator will cause the text to be broken into a list of single letters.
//Case Sensitive! //Case Sensitive!
/proc/text2listEx(text, seperator="\n") /proc/text2listEx(text, delimiter="\n")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list() . = list()
var/last_found = 1
var/text_len = length(text) //length of the input text var/found
var/seperator_len = length(seperator) //length of the seperator text do
found = findtextEx(text, delimiter, last_found, 0)
if(text_len >= seperator_len) . += copytext(text, last_found, found)
var/i last_found = found + delim_len
var/last_i = 1 while(found)
for(i=1,i<=(text_len+1-seperator_len),i++)
if( cmptextEx(copytext(text,i,i+seperator_len), seperator) )
if(i != last_i)
. += copytext(text,last_i,i)
last_i = i + seperator_len
if(last_i <= text_len)
. += copytext(text, last_i, 0)
else
. += text
return .
//Splits the text of a file at seperator and returns them in a list. //Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n") /proc/file2list(filename, seperator="\n")
return text2list(return_file_text(filename),seperator) return text2list(return_file_text(filename),seperator)
//Turns a direction into text
/proc/num2dir(direction)
switch(direction)
if(1.0) return NORTH
if(2.0) return SOUTH
if(4.0) return EAST
if(8.0) return WEST
else
world.log << "UNKNOWN DIRECTION: [direction]"
//Turns a direction into text //Turns a direction into text
/proc/dir2text(direction) /proc/dir2text(direction)
switch(direction) switch(direction)

View File

@@ -188,14 +188,15 @@ datum/hud/New(mob/owner)
//Triggered when F12 is pressed (Unless someone changed something in the DMF) //Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12() /mob/verb/button_pressed_F12(var/full = 0 as null)
set name = "F12" set name = "F12"
set hidden = 1 set hidden = 1
if(hud_used) if(hud_used)
if(ishuman(src)) if(ishuman(src))
if(!src.client) return if(!client) return
if(client.view != world.view)
return
if(hud_used.hud_shown) if(hud_used.hud_shown)
hud_used.hud_shown = 0 hud_used.hud_shown = 0
if(src.hud_used.adding) if(src.hud_used.adding)
@@ -209,10 +210,15 @@ datum/hud/New(mob/owner)
//Due to some poor coding some things need special treatment: //Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay //These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
if(!full)
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is. src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
else
src.client.screen -= src.healths
src.client.screen -= src.internals
src.client.screen -= src.gun_setting_icon
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone. //These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason. src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
@@ -225,7 +231,12 @@ datum/hud/New(mob/owner)
src.client.screen += src.hud_used.other src.client.screen += src.hud_used.other
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden) if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
src.client.screen += src.hud_used.hotkeybuttons src.client.screen += src.hud_used.hotkeybuttons
if(src.healths)
src.client.screen |= src.healths
if(src.internals)
src.client.screen |= src.internals
if(src.gun_setting_icon)
src.client.screen |= src.gun_setting_icon
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
src.client.screen += src.zone_sel //This one is a special snowflake src.client.screen += src.zone_sel //This one is a special snowflake

View File

@@ -37,27 +37,6 @@
// Not all of them require checking, see below // Not all of them require checking, see below
A.attack_ghost(src) A.attack_ghost(src)
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(var/atom/target)
following = target
if(target)
src << "\blue Now following [target]"
spawn(0)
var/turf/pos = get_turf(src)
while(loc == pos && target && following == target)
var/turf/T = get_turf(target)
if(!T)
break
if(following != target)
break
if(!client)
break
loc = T
pos = loc
sleep(15)
following = null
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you // Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user as mob) /atom/proc/attack_ghost(mob/dead/observer/user as mob)
if(user.client && user.client.inquisitive_ghost) if(user.client && user.client.inquisitive_ghost)

View File

@@ -63,6 +63,9 @@
var/automute_on = 0 //enables automuting/spam prevention var/automute_on = 0 //enables automuting/spam prevention
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
var/disable_player_mice = 0 var/disable_player_mice = 0
var/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech var/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech
@@ -181,7 +184,7 @@
if(type == "config") if(type == "config")
switch (name) switch (name)
if ("resource_urls") if ("resource_urls")
config.resource_urls = stringsplit(value, " ") config.resource_urls = text2list(value, " ")
if ("admin_legacy_system") if ("admin_legacy_system")
config.admin_legacy_system = 1 config.admin_legacy_system = 1
@@ -459,10 +462,15 @@
else //probably windows, if not this should work anyway else //probably windows, if not this should work anyway
config.python_path = "python" config.python_path = "python"
if("allow_cult_ghostwriter")
config.cult_ghostwriter = 1
if("req_cult_ghostwriter")
config.cult_ghostwriter_req_cultists = value
else else
diary << "Unknown setting in configuration: '[name]'" diary << "Unknown setting in configuration: '[name]'"
else if(type == "game_options") else if(type == "game_options")
if(!value) if(!value)
diary << "Unknown value for setting [name] in [filename]." diary << "Unknown value for setting [name] in [filename]."

View File

@@ -297,7 +297,7 @@ datum/controller/game_controller/proc/process_nano()
var/i = 1 var/i = 1
while(i<=nanomanager.processing_uis.len) while(i<=nanomanager.processing_uis.len)
var/datum/nanoui/ui = nanomanager.processing_uis[i] var/datum/nanoui/ui = nanomanager.processing_uis[i]
if(ui && ui.src_object && ui.user) if(ui)
ui.process() ui.process()
i++ i++
continue continue

View File

@@ -112,8 +112,8 @@
L.fields["sex"] = H.gender L.fields["sex"] = H.gender
L.fields["b_type"] = H.b_type L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.SE L.fields["enzymes"] = H.dna.SE // Used in respawning
L.fields["identity"] = H.dna.UI L.fields["identity"] = H.dna.UI // "
L.fields["image"] = getFlatIcon(H,0) //This is god-awful L.fields["image"] = getFlatIcon(H,0) //This is god-awful
locked += L locked += L
return return

View File

@@ -297,7 +297,7 @@ var/list/advance_cures = list(
for(var/datum/symptom/S in symptoms) for(var/datum/symptom/S in symptoms)
L += S.id L += S.id
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in. L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
var/result = dd_list2text(L, ":") var/result = list2text(L, ":")
id = result id = result
return result return result

View File

@@ -45,7 +45,7 @@
H.op_stage.appendix = 2.0 H.op_stage.appendix = 2.0
var/datum/organ/external/groin = H.get_organ("groin") var/datum/organ/external/groin = H.get_organ("groin")
var/datum/wound/W = new /datum/wound/internal_bleeding(25) var/datum/wound/W = new /datum/wound/internal_bleeding(20)
H.adjustToxLoss(25) H.adjustToxLoss(25)
groin.wounds += W groin.wounds += W
src.cure() src.cure()

View File

@@ -75,6 +75,8 @@ datum/mind
if(new_character.mind) //remove any mind currently in our new body's mind variable if(new_character.mind) //remove any mind currently in our new body's mind variable
new_character.mind.current = null new_character.mind.current = null
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
current = new_character //link ourself to our new body current = new_character //link ourself to our new body
new_character.mind = src //and link our new body to ourself new_character.mind = src //and link our new body to ourself

View File

@@ -128,12 +128,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager, /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco, /obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
/obj/item/weapon/lipstick/random, /obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/ale, /obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/ale, /obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/beer, /obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer, /obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer, /obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer) /obj/item/weapon/reagent_containers/food/drinks/cans/beer)
cost = 20 cost = 20
containertype = /obj/structure/closet/crate containertype = /obj/structure/closet/crate
containername = "Party equipment" containername = "Party equipment"
@@ -695,6 +695,18 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory access = access_armory
group = "Security" group = "Security"
/datum/supply_packs/erifle
name = "Energy marksman crate"
contains = list(/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/weapon/gun/energy/sniperrifle,
/obj/item/weapon/gun/energy/sniperrifle)
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "Energy marksman crate"
access = access_armory
group = "Security"
/datum/supply_packs/shotgunammo /datum/supply_packs/shotgunammo
name = "Shotgun shells" name = "Shotgun shells"
contains = list(/obj/item/ammo_casing/shotgun, contains = list(/obj/item/ammo_casing/shotgun,

View File

@@ -51,7 +51,7 @@
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character(). //This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list() var/locked[] = list()
proc/get_manifest(monochrome, OOC) /obj/effect/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new() var/list/heads = new()
var/list/sec = new() var/list/sec = new()
var/list/eng = new() var/list/eng = new()
@@ -74,7 +74,6 @@
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr> <tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"} "}
var/even = 0 var/even = 0
// sort mobs // sort mobs
for(var/datum/data/record/t in data_core.general) for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"] var/name = t.fields["name"]
@@ -89,9 +88,7 @@
isactive[name] = active ? "Active" : "Inactive" isactive[name] = active ? "Active" : "Inactive"
else else
isactive[name] = t.fields["p_stat"] isactive[name] = t.fields["p_stat"]
//world << "[name]: [rank]" //world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line //cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0 var/department = 0
if(real_rank in command_positions) if(real_rank in command_positions)
@@ -115,10 +112,8 @@
if(real_rank in nonhuman_positions) if(real_rank in nonhuman_positions)
bot[name] = rank bot[name] = rank
department = 1 department = 1
if(!department && !(name in heads)) if(!department && !(name in heads))
misc[name] = rank misc[name] = rank
if(heads.len > 0) if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>" dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads) for(name in heads)
@@ -162,12 +157,89 @@
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>" dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even even = !even
dat += "</table>" dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "") dat = replacetext(dat, "\t", "")
return dat 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 = sanitize(t.fields["name"])
var/rank = sanitize(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 /obj/effect/laser
name = "laser" name = "laser"
desc = "IT BURNS!!!" desc = "IT BURNS!!!"

View File

@@ -325,6 +325,13 @@
icon = 'icons/obj/wizard.dmi' icon = 'icons/obj/wizard.dmi'
icon_state = "broom" icon_state = "broom"
/obj/item/weapon/staff/gentcane
name = "Gentlemans Cane"
desc = "An ebony can with an ivory tip."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
/obj/item/weapon/staff/stick /obj/item/weapon/staff/stick
name = "stick" name = "stick"
desc = "A great tool to drag someone else's drinks across the bar." desc = "A great tool to drag someone else's drinks across the bar."

View File

@@ -6,6 +6,7 @@
var/list/fingerprintshidden var/list/fingerprintshidden
var/fingerprintslast = null var/fingerprintslast = null
var/list/blood_DNA var/list/blood_DNA
var/blood_color
var/last_bumped = 0 var/last_bumped = 0
var/pass_flags = 0 var/pass_flags = 0
var/throwpass = 0 var/throwpass = 0
@@ -361,7 +362,9 @@ its easier to just keep the beam vertical.
return 0 return 0
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it. if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
blood_DNA = list() blood_DNA = list()
blood_color = "#A10808"
if (M.species)
blood_color = M.species.blood_color
//adding blood to humans //adding blood to humans
else if (istype(src, /mob/living/carbon/human)) else if (istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src

View File

@@ -25,6 +25,8 @@ var/global/list/dna_activity_bounds[STRUCDNASIZE]
// Used to determine what each block means (admin hax and species stuff on /vg/, mostly) // Used to determine what each block means (admin hax and species stuff on /vg/, mostly)
var/global/list/assigned_blocks[STRUCDNASIZE] var/global/list/assigned_blocks[STRUCDNASIZE]
var/global/list/datum/dna/gene/dna_genes[0]
// UI Indices (can change to mutblock style, if desired) // UI Indices (can change to mutblock style, if desired)
#define DNA_UI_HAIR_R 1 #define DNA_UI_HAIR_R 1
#define DNA_UI_HAIR_G 2 #define DNA_UI_HAIR_G 2
@@ -41,21 +43,13 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
#define DNA_UI_HAIR_STYLE 13 #define DNA_UI_HAIR_STYLE 13
#define DNA_UI_LENGTH 13 // Update this when you add something, or you WILL break shit. #define DNA_UI_LENGTH 13 // Update this when you add something, or you WILL break shit.
/////////////////
// GENE DEFINES
/////////////////
/* Note RE: unassigned blocks // Skip checking if it's already active.
// Used for genes that check for value rather than a binary on/off.
Many genes in baycode are currently sitting unused #define GENE_ALWAYS_ACTIVATE 1
(compare setupgame.dm to the number of *BLOCK variables).
This datum will return 0 (or equivalent) if asked about
a block 0 (which means the gene was unassigned). Setters
will silently return without performing any action.
I have code to assign these genes in a streamlined manner,
but in order to avoid breaking things, I've left the
existing setupgame.dm intact. Please let me know if you
need this behavior changed.
*/
/datum/dna /datum/dna
// READ-ONLY, GETS OVERWRITTEN // READ-ONLY, GETS OVERWRITTEN
@@ -77,6 +71,27 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
var/b_type = "A+" // Should probably change to an integer => string map but I'm lazy. var/b_type = "A+" // Should probably change to an integer => string map but I'm lazy.
var/mutantrace = null // The type of mutant race the player is, if applicable (i.e. potato-man) var/mutantrace = null // The type of mutant race the player is, if applicable (i.e. potato-man)
var/real_name // Stores the real name of the person who originally got this dna datum. Used primarily for changelings, var/real_name // Stores the real name of the person who originally got this dna datum. Used primarily for changelings,
// New stuff
var/species = "Human"
// Make a copy of this strand.
// USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION!
/datum/dna/proc/Clone()
var/datum/dna/new_dna = new()
new_dna.unique_enzymes=unique_enzymes
new_dna.b_type=b_type
new_dna.mutantrace=mutantrace
new_dna.real_name=real_name
new_dna.species=species
for(var/b=1;b<=STRUCDNASIZE;b++)
new_dna.SE[b]=SE[b]
if(b<=DNA_UI_LENGTH)
new_dna.UI[b]=UI[b]
new_dna.UpdateUI()
new_dna.UpdateSE()
return new_dna
/////////////////////////////////////// ///////////////////////////////////////
// UNIQUE IDENTITY // UNIQUE IDENTITY
/////////////////////////////////////// ///////////////////////////////////////
@@ -84,6 +99,10 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
// Create random UI. // Create random UI.
/datum/dna/proc/ResetUI(var/defer=0) /datum/dna/proc/ResetUI(var/defer=0)
for(var/i=1,i<=DNA_UI_LENGTH,i++) for(var/i=1,i<=DNA_UI_LENGTH,i++)
switch(i)
if(DNA_UI_SKIN_TONE)
SetUIValueRange(DNA_UI_SKIN_TONE,rand(1,220),220,1) // Otherwise, it gets fucked
else
UI[i]=rand(0,4095) UI[i]=rand(0,4095)
if(!defer) if(!defer)
UpdateUI() UpdateUI()
@@ -114,7 +133,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1) SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1) SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, -character.s_tone+35, 220, 1) // WARNING: MATH. Blame the person that setup line 944 in modules/client/preferences.dm SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1) SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
@@ -140,22 +159,18 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
// Set a DNA UI block's value, given a value and a max possible value. // Set a DNA UI block's value, given a value and a max possible value.
// Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list) // Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list)
/datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue,var/minvalue) /datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue,var/defer=0)
if (block<=0) return if (block<=0) return
if(value < minvalue)
value=minvalue
else if(value > maxvalue)
value=maxvalue
ASSERT(maxvalue<=4095) ASSERT(maxvalue<=4095)
var/range = (4095 / maxvalue) var/range = (4095 / maxvalue)
if(value) if(value)
SetUIValue(block,round(value * range)) SetUIValue(block,round(value * range),defer)
// Getter version of above. // Getter version of above.
/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue) /datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
if (block<=0) return 0 if (block<=0) return 0
var/value = GetUIValue(block) var/value = GetUIValue(block)
return round(1+(value / 4096)*maxvalue) return round(1 +(value / 4096)*maxvalue)
// Is the UI gene "on" or "off"? // Is the UI gene "on" or "off"?
// For UI, this is simply a check of if the value is > 2050. // For UI, this is simply a check of if the value is > 2050.
@@ -238,6 +253,12 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
if(value) if(value)
SetSEValue(block, value * range - rand(1,range-1)) SetSEValue(block, value * range - rand(1,range-1))
// Getter version of above.
/datum/dna/proc/GetSEValueRange(var/block,var/maxvalue)
if (block<=0) return 0
var/value = GetSEValue(block)
return round(1 +(value / 4096)*maxvalue)
// Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.) // Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.)
/datum/dna/proc/GetSEState(var/block) /datum/dna/proc/GetSEState(var/block)
if (block<=0) return 0 if (block<=0) return 0
@@ -253,7 +274,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
if(on) if(on)
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND]) val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
else else
val=rand(BOUNDS[DNA_OFF_LOWERBOUND],BOUNDS[DNA_OFF_UPPERBOUND]) val=rand(1,BOUNDS[DNA_OFF_UPPERBOUND])
SetSEValue(block,val,defer) SetSEValue(block,val,defer)
// Get hex-encoded SE block. // Get hex-encoded SE block.

View File

@@ -0,0 +1,358 @@
// (Re-)Apply mutations.
// TODO: Turn into a /mob proc, change inj to a bitflag for various forms of differing behavior.
// M: Mob to mess with
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
// flags: See below, bitfield.
#define MUTCHK_FORCED 1
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
for(var/datum/dna/gene/gene in dna_genes)
if(!M)
return
if(!gene.block)
continue
// Sanity checks, don't skip.
if(!gene.can_activate(M,flags))
//testing("[M] - Failed to activate [gene.name] (can_activate fail).")
continue
// Current state
var/gene_active = (gene.flags & GENE_ALWAYS_ACTIVATE)
if(!gene_active)
gene_active = M.dna.GetSEState(gene.block)
// Prior state
var/gene_prior_status = (gene.type in M.active_genes)
if((gene_active && !gene_prior_status) || (gene.flags & GENE_ALWAYS_ACTIVATE))
//testing("[gene.name] activated!")
gene.activate(M,connected,flags)
if(M)
if(!(gene.flags & GENE_ALWAYS_ACTIVATE))
M.active_genes |= gene.type
M.update_icon=1
else if(!gene_active && gene_prior_status)
//testing("[gene.name] deactivated!")
gene.deactivate(M,connected,flags)
if(M)
M.active_genes -= gene.type
M.update_icon = 1
//else
// testing("[M] - Failed to activate [gene.name] - [gene_active?"+":"-"]active, [gene_prior_status?"+":"-"]prior")
// PROC CONTINUES BELOW AFTER COMMENTED CODE.
/* Old, inflexibile
/proc/domutcheck(var/mob/living/M, var/connected, var/flags)
if (!M) return
M.dna.check_integrity()
M.disabilities = 0
M.sdisabilities = 0
var/old_mutations = M.mutations
M.mutations = list()
M.pass_flags = 0
// M.see_in_dark = 2
// M.see_invisible = 0
if(PLANT in old_mutations)
M.mutations.Add(PLANT)
if(SKELETON in old_mutations)
M.mutations.Add(SKELETON)
if(FAT in old_mutations)
M.mutations.Add(FAT)
if(HUSK in old_mutations)
M.mutations.Add(HUSK)
var/inj = (flags & MUTCHK_FROM_INJECTOR) == MUTCHK_FROM_INJECTOR
var/forced = (flags & MUTCHK_FORCED) == MUTCHK_FORCED
if(M.dna.GetSEState(NOBREATHBLOCK))
if(forced || probinj(45,inj) || (mNobreath in old_mutations))
M << "\blue You feel no need to breathe."
M.mutations.Add(mNobreath)
if(M.dna.GetSEState(REMOTEVIEWBLOCK))
if(forced || probinj(45,inj) || (mRemote in old_mutations))
M << "\blue Your mind expands"
M.mutations.Add(mRemote)
M.verbs += /mob/living/carbon/human/proc/remoteobserve
if(M.dna.GetSEState(REGENERATEBLOCK))
if(forced || probinj(45,inj) || (mRegen in old_mutations))
M << "\blue You feel better"
M.mutations.Add(mRegen)
if(M.dna.GetSEState(INCREASERUNBLOCK))
if(forced || probinj(45,inj) || (mRun in old_mutations))
M << "\blue Your leg muscles pulsate."
M.mutations.Add(mRun)
if(M.dna.GetSEState(REMOTETALKBLOCK))
if(forced || probinj(45,inj) || (mRemotetalk in old_mutations))
M << "\blue You expand your mind outwards"
M.mutations.Add(mRemotetalk)
M.verbs += /mob/living/carbon/human/proc/remotesay
if(M.dna.GetSEState(MORPHBLOCK))
if(forced || probinj(45,inj) || (mMorph in old_mutations))
M.mutations.Add(mMorph)
M << "\blue Your skin feels strange"
M.verbs += /mob/living/carbon/human/proc/morph
if(M.dna.GetSEState(COLDBLOCK))
if(!(COLD_RESISTANCE in old_mutations))
if(forced || probinj(15,inj) || (mHeatres in old_mutations))
M.mutations.Add(mHeatres)
M << "\blue Your skin is icy to the touch"
else
if(forced || probinj(5,inj) || (mHeatres in old_mutations))
M.mutations.Add(mHeatres)
M << "\blue Your skin is icy to the touch"
if(M.dna.GetSEState(HALLUCINATIONBLOCK))
if(forced || probinj(45,inj) || (mHallucination in old_mutations))
M.mutations.Add(mHallucination)
M << "\red Your mind says 'Hello'"
if(M.dna.GetSEState(NOPRINTSBLOCK))
if(forced || probinj(45,inj) || (mFingerprints in old_mutations))
M.mutations.Add(mFingerprints)
M << "\blue Your fingers feel numb"
if(M.dna.GetSEState(SHOCKIMMUNITYBLOCK))
if(forced || probinj(45,inj) || (mShock in old_mutations))
M.mutations.Add(mShock)
M << "\blue Your skin feels strange"
if(M.dna.GetSEState(SMALLSIZEBLOCK))
if(forced || probinj(45,inj) || (mSmallsize in old_mutations))
M << "\blue Your skin feels rubbery"
M.mutations.Add(mSmallsize)
M.pass_flags |= 1
if (M.dna.GetSEState(HULKBLOCK))
if(forced || probinj(5,inj) || (HULK in old_mutations))
M << "\blue Your muscles hurt."
M.mutations.Add(HULK)
if (M.dna.GetSEState(HEADACHEBLOCK))
M.disabilities |= EPILEPSY
M << "\red You get a headache."
if (M.dna.GetSEState(FAKEBLOCK))
M << "\red You feel strange."
if (prob(95))
if(prob(50))
randmutb(M)
else
randmuti(M)
else
randmutg(M)
if (M.dna.GetSEState(COUGHBLOCK))
M.disabilities |= COUGHING
M << "\red You start coughing."
if (M.dna.GetSEState(CLUMSYBLOCK))
M << "\red You feel lightheaded."
M.mutations.Add(CLUMSY)
if (M.dna.GetSEState(TWITCHBLOCK))
M.disabilities |= TOURETTES
M << "\red You twitch."
if (M.dna.GetSEState(XRAYBLOCK))
if(forced || probinj(30,inj) || (XRAY in old_mutations))
M << "\blue The walls suddenly disappear."
// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
// M.see_in_dark = 8
// M.see_invisible = 2
M.mutations.Add(XRAY)
if (M.dna.GetSEState(NERVOUSBLOCK))
M.disabilities |= NERVOUS
M << "\red You feel nervous."
if (M.dna.GetSEState(FIREBLOCK))
if(!(mHeatres in old_mutations))
if(forced || probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
M << "\blue Your body feels warm."
M.mutations.Add(COLD_RESISTANCE)
else
if(forced || probinj(5,inj) || (COLD_RESISTANCE in old_mutations))
M << "\blue Your body feels warm."
M.mutations.Add(COLD_RESISTANCE)
if (M.dna.GetSEState(BLINDBLOCK))
M.sdisabilities |= BLIND
M << "\red You can't seem to see anything."
if (M.dna.GetSEState(TELEBLOCK))
if(forced || probinj(15,inj) || (TK in old_mutations))
M << "\blue You feel smarter."
M.mutations.Add(TK)
if (M.dna.GetSEState(DEAFBLOCK))
M.sdisabilities |= DEAF
M.ear_deaf = 1
M << "\red Its kinda quiet.."
if (M.dna.GetSEState(GLASSESBLOCK))
M.disabilities |= NEARSIGHTED
M << "Your eyes feel weird..."
/* If you want the new mutations to work, UNCOMMENT THIS.
if(istype(M, /mob/living/carbon))
for (var/datum/mutations/mut in global_mutations)
mut.check_mutation(M)
*/
//////////////////////////////////////////////////////////// Monkey Block
if (M.dna.GetSEState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
// human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
if (!M.dna.GetSEState(MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
// monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O = new( src )
if(Mo.greaterform)
O.set_species(Mo.greaterform)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if(M)
M.update_icon = 1 //queue a full icon update at next life() call
return null
/////////////////////////// DNA MISC-PROCS
*/

View File

@@ -172,308 +172,4 @@
/proc/probinj(var/pr, var/inj) /proc/probinj(var/pr, var/inj)
return prob(pr+inj*pr) return prob(pr+inj*pr)
// (Re-)Apply mutations.
// TODO: Turn into a /mob proc, change inj to a bitflag for various forms of differing behavior.
// M: Mob to mess with
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
// inj: 1 for if we're checking this from an injector, screws with manifestation probability calc.
/proc/domutcheck(mob/living/M as mob, connected, inj)
if (!M) return
M.dna.check_integrity()
M.disabilities = 0
M.sdisabilities = 0
var/old_mutations = M.mutations
M.mutations = list()
M.pass_flags = 0
// M.see_in_dark = 2
// M.see_invisible = 0
if(PLANT in old_mutations)
M.mutations.Add(PLANT)
if(SKELETON in old_mutations)
M.mutations.Add(SKELETON)
if(FAT in old_mutations)
M.mutations.Add(FAT)
if(HUSK in old_mutations)
M.mutations.Add(HUSK)
/////////////////////////////////////
// IMPORTANT REMINDER
// IF A BLOCK IS SET TO 0 (unused)
// GetSEState(block) WILL RETURN 0
/////////////////////////////////////
if(M.dna.GetSEState(NOBREATHBLOCK))
if(probinj(45,inj) || (mNobreath in old_mutations))
M << "\blue You feel no need to breathe."
M.mutations.Add(mNobreath)
if(M.dna.GetSEState(REMOTEVIEWBLOCK))
if(probinj(45,inj) || (mRemote in old_mutations))
M << "\blue Your mind expands"
M.mutations.Add(mRemote)
M.verbs += /mob/living/carbon/human/proc/remoteobserve
if(M.dna.GetSEState(REGENERATEBLOCK))
if(probinj(45,inj) || (mRegen in old_mutations))
M << "\blue You feel better"
M.mutations.Add(mRegen)
if(M.dna.GetSEState(INCREASERUNBLOCK))
if(probinj(45,inj) || (mRun in old_mutations))
M << "\blue Your leg muscles pulsate."
M.mutations.Add(mRun)
if(M.dna.GetSEState(REMOTETALKBLOCK))
if(probinj(45,inj) || (mRemotetalk in old_mutations))
M << "\blue You expand your mind outwards"
M.mutations.Add(mRemotetalk)
M.verbs += /mob/living/carbon/human/proc/remotesay
if(M.dna.GetSEState(MORPHBLOCK))
if(probinj(45,inj) || (mMorph in old_mutations))
M.mutations.Add(mMorph)
M << "\blue Your skin feels strange"
M.verbs += /mob/living/carbon/human/proc/morph
if(M.dna.GetSEState(HALLUCINATIONBLOCK))
if(probinj(45,inj) || (mHallucination in old_mutations))
M.mutations.Add(mHallucination)
M << "\red Your mind says 'Hello'"
if(M.dna.GetSEState(NOPRINTSBLOCK))
if(probinj(45,inj) || (mFingerprints in old_mutations))
M.mutations.Add(mFingerprints)
M << "\blue Your fingers feel numb"
if(M.dna.GetSEState(SHOCKIMMUNITYBLOCK))
if(probinj(45,inj) || (mShock in old_mutations))
M.mutations.Add(mShock)
M << "\blue Your skin feels strange"
if(M.dna.GetSEState(SMALLSIZEBLOCK))
if(probinj(45,inj) || (mSmallsize in old_mutations))
M << "\blue Your skin feels rubbery"
M.mutations.Add(mSmallsize)
M.pass_flags |= 1
if (M.dna.GetSEState(HULKBLOCK))
if(probinj(5,inj) || (HULK in old_mutations))
M << "\blue Your muscles hurt."
M.mutations.Add(HULK)
if (M.dna.GetSEState(HEADACHEBLOCK))
M.disabilities |= EPILEPSY
M << "\red You get a headache."
if (M.dna.GetSEState(FAKEBLOCK))
M << "\red You feel strange."
if (prob(95))
if(prob(50))
randmutb(M)
else
randmuti(M)
else
randmutg(M)
if (M.dna.GetSEState(COUGHBLOCK))
M.disabilities |= COUGHING
M << "\red You start coughing."
if (M.dna.GetSEState(CLUMSYBLOCK))
M << "\red You feel lightheaded."
M.mutations.Add(CLUMSY)
if (M.dna.GetSEState(TWITCHBLOCK))
M.disabilities |= TOURETTES
M << "\red You twitch."
if (M.dna.GetSEState(XRAYBLOCK))
if(probinj(30,inj) || (XRAY in old_mutations))
M << "\blue The walls suddenly disappear."
// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
// M.see_in_dark = 8
// M.see_invisible = 2
M.mutations.Add(XRAY)
if (M.dna.GetSEState(NERVOUSBLOCK))
M.disabilities |= NERVOUS
M << "\red You feel nervous."
if (M.dna.GetSEState(FIREBLOCK))
if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
M << "\blue Your body feels warm."
M.mutations.Add(COLD_RESISTANCE)
if (M.dna.GetSEState(BLINDBLOCK))
M.sdisabilities |= BLIND
M << "\red You can't seem to see anything."
if (M.dna.GetSEState(TELEBLOCK))
if(probinj(15,inj) || (TK in old_mutations))
M << "\blue You feel smarter."
M.mutations.Add(TK)
if (M.dna.GetSEState(DEAFBLOCK))
M.sdisabilities |= DEAF
M.ear_deaf = 1
M << "\red Its kinda quiet.."
if (M.dna.GetSEState(GLASSESBLOCK))
M.disabilities |= NEARSIGHTED
M << "Your eyes feel weird..."
/* If you want the new mutations to work, UNCOMMENT THIS.
if(istype(M, /mob/living/carbon))
for (var/datum/mutations/mut in global_mutations)
mut.check_mutation(M)
*/
//////////////////////////////////////////////////////////// Monkey Block
if (M.dna.GetSEState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
// human > monkey
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
if (!M.dna.GetSEState(MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
// monkey > human,
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O = new( src )
if(Mo.greaterform)
O.set_species(Mo.greaterform)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
//////////////////////////////////////////////////////////// Monkey Block
if(M)
M.update_icon = 1 //queue a full icon update at next life() call
return null
/////////////////////////// DNA MISC-PROCS /////////////////////////// DNA MISC-PROCS

View File

@@ -1,5 +1,37 @@
#define DNA_BLOCK_SIZE 3 #define DNA_BLOCK_SIZE 3
// Buffer datatype flags.
#define DNA2_BUF_UI 1
#define DNA2_BUF_UE 2
#define DNA2_BUF_SE 4
//list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
/datum/dna2/record
var/datum/dna/dna = null
var/types=0
var/name="Empty"
// Stuff for cloners
var/id=null
var/implant=null
var/ckey=null
var/mind=null
/datum/dna2/record/proc/GetData()
var/list/ser=list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
ser["ue"] = (types & DNA2_BUF_UE) == DNA2_BUF_UE
if(types & DNA2_BUF_SE)
ser["data"] = dna.SE
else
ser["data"] = dna.UI
ser["owner"] = src.dna.real_name
ser["label"] = name
if(types & DNA2_BUF_UI)
ser["type"] = "ui"
else
ser["type"] = "se"
return ser
/////////////////////////// DNA MACHINES /////////////////////////// DNA MACHINES
/obj/machinery/dna_scannernew /obj/machinery/dna_scannernew
name = "\improper DNA modifier" name = "\improper DNA modifier"
@@ -14,6 +46,7 @@
var/locked = 0 var/locked = 0
var/mob/living/carbon/occupant = null var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null var/obj/item/weapon/reagent_containers/glass/beaker = null
var/opened = 0
/obj/machinery/dna_scannernew/New() /obj/machinery/dna_scannernew/New()
..() ..()
@@ -80,12 +113,6 @@
usr.loc = src usr.loc = src
src.occupant = usr src.occupant = usr
src.icon_state = "scanner_1" src.icon_state = "scanner_1"
/*
for(var/obj/O in src) // THIS IS P. STUPID -- LOVE, DOOHL
//O = null
del(O)
//Foreach goto(124)
*/
src.add_fingerprint(usr) src.add_fingerprint(usr)
return return
@@ -111,7 +138,12 @@
if (G.affecting.abiotic()) if (G.affecting.abiotic())
user << "\blue <B>Subject cannot have abiotic items on.</B>" user << "\blue <B>Subject cannot have abiotic items on.</B>"
return return
var/mob/M = G.affecting put_in(G.affecting)
src.add_fingerprint(user)
del(G)
return
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
if(M.client) if(M.client)
M.client.perspective = EYE_PERSPECTIVE M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src M.client.eye = src
@@ -119,8 +151,6 @@
src.occupant = M src.occupant = M
src.icon_state = "scanner_1" src.icon_state = "scanner_1"
src.add_fingerprint(user)
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner // search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \ if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \ || locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \
@@ -132,19 +162,11 @@
if(ghost.mind == M.mind) 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>" 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 break
del(G)
return return
/obj/machinery/dna_scannernew/proc/go_out() /obj/machinery/dna_scannernew/proc/go_out()
if ((!( src.occupant ) || src.locked)) if ((!( src.occupant ) || src.locked))
return return
/*
// it's like this was -just- here to break constructed dna scanners -Pete
// if that's not the case, slap my shit and uncomment this.
// for(var/obj/O in src)
// O.loc = src.loc
*/
//Foreach goto(30)
if (src.occupant.client) if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE src.occupant.client.perspective = MOB_PERSPECTIVE
@@ -205,11 +227,7 @@
var/selected_ui_target_hex = 1 var/selected_ui_target_hex = 1
var/radiation_duration = 2.0 var/radiation_duration = 2.0
var/radiation_intensity = 1.0 var/radiation_intensity = 1.0
var/list/buffers = list( var/list/datum/dna2/record/buffers[3]
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
)
var/irradiating = 0 var/irradiating = 0
var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/obj/machinery/dna_scannernew/connected = null var/obj/machinery/dna_scannernew/connected = null
@@ -219,6 +237,7 @@
use_power = 1 use_power = 1
idle_power_usage = 10 idle_power_usage = 10
active_power_usage = 400 active_power_usage = 400
var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob) /obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver)) if(istype(I, /obj/item/weapon/screwdriver))
@@ -308,13 +327,13 @@
arr += "[i]:[EncodeDNABlock(buffer[i])]" arr += "[i]:[EncodeDNABlock(buffer[i])]"
return arr return arr
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/list/buffer) /obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/datum/dna2/record/buffer)
var/pos = findtext(blk,":") var/pos = findtext(blk,":")
if(!pos) return 0 if(!pos) return 0
var/id = text2num(copytext(blk,1,pos)) var/id = text2num(copytext(blk,1,pos))
if(!id) return 0 if(!id) return 0
I.block = id I.block = id
I.dna = list(buffer[id]) I.buf = buffer
return 1 return 1
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob) /obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
@@ -336,6 +355,7 @@
ui_interact(user) ui_interact(user)
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob) /obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
src.add_hiddenprint(user)
ui_interact(user) ui_interact(user)
/obj/machinery/computer/scan_consolenew/attack_hand(user as mob) /obj/machinery/computer/scan_consolenew/attack_hand(user as mob)
@@ -345,7 +365,7 @@
/** /**
* The ui_interact proc is used to open and update Nano UIs * The ui_interact proc is used to open and update Nano UIs
* If ui_interact is not used then the UI will not update correctly * If ui_interact is not used then the UI will not update correctly
* ui_interact is currently defined for /atom/movable * ui_interact is currently defined for /atom/movable (which is inherited by /obj and /mob)
* *
* @param user /mob The mob who is interacting with this ui * @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
@@ -369,21 +389,20 @@
data["hasDisk"] = disk ? 1 : 0 data["hasDisk"] = disk ? 1 : 0
var/diskData[0] var/diskData[0]
if (!disk) if (!disk || !disk.buf)
diskData["data"] = null diskData["data"] = null
diskData["owner"] = null diskData["owner"] = null
diskData["label"] = null diskData["label"] = null
diskData["type"] = null diskData["type"] = null
diskData["ue"] = null diskData["ue"] = null
else else
diskData["data"] = disk.data diskData = disk.buf.GetData()
diskData["owner"] = disk.owner
diskData["label"] = disk.name
diskData["type"] = disk.data_type
diskData["ue"] = disk.ue
data["disk"] = diskData data["disk"] = diskData
data["buffers"] = buffers var/list/new_buffers = list()
for(var/datum/dna2/record/buf in buffers)
new_buffers.Add(buf.GetData())
data["buffers"]=new_buffers
data["radiationIntensity"] = radiation_intensity data["radiationIntensity"] = radiation_intensity
data["radiationDuration"] = radiation_duration data["radiationDuration"] = radiation_duration
@@ -433,22 +452,18 @@
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list) for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume data["beakerVolume"] += R.volume
if (!ui) // no ui has been passed, so we'll search for one // update the ui if it exists, returns null if no ui is passed/found
{ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.get_open_ui(user, src, ui_key)
}
if (!ui) if (!ui)
// the ui does not exist, so we'll create a new one // the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
// When the UI is first opened this is the data it will use // when the ui is first opened this is the data it will use
ui.set_initial_data(data) ui.set_initial_data(data)
// open the new ui window
ui.open() ui.open()
// Auto update every Master Controller tick // auto update every Master Controller tick
ui.set_auto_update(1) ui.set_auto_update(1)
else
// The UI is already open so push the new data to it
ui.push_data(data)
return
/obj/machinery/computer/scan_consolenew/Topic(href, href_list) /obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..()) if(..())
@@ -624,10 +639,13 @@
src.selected_se_block = select_block src.selected_se_block = select_block
if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1)) if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
src.selected_se_subblock = select_subblock src.selected_se_subblock = select_subblock
//testing("User selected block [selected_se_block] (sent [select_block]), subblock [selected_se_subblock] (sent [select_block]).")
return 1 // return 1 forces an update to all Nano uis attached to src return 1 // return 1 forces an update to all Nano uis attached to src
if (href_list["pulseSERadiation"]) if (href_list["pulseSERadiation"])
var/block = src.connected.occupant.dna.GetSESubBlock(src.selected_se_block,src.selected_se_subblock) var/block = src.connected.occupant.dna.GetSESubBlock(src.selected_se_block,src.selected_se_subblock)
//var/original_block=block
//testing("Irradiating SE block [src.selected_se_block]:[src.selected_se_subblock] ([block])...")
irradiating = src.radiation_duration irradiating = src.radiation_duration
var/lock_state = src.connected.locked var/lock_state = src.connected.locked
@@ -650,23 +668,27 @@
else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE) else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE)
real_SE_block-- real_SE_block--
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block) connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration) src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
domutcheck(src.connected.occupant,src.connected)
else else
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
if (prob(80-src.radiation_duration)) if (prob(80-src.radiation_duration))
//testing("Random bad mut!")
randmutb(src.connected.occupant) randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected) domutcheck(src.connected.occupant,src.connected)
else else
randmuti(src.connected.occupant) randmuti(src.connected.occupant)
//testing("Random identity mut!")
src.connected.occupant.UpdateAppearance() src.connected.occupant.UpdateAppearance()
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
src.connected.locked = lock_state src.connected.locked = lock_state
return 1 // return 1 forces an update to all Nano uis attached to src return 1 // return 1 forces an update to all Nano uis attached to src
if(href_list["ejectBeaker"]) if(href_list["ejectBeaker"])
if(connected.beaker) if(connected.beaker)
connected.beaker.loc = connected.loc var/obj/item/weapon/reagent_containers/glass/B = connected.beaker
B.loc = connected.loc
connected.beaker = null connected.beaker = null
return 1 return 1
@@ -684,11 +706,7 @@
//src.temphtml = "Invalid disk. Please try again." //src.temphtml = "Invalid disk. Please try again."
return 0 return 0
src.disk.data = null src.disk.buf=null
src.disk.data_type = null
src.disk.ue = null
src.disk.owner = null
src.disk.name = null
//src.temphtml = "Data saved." //src.temphtml = "Data saved."
return 1 return 1
@@ -710,50 +728,40 @@
if (bufferOption == "saveUI") if (bufferOption == "saveUI")
if(src.connected.occupant && src.connected.occupant.dna) if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["ue"] = 0 var/datum/dna2/record/databuf=new
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI databuf.types = DNA2_BUF_UE
if (!istype(src.connected.occupant,/mob/living/carbon/human)) databuf.dna = src.connected.occupant.dna
src.buffers[bufferId]["owner"] = src.connected.occupant.name databuf.name = "Unique Identifier"
else src.buffers[bufferId] = databuf
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
src.buffers[bufferId]["label"] = "Unique Identifier"
src.buffers[bufferId]["type"] = "ui"
return 1 return 1
if (bufferOption == "saveUIAndUE") if (bufferOption == "saveUIAndUE")
if(src.connected.occupant && src.connected.occupant.dna) if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI var/datum/dna2/record/databuf=new
if (!istype(src.connected.occupant,/mob/living/carbon/human)) databuf.types = DNA2_BUF_UI|DNA2_BUF_UE
src.buffers[bufferId]["owner"] = src.connected.occupant.name databuf.dna = src.connected.occupant.dna
else databuf.name = "Unique Identifier + Unique Enzymes"
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name src.buffers[bufferId] = databuf
src.buffers[bufferId]["label"] = "Unique Identifier + Unique Enzymes"
src.buffers[bufferId]["type"] = "ui"
src.buffers[bufferId]["ue"] = 1
return 1 return 1
if (bufferOption == "saveSE") if (bufferOption == "saveSE")
if(src.connected.occupant && src.connected.occupant.dna) if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["ue"] = 0 var/datum/dna2/record/databuf=new
src.buffers[bufferId]["data"] = src.connected.occupant.dna.SE databuf.types = DNA2_BUF_SE
if (!istype(src.connected.occupant,/mob/living/carbon/human)) databuf.dna = src.connected.occupant.dna
src.buffers[bufferId]["owner"] = src.connected.occupant.name databuf.name = "Structural Enzymes"
else src.buffers[bufferId] = databuf
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
src.buffers[bufferId]["label"] = "Structural Enzymes"
src.buffers[bufferId]["type"] = "se"
return 1 return 1
if (bufferOption == "clear") if (bufferOption == "clear")
src.buffers[bufferId]["data"] = null src.buffers[bufferId]=null
src.buffers[bufferId]["owner"] = null
src.buffers[bufferId]["label"] = null
src.buffers[bufferId]["ue"] = null
return 1 return 1
if (bufferOption == "changeLabel") if (bufferOption == "changeLabel")
var/label = src.buffers[bufferId]["label"] ? src.buffers[bufferId]["label"] : "New Label" var/datum/dna2/record/buf = src.buffers[bufferId]
src.buffers[bufferId]["label"] = sanitize(input("New Label:", "Edit Label", label)) buf.name = buf.name ? src.buffers[bufferId]["label"] : "New Label"
buf.name = sanitize(input("New Label:", "Edit Label", buf.name))
src.buffers[bufferId] = buf
return 1 return 1
if (bufferOption == "transfer") if (bufferOption == "transfer")
@@ -770,32 +778,36 @@
irradiating = 0 irradiating = 0
src.connected.locked = lock_state src.connected.locked = lock_state
if (src.buffers[bufferId]["type"] == "ui") var/datum/dna2/record/buf = src.buffers[bufferId]
if (src.buffers[bufferId]["ue"])
src.connected.occupant.real_name = src.buffers[bufferId]["owner"] if ((buf.types & DNA2_BUF_UI))
src.connected.occupant.name = src.buffers[bufferId]["owner"] if ((buf.types & DNA2_BUF_UE))
src.connected.occupant.UpdateAppearance(src.buffers[bufferId]["data"]) src.connected.occupant.real_name = buf.dna.real_name
else if (src.buffers[bufferId]["type"] == "se") src.connected.occupant.name = buf.dna.real_name
src.connected.occupant.dna.SE = src.buffers[bufferId]["data"] src.connected.occupant.UpdateAppearance(buf.dna.UI)
else if (buf.types & DNA2_BUF_SE)
src.connected.occupant.dna.SE = buf.dna.SE
src.connected.occupant.dna.UpdateSE() src.connected.occupant.dna.UpdateSE()
domutcheck(src.connected.occupant,src.connected) domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += rand(20,50) src.connected.occupant.radiation += rand(20,50)
return 1 return 1
if (bufferOption == "createInjector") if (bufferOption == "createInjector")
if (src.injector_ready) if (src.injector_ready || waiting_for_user_input)
var/success = 1 var/success = 1
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
I.dnatype = src.buffers[bufferId]["type"] var/datum/dna2/record/buf = src.buffers[bufferId]
if(href_list["createBlockInjector"]) if(href_list["createBlockInjector"])
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffers[bufferId]["data"]) waiting_for_user_input=1
success = setInjectorBlock(I,blk,src.buffers[bufferId]["data"]) var/blk = input(usr,"Select Block","Block") in all_dna_blocks(buf.GetData())
success = setInjectorBlock(I,blk,buf)
else else
I.dna = src.buffers[bufferId]["data"] I.buf = buf
waiting_for_user_input=0
if(success) if(success)
I.loc = src.loc I.loc = src.loc
I.name += " ([src.buffers[bufferId]["label"]])" I.name += " ([buf.name])"
if (src.buffers[bufferId]["ue"]) I.ue = src.buffers[bufferId]["owner"] //lazy haw haw
//src.temphtml = "Injector created." //src.temphtml = "Injector created."
src.injector_ready = 0 src.injector_ready = 0
spawn(300) spawn(300)
@@ -807,14 +819,11 @@
return 1 return 1
if (bufferOption == "loadDisk") if (bufferOption == "loadDisk")
if ((isnull(src.disk)) || (!src.disk.data) || (src.disk.data == "")) if ((isnull(src.disk)) || (!src.disk.buf))
//src.temphtml = "Invalid disk. Please try again." //src.temphtml = "Invalid disk. Please try again."
return 0 return 0
src.buffers[bufferId]["data"] = src.disk.data src.buffers[bufferId]=src.disk.buf
src.buffers[bufferId]["type"] = src.disk.data_type
src.buffers[bufferId]["ue"] = src.disk.ue
src.buffers[bufferId]["owner"] = src.disk.owner
//src.temphtml = "Data loaded." //src.temphtml = "Data loaded."
return 1 return 1
@@ -823,11 +832,10 @@
//src.temphtml = "Invalid disk. Please try again." //src.temphtml = "Invalid disk. Please try again."
return 0 return 0
src.disk.data = buffers[bufferId]["data"] var/datum/dna2/record/buf = src.buffers[bufferId]
src.disk.data_type = src.buffers[bufferId]["type"]
src.disk.ue = src.buffers[bufferId]["ue"] src.disk.buf = buf
src.disk.owner = src.buffers[bufferId]["owner"] src.disk.name = "data disk - '[buf.dna.real_name]'"
src.disk.name = "data disk - '[src.buffers[bufferId]["owner"]]'"
//src.temphtml = "Data saved." //src.temphtml = "Data saved."
return 1 return 1

View File

@@ -0,0 +1,125 @@
/////////////////////
// DISABILITY GENES
//
// These activate either a mutation, disability, or sdisability.
//
// Gene is always activated.
/////////////////////
/datum/dna/gene/disability
name="DISABILITY"
// Mutation to give (or 0)
var/mutation=0
// Disability to give (or 0)
var/disability=0
// SDisability to give (or 0)
var/sdisability=0
// Activation message
var/activation_message=""
// Yay, you're no longer growing 3 arms
var/deactivation_message=""
/datum/dna/gene/disability/can_activate(var/mob/M,var/flags)
return 1 // Always set!
/datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags)
if(mutation && !(mutation in M.mutations))
M.mutations.Add(mutation)
if(disability)
M.disabilities|=disability
if(sdisability)
M.sdisabilities|=sdisability
if(activation_message)
M << "\red [activation_message]"
/datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags)
if(mutation && (mutation in M.mutations))
M.mutations.Remove(mutation)
if(disability)
M.disabilities &= ~disability
if(sdisability)
M.sdisabilities &= ~sdisability
if(deactivation_message)
M << "\red [deactivation_message]"
// Note: Doesn't seem to do squat, at the moment.
/datum/dna/gene/disability/hallucinate
name="Hallucinate"
activation_message="Your mind says 'Hello'."
mutation=mHallucination
New()
block=HALLUCINATIONBLOCK
/datum/dna/gene/disability/epilepsy
name="Epilepsy"
activation_message="You get a headache."
disability=EPILEPSY
New()
block=HEADACHEBLOCK
/datum/dna/gene/disability/cough
name="Coughing"
activation_message="You start coughing."
disability=COUGHING
New()
block=COUGHBLOCK
/datum/dna/gene/disability/clumsy
name="Clumsiness"
activation_message="You feel lightheaded."
mutation=CLUMSY
New()
block=CLUMSYBLOCK
/datum/dna/gene/disability/tourettes
name="Tourettes"
activation_message="You twitch."
disability=TOURETTES
New()
block=TWITCHBLOCK
/datum/dna/gene/disability/nervousness
name="Nervousness"
activation_message="You feel nervous."
disability=NERVOUS
New()
block=NERVOUSBLOCK
/datum/dna/gene/disability/blindness
name="Blindness"
activation_message="You can't seem to see anything."
sdisability=BLIND
New()
block=BLINDBLOCK
/datum/dna/gene/disability/deaf
name="Deafness"
activation_message="It's kinda quiet."
sdisability=DEAF
New()
block=DEAFBLOCK
activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.ear_deaf = 1
/datum/dna/gene/disability/nearsighted
name="Nearsightedness"
activation_message="Your eyes feel weird..."
disability=NEARSIGHTED
New()
block=GLASSESBLOCK

View File

@@ -0,0 +1,88 @@
/**
* Gene Datum
*
* domutcheck was getting pretty hairy. This is the solution.
*
* All genes are stored in a global variable to cut down on memory
* usage.
*
* @author N3X15 <nexisentertainment@gmail.com>
*/
/datum/dna/gene
// Display name
var/name="BASE GENE"
// Probably won't get used but why the fuck not
var/desc="Oh god who knows what this does."
// Set in initialize()!
// What gene activates this?
var/block=0
// Any of a number of GENE_ flags.
var/flags=0
// Return 1 if we can activate.
// HANDLE MUTCHK_FORCED HERE!
/datum/dna/gene/proc/can_activate(var/mob/M, var/flags)
return 0
// Called when the gene activates. Do your magic here.
/datum/dna/gene/proc/activate(var/mob/M, var/connected, var/flags)
return
// Called when the gene deactivates. Undo your magic here.
// Only called when the block is deactivated.
/datum/dna/gene/proc/deactivate(var/mob/M, var/connected, var/flags)
return
/////////////////////
// BASIC GENES
//
// These just chuck in a mutation and display a message.
//
// Gene is activated:
// 1. If mutation already exists in mob
// 2. If the probability roll succeeds
// 3. Activation is forced (done in domutcheck)
/////////////////////
/datum/dna/gene/basic
name="BASIC GENE"
// Mutation to give
var/mutation=0
// Activation probability
var/activation_prob=45
// Possible activation messages
var/list/activation_messages=list()
// Possible deactivation messages
var/list/deactivation_messages=list()
/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
if(mutation==0)
return 0
// Probability check
if(flags & MUTCHK_FORCED || probinj(activation_prob,(flags&MUTCHK_FORCED)))
return 1
return 0
/datum/dna/gene/basic/activate(var/mob/M)
M.mutations.Add(mutation)
if(activation_messages.len)
var/msg = pick(activation_messages)
M << "\blue [msg]"
/datum/dna/gene/basic/deactivate(var/mob/M)
M.mutations.Remove(mutation)
if(deactivation_messages.len)
var/msg = pick(deactivation_messages)
M << "\red [msg]"

View File

@@ -0,0 +1,170 @@
/datum/dna/gene/monkey
name="Monkey"
/datum/dna/gene/monkey/New()
block=MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/human))
return
var/mob/living/carbon/human/H = M
H.monkeyizing = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/monkey))
return
var/mob/living/carbon/monkey/Mo = M
Mo.monkeyizing = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
del(animation)
var/mob/living/carbon/human/O = new( src )
if(Mo.greaterform)
O.set_species(Mo.greaterform)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// del(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
del(M)
return

View File

@@ -0,0 +1,167 @@
///////////////////////////////////
// POWERS
///////////////////////////////////
/datum/dna/gene/basic/nobreath
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
mutation=mNobreath
New()
block=NOBREATHBLOCK
/datum/dna/gene/basic/remoteview
name="Remote Viewing"
activation_messages=list("Your mind expands.")
mutation=mRemote
New()
block=REMOTEVIEWBLOCK
activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.verbs += /mob/living/carbon/human/proc/remoteobserve
/datum/dna/gene/basic/regenerate
name="Regenerate"
activation_messages=list("You feel better.")
mutation=mRegen
New()
block=REGENERATEBLOCK
/datum/dna/gene/basic/increaserun
name="Super Speed"
activation_messages=list("Your leg muscles pulsate.")
mutation=mRun
New()
block=INCREASERUNBLOCK
/datum/dna/gene/basic/remotetalk
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=mRemotetalk
New()
block=REMOTETALKBLOCK
activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.verbs += /mob/living/carbon/human/proc/remotesay
/datum/dna/gene/basic/morph
name="Morph"
activation_messages=list("Your skin feels strange.")
mutation=mMorph
New()
block=MORPHBLOCK
activate(var/mob/M)
..(M)
M.verbs += /mob/living/carbon/human/proc/morph
/* Not used on bay
/datum/dna/gene/basic/heat_resist
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
mutation=mHeatres
New()
block=COLDBLOCK
can_activate(var/mob/M,var/flags)
// Probability check
var/_prob = 15
if(COLD_RESISTANCE in M.mutations)
_prob=5
if(probinj(_prob,(flags&MUTCHK_FORCED)))
return 1
*/
/datum/dna/gene/basic/cold_resist
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
mutation=COLD_RESISTANCE
New()
block=FIREBLOCK
can_activate(var/mob/M,var/flags)
// Probability check
var/_prob=30
//if(mHeatres in M.mutations)
// _prob=5
if(probinj(_prob,(flags&MUTCHK_FORCED)))
return 1
/datum/dna/gene/basic/noprints
name="No Prints"
activation_messages=list("Your fingers feel numb.")
mutation=mFingerprints
New()
block=NOPRINTSBLOCK
/datum/dna/gene/basic/noshock
name="Shock Immunity"
activation_messages=list("Your skin feels strange.")
mutation=mShock
New()
block=SHOCKIMMUNITYBLOCK
/datum/dna/gene/basic/midget
name="Midget"
activation_messages=list("Your skin feels rubbery.")
mutation=mSmallsize
New()
block=SMALLSIZEBLOCK
can_activate(var/mob/M,var/flags)
// Can't be big and small.
if(HULK in M.mutations)
return 0
return ..(M,flags)
activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.pass_flags |= 1
deactivate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get passtable short of varediting so it should be fine. ~Z
/datum/dna/gene/basic/hulk
name="Hulk"
activation_messages=list("Your muscles hurt.")
mutation=HULK
New()
block=HULKBLOCK
can_activate(var/mob/M,var/flags)
// Can't be big and small.
if(mSmallsize in M.mutations)
return 0
return ..(M,flags)
/datum/dna/gene/basic/xray
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
mutation=XRAY
New()
block=XRAYBLOCK
/datum/dna/gene/basic/tk
name="Telekenesis"
activation_messages=list("You feel smarter.")
mutation=TK
activation_prob=15
New()
block=TELEBLOCK

View File

@@ -205,6 +205,10 @@
var/datum/changeling/changeling = changeling_power(1,0,0) var/datum/changeling/changeling = changeling_power(1,0,0)
if(!changeling) return 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 var/mob/living/carbon/C = src
changeling.chem_charges-- changeling.chem_charges--
C.remove_changeling_powers() C.remove_changeling_powers()

View File

@@ -1,5 +1,3 @@
#define METEOR_TEMPERATURE
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds /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 //set to at least 100 unless you want evarr ruining every round
@@ -95,18 +93,9 @@
icon_state = "smallf" icon_state = "smallf"
pass_flags = PASSTABLE | PASSGRILLE 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) /obj/effect/meteor/Bump(atom/A)
spawn(0) 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) if (A)
A.meteorhit(src) A.meteorhit(src)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1) playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
@@ -117,9 +106,7 @@
if(!istype(A,/obj/machinery/power/emitter) && \ if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \ !istype(A,/obj/machinery/field_generator) && \
prob(15)) prob(15))
explosion(src.loc, 4, 5, 6, 7, 0) explosion(src.loc, 4, 5, 6, 7, 0)
playsound(src.loc, "explosion", 50, 1)
del(src) del(src)
return return
@@ -146,16 +133,18 @@
if(--src.hits <= 0) if(--src.hits <= 0)
del(src) //Dont blow up singularity containment if we get stuck there. 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) if (A)
explosion(src.loc, 0, 1, 2, 3, 0) 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)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1) playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
explosion(src.loc, 0, 1, 2, 3, 0)
if (--src.hits <= 0) if (--src.hits <= 0)
if(prob(15) && !istype(A, /obj/structure/grille)) if(prob(15) && !istype(A, /obj/structure/grille))
explosion(src.loc, 1, 2, 3, 4, 0) explosion(src.loc, 1, 2, 3, 4, 0)
playsound(src.loc, "explosion", 50, 1)
del(src) del(src)
return return

View File

@@ -96,8 +96,20 @@
//SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign) //SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign)
//SMALLSIZEBLOCK = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS) //SMALLSIZEBLOCK = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS)
// And the genes that actually do the work. (domutcheck improvements)
var/list/blocks_assigned[STRUCDNASIZE]
for(var/gene_type in typesof(/datum/dna/gene))
var/datum/dna/gene/G = new gene_type
if(G.block)
if(G.block in blocks_assigned)
warning("DNA2: Gene [G.name] trying to use already-assigned block [G.block] (used by [english_list(blocks_assigned[G.block])])")
dna_genes.Add(G)
var/list/assignedToBlock[0]
if(blocks_assigned[G.block])
assignedToBlock=blocks_assigned[G.block]
assignedToBlock.Add(G.name)
blocks_assigned[G.block]=assignedToBlock
testing("DNA2: Gene [G.name] assigned to block [G.block].")
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION // HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION

View File

@@ -19,6 +19,10 @@
if(istype(M, /mob/living/carbon/human/dummy)) if(istype(M, /mob/living/carbon/human/dummy))
return..() 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>") 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>") 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>)") 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>)")

View File

@@ -250,6 +250,9 @@
dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4)) dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
dat += text("Body Temperature: [occupant.bodytemperature-T0C]&deg;C ([occupant.bodytemperature*1.8-459.67]&deg;F)<BR><HR>") dat += text("Body Temperature: [occupant.bodytemperature-T0C]&deg;C ([occupant.bodytemperature*1.8-459.67]&deg;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) if(occupant.vessel)
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood")) var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
var/blood_percent = blood_volume / 560 var/blood_percent = blood_volume / 560

View File

@@ -243,14 +243,14 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
if(href_list["toggle"]) if(href_list["toggle"])
if (valve_open) if (valve_open)
if (holding) if (holding)
release_log += "Valve was <b>closed</b> by [usr], stopping the transfer into the [holding]<br>" release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
else else
release_log += "Valve was <b>closed</b> by [usr], stopping the transfer into the <font color='red'><b>air</b></font><br>" release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
else else
if (holding) if (holding)
release_log += "Valve was <b>opened</b> by [usr], starting the transfer into the [holding]<br>" release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
else else
release_log += "Valve was <b>opened</b> by [usr], starting the transfer into the <font color='red'><b>air</b></font><br>" release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
valve_open = !valve_open valve_open = !valve_open
if (href_list["remove_tank"]) if (href_list["remove_tank"])

View File

@@ -56,7 +56,7 @@
src.visible_message("\red <B>[user] has slashed [src]!</B>") src.visible_message("\red <B>[user] has slashed [src]!</B>")
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1) playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
if(prob(10)) if(prob(10))
new /obj/effect/decal/cleanable/oil(src.loc) new /obj/effect/decal/cleanable/blood/oil(src.loc)
healthcheck() healthcheck()
@@ -66,7 +66,7 @@
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>") src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>") M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
if(prob(10)) if(prob(10))
new /obj/effect/decal/cleanable/oil(src.loc) new /obj/effect/decal/cleanable/blood/oil(src.loc)
healthcheck() healthcheck()

View File

@@ -298,19 +298,15 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/proc/get_targets() /obj/machinery/bot/cleanbot/proc/get_targets()
src.target_types = new/list() src.target_types = new/list()
target_types += /obj/effect/decal/cleanable/oil target_types += /obj/effect/decal/cleanable/blood/oil
target_types += /obj/effect/decal/cleanable/vomit target_types += /obj/effect/decal/cleanable/vomit
target_types += /obj/effect/decal/cleanable/robot_debris
target_types += /obj/effect/decal/cleanable/crayon target_types += /obj/effect/decal/cleanable/crayon
target_types += /obj/effect/decal/cleanable/liquid_fuel target_types += /obj/effect/decal/cleanable/liquid_fuel
target_types += /obj/effect/decal/cleanable/mucus target_types += /obj/effect/decal/cleanable/mucus
target_types += /obj/effect/decal/cleanable/dirt
if(src.blood) if(src.blood)
target_types += /obj/effect/decal/cleanable/xenoblood/
target_types += /obj/effect/decal/cleanable/xenoblood/xgibs
target_types += /obj/effect/decal/cleanable/blood/ target_types += /obj/effect/decal/cleanable/blood/
target_types += /obj/effect/decal/cleanable/blood/gibs/
target_types += /obj/effect/decal/cleanable/dirt
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target) /obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
anchored = 1 anchored = 1

View File

@@ -796,7 +796,7 @@ Auto Patrol: []"},
s.set_up(3, 1, src) s.set_up(3, 1, src)
s.start() s.start()
new /obj/effect/decal/cleanable/oil(src.loc) new /obj/effect/decal/cleanable/blood/oil(src.loc)
del(src) del(src)

View File

@@ -964,6 +964,6 @@
s.set_up(3, 1, src) s.set_up(3, 1, src)
s.start() s.start()
new /obj/effect/decal/cleanable/oil(src.loc) new /obj/effect/decal/cleanable/blood/oil(src.loc)
unload(0) unload(0)
del(src) del(src)

View File

@@ -219,7 +219,7 @@ Auto Patrol: []"},
walk_to(src,0) walk_to(src,0)
if(target) // make sure target exists if(target) // make sure target exists
if(get_dist(src, src.target) <= 1) // if right next to perp if(get_dist(src, src.target) <= 1 && isturf(src.target.loc)) // if right next to perp
if(istype(src.target,/mob/living/carbon)) if(istype(src.target,/mob/living/carbon))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c" src.icon_state = "secbot-c"
@@ -726,7 +726,7 @@ Auto Patrol: []"},
s.set_up(3, 1, src) s.set_up(3, 1, src)
s.start() s.start()
new /obj/effect/decal/cleanable/oil(src.loc) new /obj/effect/decal/cleanable/blood/oil(src.loc)
del(src) del(src)
/obj/machinery/bot/secbot/attack_alien(var/mob/living/carbon/alien/user as mob) /obj/machinery/bot/secbot/attack_alien(var/mob/living/carbon/alien/user as mob)

View File

@@ -30,25 +30,42 @@
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk. icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
item_state = "card-id" item_state = "card-id"
w_class = 1.0 w_class = 1.0
var/data = "" var/datum/dna2/record/buf=null
var/ue = 0
var/data_type = "ui" //ui|se
var/owner = "God Emperor of Mankind"
var/read_only = 0 //Well,it's still a floppy disk var/read_only = 0 //Well,it's still a floppy disk
/obj/item/weapon/disk/data/proc/Initialize()
buf = new
buf.dna=new
/obj/item/weapon/disk/data/demo /obj/item/weapon/disk/data/demo
name = "data disk - 'God Emperor of Mankind'" name = "data disk - 'God Emperor of Mankind'"
data = "066000033000000000AF00330660FF4DB002690"
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
ue = 1
read_only = 1 read_only = 1
New()
Initialize()
buf.types=DNA2_BUF_UE|DNA2_BUF_UI
//data = "066000033000000000AF00330660FF4DB002690"
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
buf.dna.real_name="God Emperor of Mankind"
buf.dna.unique_enzymes = md5(buf.dna.real_name)
buf.dna.UI=list(0x066,0x000,0x033,0x000,0x000,0x000,0xAF0,0x033,0x066,0x0FF,0x4DB,0x002,0x690)
//buf.dna.UI=list(0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x0C8,0x000,0x000,0x000,0x000,0x161,0xFBD,0xDEF) // Farmer Jeff
buf.dna.UpdateUI()
/obj/item/weapon/disk/data/monkey /obj/item/weapon/disk/data/monkey
name = "data disk - 'Mr. Muggles'" name = "data disk - 'Mr. Muggles'"
data_type = "se"
data = "0983E840344C39F4B059D5145FC5785DC6406A4FFF"
read_only = 1 read_only = 1
New()
Initialize()
buf.types=DNA2_BUF_SE
var/list/new_SE=list(0x098,0x3E8,0x403,0x44C,0x39F,0x4B0,0x59D,0x514,0x5FC,0x578,0x5DC,0x640,0x6A4)
for(var/i=new_SE.len;i<=STRUCDNASIZE;i++)
new_SE += rand(1,1024)
buf.dna.SE=new_SE
buf.dna.SetSEValue(MONKEYBLOCK,0xFFF)
//Find a dead mob with a brain and client. //Find a dead mob with a brain and client.
/proc/find_dead_player(var/find_key) /proc/find_dead_player(var/find_key)
if (isnull(find_key)) if (isnull(find_key))
@@ -102,6 +119,7 @@
return src.healthstring return src.healthstring
/obj/machinery/clonepod/attack_ai(mob/user as mob) /obj/machinery/clonepod/attack_ai(mob/user as mob)
src.add_hiddenprint(user)
return attack_hand(user) return attack_hand(user)
/obj/machinery/clonepod/attack_paw(mob/user as mob) /obj/machinery/clonepod/attack_paw(mob/user as mob)
return attack_hand(user) return attack_hand(user)
@@ -116,20 +134,20 @@
//Clonepod //Clonepod
//Start growing a human clone in the pod! //Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/list/ui, var/list/se, var/mindref, var/datum/species/mrace, var/languages) /obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
if(mess || attempting) if(mess || attempting)
return 0 return 0
var/datum/mind/clonemind = locate(mindref) var/datum/mind/clonemind = locate(R.mind)
if(!istype(clonemind,/datum/mind)) //not a mind if(!istype(clonemind,/datum/mind)) //not a mind
return 0 return 0
if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
return 0 return 0
if(clonemind.active) //somebody is using that mind if(clonemind.active) //somebody is using that mind
if( ckey(clonemind.key)!=ckey ) if( ckey(clonemind.key)!=R.ckey )
return 0 return 0
else else
for(var/mob/dead/observer/G in player_list) for(var/mob/dead/observer/G in player_list)
if(G.ckey == ckey) if(G.ckey == R.ckey)
if(G.can_reenter_corpse) if(G.can_reenter_corpse)
break break
else else
@@ -147,9 +165,9 @@
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
occupant = H occupant = H
if(!clonename) //to prevent null names if(!R.dna.real_name) //to prevent null names
clonename = "clone ([rand(0,999)])" R.dna.real_name = "clone ([rand(0,999)])"
H.real_name = clonename H.real_name = R.dna.real_name
src.icon_state = "pod_1" src.icon_state = "pod_1"
//Get the clone body ready //Get the clone body ready
@@ -161,7 +179,7 @@
H.updatehealth() H.updatehealth()
clonemind.transfer_to(H) clonemind.transfer_to(H)
H.ckey = ckey H.ckey = R.ckey
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>" H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
// -- Mode/mind specific stuff goes here // -- Mode/mind specific stuff goes here
@@ -180,24 +198,24 @@
// -- End mode specific stuff // -- End mode specific stuff
if(!H.dna) if(!R.dna)
H.dna = new /datum/dna() H.dna = new /datum/dna()
H.dna.real_name = H.real_name H.dna.real_name = H.real_name
if(ui) else
H.UpdateAppearance(ui) H.dna=R.dna
if(se) H.UpdateAppearance()
H.dna.SE = se
H.dna.UpdateSE()
randmutb(H) //Sometimes the clones come out wrong. randmutb(H) //Sometimes the clones come out wrong.
H.dna.UpdateSE()
H.dna.UpdateUI()
H.f_style = "Shaved" H.f_style = "Shaved"
if(mrace.name == "Human") //no more xenos losing ears/tentacles if(R.dna.species == "Human") //no more xenos losing ears/tentacles
H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
H.species = mrace H.set_species(R.dna.species)
for(var/datum/language/L in languages)
H.add_language(L.name) //for(var/datum/language/L in languages)
H.update_mutantrace() // H.add_language(L.name)
H.suiciding = 0 H.suiciding = 0
src.attempting = 0 src.attempting = 0
return 1 return 1

View File

@@ -262,7 +262,7 @@ That prevents a few funky behaviors.
A.loc = T.loc A.loc = T.loc
A.cancel_camera() A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored." A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer succesful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed." U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
del(T) del(T)
if("AIFIXER")//AI Fixer terminal. if("AIFIXER")//AI Fixer terminal.
var/obj/machinery/computer/aifixer/T = target var/obj/machinery/computer/aifixer/T = target
@@ -286,7 +286,7 @@ That prevents a few funky behaviors.
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty") T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
A.cancel_camera() A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here." A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed." U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
else else
if(!C.contents.len && T.occupant && !T.active) if(!C.contents.len && T.occupant && !T.active)
C.name = "inteliCard - [T.occupant.name]" C.name = "inteliCard - [T.occupant.name]"
@@ -298,7 +298,7 @@ That prevents a few funky behaviors.
C.icon_state = "aicard-full" C.icon_state = "aicard-full"
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full") T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full")
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access." T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
U << "\blue <b>Transfer succesful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory." U << "\blue <b>Transfer successful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupant.loc = C T.occupant.loc = C
T.occupant.cancel_camera() T.occupant.cancel_camera()
T.occupant = null T.occupant = null
@@ -323,7 +323,7 @@ That prevents a few funky behaviors.
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty") T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
A.cancel_camera() A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here." A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed." U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
else else
if(!C.AI && T.occupant && !T.active) if(!C.AI && T.occupant && !T.active)
if (T.occupant.stat) if (T.occupant.stat)

View File

@@ -262,7 +262,7 @@
if(locked) if(locked)
user << "\red Circuit controls are locked." user << "\red Circuit controls are locked."
return return
var/existing_networks = dd_list2text(network,",") var/existing_networks = list2text(network,",")
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input) if(!input)
usr << "No input found please hang up and try your call again." usr << "No input found please hang up and try your call again."

View File

@@ -10,7 +10,7 @@
var/scantemp = "Scanner unoccupied" var/scantemp = "Scanner unoccupied"
var/menu = 1 //Which menu screen to display var/menu = 1 //Which menu screen to display
var/list/records = list() var/list/records = list()
var/datum/data/record/active_record = null var/datum/dna2/record/active_record = null
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything. var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
var/loading = 0 // Nice loading text var/loading = 0 // Nice loading text
@@ -136,8 +136,8 @@
if(2) if(2)
dat += "<h4>Current records</h4>" dat += "<h4>Current records</h4>"
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>" dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
for(var/datum/data/record/R in src.records) for(var/datum/dna2/record/R in src.records)
dat += "<a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.fields["id"]]-[R.fields["name"]]</a><br>" dat += "<li><a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.dna.real_name]</a><li>"
if(3) if(3)
dat += "<h4>Selected Record</h4>" dat += "<h4>Selected Record</h4>"
@@ -146,10 +146,11 @@
if (!src.active_record) if (!src.active_record)
dat += "<font color=red>ERROR: Record not found.</font>" dat += "<font color=red>ERROR: Record not found.</font>"
else else
dat += "<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>" dat += {"<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>
dat += "<b>Name:</b> [src.active_record.fields["name"]]<br>" <b>Name:</b> [src.active_record.dna.real_name]<br>"}
var/obj/item/weapon/implant/health/H = null
var/obj/item/weapon/implant/health/H = locate(src.active_record.fields["imp"]) if(src.active_record.implant)
H=locate(src.active_record.implant)
if ((H) && (istype(H))) if ((H) && (istype(H)))
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>" dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>"
@@ -166,13 +167,13 @@
else else
dat += "<br>" //Keeping a line empty for appearances I guess. dat += "<br>" //Keeping a line empty for appearances I guess.
dat += {"<b>UI:</b> [src.active_record.fields["UI"]]<br> dat += {"<b>UI:</b> [src.active_record.dna.uni_identity]<br>
<b>SE:</b> [src.active_record.fields["SE"]]<br><br>"} <b>SE:</b> [src.active_record.dna.struc_enzymes]<br><br>"}
if(pod1 && pod1.biomass >= CLONE_BIOMASS) if(pod1 && pod1.biomass >= CLONE_BIOMASS)
dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"} dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
else else
dat += {"<b>Unsufficient biomass</b><br>"} dat += {"<b>Insufficient biomass</b><br>"}
if(4) if(4)
if (!src.active_record) if (!src.active_record)
@@ -217,8 +218,8 @@
else if (href_list["view_rec"]) else if (href_list["view_rec"])
src.active_record = locate(href_list["view_rec"]) src.active_record = locate(href_list["view_rec"])
if(istype(src.active_record,/datum/data/record)) if(istype(src.active_record,/datum/dna2/record))
if ((isnull(src.active_record.fields["ckey"])) || (src.active_record.fields["ckey"] == "")) if ((isnull(src.active_record.ckey)))
del(src.active_record) del(src.active_record)
src.temp = "ERROR: Record Corrupt" src.temp = "ERROR: Record Corrupt"
else else
@@ -248,7 +249,7 @@
else if (href_list["disk"]) //Load or eject. else if (href_list["disk"]) //Load or eject.
switch(href_list["disk"]) switch(href_list["disk"])
if("load") if("load")
if ((isnull(src.diskette)) || (src.diskette.data == "")) if ((isnull(src.diskette)) || isnull(src.diskette.buf))
src.temp = "Load error." src.temp = "Load error."
src.updateUsrDialog() src.updateUsrDialog()
return return
@@ -258,12 +259,7 @@
src.updateUsrDialog() src.updateUsrDialog()
return return
if (src.diskette.data_type == "ui") src.active_record = src.diskette.buf
src.active_record.fields["UI"] = src.diskette.data
if (src.diskette.ue)
src.active_record.fields["name"] = src.diskette.owner
else if (src.diskette.data_type == "se")
src.active_record.fields["SE"] = src.diskette.data
src.temp = "Load successful." src.temp = "Load successful."
if("eject") if("eject")
@@ -277,28 +273,24 @@
src.updateUsrDialog() src.updateUsrDialog()
return return
// DNA2 makes things a little simpler.
src.diskette.buf=src.active_record
src.diskette.buf.types=0
switch(href_list["save_disk"]) //Save as Ui/Ui+Ue/Se switch(href_list["save_disk"]) //Save as Ui/Ui+Ue/Se
if("ui") if("ui")
src.diskette.data = src.active_record.fields["UI"] src.diskette.buf.types=DNA2_BUF_UI
src.diskette.ue = 0
src.diskette.data_type = "ui"
if("ue") if("ue")
src.diskette.data = src.active_record.fields["UI"] src.diskette.buf.types=DNA2_BUF_UI|DNA2_BUF_UE
src.diskette.ue = 1
src.diskette.data_type = "ui"
if("se") if("se")
src.diskette.data = src.active_record.fields["SE"] src.diskette.buf.types=DNA2_BUF_SE
src.diskette.ue = 0 src.diskette.name = "data disk - '[src.active_record.dna.real_name]'"
src.diskette.data_type = "se"
src.diskette.owner = src.active_record.fields["name"]
src.diskette.name = "data disk - '[src.diskette.owner]'"
src.temp = "Save \[[href_list["save_disk"]]\] successful." src.temp = "Save \[[href_list["save_disk"]]\] successful."
else if (href_list["refresh"]) else if (href_list["refresh"])
src.updateUsrDialog() src.updateUsrDialog()
else if (href_list["clone"]) else if (href_list["clone"])
var/datum/data/record/C = locate(href_list["clone"]) var/datum/dna2/record/C = locate(href_list["clone"])
//Look for that player! They better be dead! //Look for that player! They better be dead!
if(istype(C)) if(istype(C))
//Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs. //Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
@@ -313,17 +305,17 @@
else if(!config.revival_cloning) else if(!config.revival_cloning)
temp = "Error: Unable to initiate cloning cycle." temp = "Error: Unable to initiate cloning cycle."
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["languages"])) else if(pod1.growclone(C))
temp = "Initiating cloning cycle..." temp = "Initiating cloning cycle..."
records.Remove(C) records.Remove(C)
del(C) del(C)
menu = 1 menu = 1
else else
var/mob/selected = find_dead_player("[C.fields["ckey"]]") var/mob/selected = find_dead_player("[C.ckey]")
selected << 'sound/machines/chime.ogg' //probably not the best sound but I think it's reasonable selected << 'sound/machines/chime.ogg' //probably not the best sound but I think it's reasonable
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No") var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
if(answer != "No" && pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["languages"], C.fields["interface"])) if(answer != "No" && pod1.growclone(C))
temp = "Initiating cloning cycle..." temp = "Initiating cloning cycle..."
records.Remove(C) records.Remove(C)
del(C) del(C)
@@ -363,27 +355,25 @@
subject.dna.check_integrity() subject.dna.check_integrity()
var/datum/data/record/R = new /datum/data/record( ) var/datum/dna2/record/R = new /datum/dna2/record()
R.fields["mrace"] = subject.species R.dna=subject.dna
R.fields["ckey"] = subject.ckey R.ckey = subject.ckey
R.fields["name"] = subject.real_name R.id= copytext(md5(subject.real_name), 2, 6)
R.fields["id"] = copytext(md5(subject.real_name), 2, 6) R.name=R.dna.real_name
R.fields["UI"] = subject.dna.UI R.types=DNA2_BUF_UI|DNA2_BUF_UE|DNA2_BUF_SE
R.fields["SE"] = subject.dna.SE
R.fields["languages"] = subject.languages
//Add an implant if needed //Add an implant if needed
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject) var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
if (isnull(imp)) if (isnull(imp))
imp = new /obj/item/weapon/implant/health(subject) imp = new /obj/item/weapon/implant/health(subject)
imp.implanted = subject imp.implanted = subject
R.fields["imp"] = "\ref[imp]" R.implant = "\ref[imp]"
//Update it if needed //Update it if needed
else else
R.fields["imp"] = "\ref[imp]" R.implant = "\ref[imp]"
if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning. if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
R.fields["mind"] = "\ref[subject.mind]" R.mind = "\ref[subject.mind]"
src.records += R src.records += R
scantemp = "Subject successfully scanned." scantemp = "Subject successfully scanned."
@@ -391,8 +381,8 @@
//Find a specific record by key. //Find a specific record by key.
/obj/machinery/computer/cloning/proc/find_record(var/find_key) /obj/machinery/computer/cloning/proc/find_record(var/find_key)
var/selected_record = null var/selected_record = null
for(var/datum/data/record/R in src.records) for(var/datum/dna2/record/R in src.records)
if (R.fields["ckey"] == find_key) if (R.ckey == find_key)
selected_record = R selected_record = R
break break
return selected_record return selected_record

View File

@@ -443,7 +443,6 @@
//Sender isn't faking as someone who exists //Sender isn't faking as someone who exists
if(isnull(PDARec)) if(isnull(PDARec))
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]") src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent) if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1) playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc)) for (var/mob/O in hearers(3, customrecepient.loc))
@@ -456,8 +455,13 @@
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r") customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Sender is faking as someone who exists //Sender is faking as someone who exists
else else
src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]") src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; 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) if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1) playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc)) for (var/mob/O in hearers(3, customrecepient.loc))

View File

@@ -65,7 +65,7 @@
/** /**
* The ui_interact proc is used to open and update Nano UIs * The ui_interact proc is used to open and update Nano UIs
* If ui_interact is not used then the UI will not update correctly * If ui_interact is not used then the UI will not update correctly
* ui_interact is currently defined for /atom/movable * ui_interact is currently defined for /atom/movable (which is inherited by /obj and /mob)
* *
* @param user /mob The mob who is interacting with this ui * @param user /mob The mob who is interacting with this ui
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
@@ -84,18 +84,7 @@
data["hasOccupant"] = occupant ? 1 : 0 data["hasOccupant"] = occupant ? 1 : 0
var/occupantData[0] var/occupantData[0]
if (!occupant) if (occupant)
occupantData["name"] = null
occupantData["stat"] = null
occupantData["health"] = null
occupantData["maxHealth"] = null
occupantData["minHealth"] = null
occupantData["bruteLoss"] = null
occupantData["oxyLoss"] = null
occupantData["toxLoss"] = null
occupantData["fireLoss"] = null
occupantData["bodyTemperature"] = null
else
occupantData["name"] = occupant.name occupantData["name"] = occupant.name
occupantData["stat"] = occupant.stat occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health occupantData["health"] = occupant.health
@@ -131,23 +120,18 @@
for(var/datum/reagent/R in beaker.reagents.reagent_list) for(var/datum/reagent/R in beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume data["beakerVolume"] += R.volume
if (!ui) // no ui has been passed, so we'll search for one // update the ui if it exists, returns null if no ui is passed/found
{ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.get_open_ui(user, src, ui_key)
}
if (!ui) if (!ui)
// the ui does not exist, so we'll create a new one // the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410) ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
// When the UI is first opened this is the data it will use // when the ui is first opened this is the data it will use
ui.set_initial_data(data) ui.set_initial_data(data)
// open the new ui window
ui.open() ui.open()
// Auto update every Master Controller tick // auto update every Master Controller tick
ui.set_auto_update(1) ui.set_auto_update(1)
else
// The UI is already open so push the new data to it
ui.push_data(data)
return
//user.set_machine(src)
/obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list) /obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list)
if(usr == occupant) if(usr == occupant)

View File

@@ -70,6 +70,7 @@
set background = 1 set background = 1
if(src.attached) if(src.attached)
if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc))) if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc)))
visible_message("The needle is ripped out of [src.attached], doesn't that hurt?") visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm")) src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
@@ -105,6 +106,9 @@
if(NOCLONE in T.mutations) if(NOCLONE in T.mutations)
return return
if(T.species && T.species.flags & NO_BLOOD)
return
// If the human is losing too much blood, beep. // If the human is losing too much blood, beep.
if(T.vessel.get_reagent_amount("blood") < BLOOD_VOLUME_SAFE) if(prob(5)) if(T.vessel.get_reagent_amount("blood") < BLOOD_VOLUME_SAFE) if(prob(5))
visible_message("\The [src] beeps loudly.") visible_message("\The [src] beeps loudly.")

View File

@@ -43,6 +43,11 @@
if (recipe.items) if (recipe.items)
max_n_of_items = max(max_n_of_items,recipe.items.len) max_n_of_items = max(max_n_of_items,recipe.items.len)
// This will do until I can think of a fun recipe to use dionaea in -
// will also allow anything using the holder item to be microwaved into
// impure carbon. ~Z
acceptable_items |= /obj/item/weapon/holder
/******************* /*******************
* Item Adding * Item Adding
********************/ ********************/

View File

@@ -409,10 +409,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<FONT COLOR='green'>Wanted issue for [src.channel_name] successfully edited.</FONT><BR><BR>" dat+="<FONT COLOR='green'>Wanted issue for [src.channel_name] successfully edited.</FONT><BR><BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Return</A><BR>" dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Return</A><BR>"
if(20) if(20)
dat+="<FONT COLOR='green'>Printing successfull. Please receive your newspaper from the bottom of the machine.</FONT><BR><BR>" dat+="<FONT COLOR='green'>Printing successful. Please receive your newspaper from the bottom of the machine.</FONT><BR><BR>"
dat+="<A href='?src=\ref[src];setScreen=[0]'>Return</A>" dat+="<A href='?src=\ref[src];setScreen=[0]'>Return</A>"
if(21) if(21)
dat+="<FONT COLOR='maroon'>Unable to print newspaper. Insufficient paper. Please notify maintenance personnell to refill machine storage.</FONT><BR><BR>" dat+="<FONT COLOR='maroon'>Unable to print newspaper. Insufficient paper. Please notify maintenance personnel to refill machine storage.</FONT><BR><BR>"
dat+="<A href='?src=\ref[src];setScreen=[0]'>Return</A>" dat+="<A href='?src=\ref[src];setScreen=[0]'>Return</A>"
else else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com" dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"

View File

@@ -289,6 +289,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes. if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
continue continue
// Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
if(data == 3 && istype(R, /mob/dead/observer) && R.client && (R.client.prefs.toggles & CHAT_GHOSTRADIO))
continue
// --- Check for compression --- // --- Check for compression ---
if(compression > 0) if(compression > 0)

View File

@@ -611,11 +611,11 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka = 5, /obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka = 5,
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/rum = 5, /obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/rum = 5,
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac = 5, /obj/item/weapon/reagent_containers/food/drinks/bottle/wine = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac = 5,
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua = 5,/obj/item/weapon/reagent_containers/food/drinks/beer = 6, /obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua = 5,/obj/item/weapon/reagent_containers/food/drinks/cans/beer = 6,
/obj/item/weapon/reagent_containers/food/drinks/ale = 6,/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice = 4, /obj/item/weapon/reagent_containers/food/drinks/cans/ale = 6,/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 4,/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 4,/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/tonic = 8, /obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 8,
/obj/item/weapon/reagent_containers/food/drinks/cola = 8, /obj/item/weapon/reagent_containers/food/drinks/sodawater = 15, /obj/item/weapon/reagent_containers/food/drinks/cans/cola = 8, /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15,
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30,/obj/item/weapon/reagent_containers/food/drinks/ice = 9, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30,/obj/item/weapon/reagent_containers/food/drinks/ice = 9,
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 2, /obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 2,
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine = 5) /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine = 5)
@@ -667,15 +667,15 @@
icon_state = "Cola_Machine" icon_state = "Cola_Machine"
product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!" product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space." product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
products = list(/obj/item/weapon/reagent_containers/food/drinks/cola = 10,/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind = 10, products = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 10,
/obj/item/weapon/reagent_containers/food/drinks/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/starkist = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 10,
/obj/item/weapon/reagent_containers/food/drinks/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/space_up = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 10,
/obj/item/weapon/reagent_containers/food/drinks/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/grape_juice = 10) /obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 10)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/thirteenloko = 5) contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5)
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind = 1, prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 1,
/obj/item/weapon/reagent_containers/food/drinks/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/starkist = 1, /obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 1,
/obj/item/weapon/reagent_containers/food/drinks/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/space_up = 1, /obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 1,
/obj/item/weapon/reagent_containers/food/drinks/iced_tea = 1,/obj/item/weapon/reagent_containers/food/drinks/grape_juice = 1) /obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 1)
//This one's from bay12 //This one's from bay12
/obj/machinery/vending/cart /obj/machinery/vending/cart

View File

@@ -518,7 +518,7 @@
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>" temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
src.updateUsrDialog() src.updateUsrDialog()
if(i || tech_output) if(i || tech_output)
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Succesfully synchronized with R&D server. New data processed.\"") src.visible_message("\icon[src] <b>[src]</b> beeps, \"Successfully synchronized with R&D server. New data processed.\"")
return return
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(var/obj/item/part as obj,var/resource as text, var/roundto=1) /obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(var/obj/item/part as obj,var/resource as text, var/roundto=1)

View File

@@ -237,7 +237,7 @@
target = safepick(view(3,target)) target = safepick(view(3,target))
if(!target) if(!target)
return return
if(get_dist(src, target)>1) if(!target.Adjacent(src))
if(selected && selected.is_ranged()) if(selected && selected.is_ranged())
selected.action(target) selected.action(target)
else if(selected && selected.is_melee()) else if(selected && selected.is_melee())

View File

@@ -108,6 +108,13 @@
holder.icon_state = "hudxeno" holder.icon_state = "hudxeno"
else if(foundVirus) else if(foundVirus)
holder.icon_state = "hudill" 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 else
holder.icon_state = "hudhealthy" holder.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
C.images += holder C.images += holder

View File

@@ -1,63 +1,33 @@
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code. /obj/effect/decal/cleanable/blood/xeno
/obj/effect/decal/cleanable/xenoblood
name = "xeno blood" name = "xeno blood"
desc = "It's green and acidic. It looks like... <i>blood?</i>" desc = "It's green and acidic. It looks like... <i>blood?</i>"
gender = PLURAL
density = 0
anchored = 1
layer = 2
icon = 'icons/effects/blood.dmi' icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1" basecolor = "#05EE05"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/list/viruses = list()
blood_DNA = list()
Del() /obj/effect/decal/cleanable/blood/gibs/xeno
for(var/datum/disease/D in viruses)
D.cure(0)
..()
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
spawn (0)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
for(var/datum/disease/D in src.viruses)
var/datum/disease/ND = D.Copy(1)
b.viruses += ND
ND.holder = b
if (step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/xenoblood/xsplatter
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
/obj/effect/decal/cleanable/xenoblood/xgibs
name = "xeno gibs" name = "xeno gibs"
desc = "Gnarly..." desc = "Gnarly..."
gender = PLURAL
icon = 'icons/effects/blood.dmi'
icon_state = "xgib1" icon_state = "xgib1"
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6") random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
basecolor = "#05EE05"
/obj/effect/decal/cleanable/xenoblood/xgibs/up /obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
color = "#FFFFFF"
/obj/effect/decal/cleanable/blood/gibs/xeno/up
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1") random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
/obj/effect/decal/cleanable/xenoblood/xgibs/down /obj/effect/decal/cleanable/blood/gibs/xeno/down
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1") random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
/obj/effect/decal/cleanable/xenoblood/xgibs/body /obj/effect/decal/cleanable/blood/gibs/xeno/body
random_icon_states = list("xgibhead", "xgibtorso") random_icon_states = list("xgibhead", "xgibtorso")
/obj/effect/decal/cleanable/xenoblood/xgibs/limb /obj/effect/decal/cleanable/blood/gibs/xeno/limb
random_icon_states = list("xgibleg", "xgibarm") random_icon_states = list("xgibleg", "xgibarm")
/obj/effect/decal/cleanable/xenoblood/xgibs/core /obj/effect/decal/cleanable/blood/gibs/xeno/core
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3") random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
/obj/effect/decal/cleanable/blood/xtracks /obj/effect/decal/cleanable/blood/xtracks
icon_state = "xtracks" basecolor = "#05EE05"
random_icon_states = null

View File

@@ -1,16 +1,21 @@
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var) #define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood /obj/effect/decal/cleanable/blood
name = "blood" name = "blood"
desc = "It's red and gooey. Perhaps it's the chef's cooking?" desc = "It's thick and gooey. Perhaps it's the chef's cooking?"
gender = PLURAL gender = PLURAL
density = 0 density = 0
anchored = 1 anchored = 1
layer = 2 layer = 2
icon = 'icons/effects/blood.dmi' icon = 'icons/effects/blood.dmi'
icon_state = "floor1" icon_state = "mfloor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
var/base_icon = 'icons/effects/blood.dmi'
var/list/viruses = list() var/list/viruses = list()
blood_DNA = list() blood_DNA = list()
var/basecolor="#A10808" // Color when wet.
var/list/datum/disease2/disease/virus2 = list() var/list/datum/disease2/disease/virus2 = list()
var/amount = 5 var/amount = 5
@@ -21,8 +26,11 @@
/obj/effect/decal/cleanable/blood/New() /obj/effect/decal/cleanable/blood/New()
..() ..()
update_icon()
if(istype(src, /obj/effect/decal/cleanable/blood/gibs)) if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
return return
if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
return // We handle our own drying.
if(src.type == /obj/effect/decal/cleanable/blood) if(src.type == /obj/effect/decal/cleanable/blood)
if(src.loc && isturf(src.loc)) if(src.loc && isturf(src.loc))
for(var/obj/effect/decal/cleanable/blood/B in src.loc) for(var/obj/effect/decal/cleanable/blood/B in src.loc)
@@ -33,6 +41,10 @@
spawn(DRYING_TIME * (amount+1)) spawn(DRYING_TIME * (amount+1))
dry() dry()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
color = basecolor
/obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp) /obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp)
if (!istype(perp)) if (!istype(perp))
return return
@@ -45,50 +57,77 @@
perp.shoes.generate_blood_overlay() perp.shoes.generate_blood_overlay()
if(!perp.shoes.blood_DNA) if(!perp.shoes.blood_DNA)
perp.shoes.blood_DNA = list() perp.shoes.blood_DNA = list()
perp.shoes.blood_overlay.color = basecolor
perp.shoes.overlays += perp.shoes.blood_overlay perp.shoes.overlays += perp.shoes.blood_overlay
perp.update_inv_shoes(1) perp.update_inv_shoes(1)
perp.shoes.blood_DNA |= blood_DNA.Copy() perp.shoes.blood_DNA |= blood_DNA.Copy()
perp.shoes.blood_color=basecolor
else else
perp.track_blood = max(amount,perp.track_blood) //Or feet perp.track_blood = max(amount,perp.track_blood) //Or feet
if(!perp.feet_blood_DNA) if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list() perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy() perp.feet_blood_DNA |= blood_DNA.Copy()
perp.feet_blood_color=basecolor
amount-- amount--
/obj/effect/decal/cleanable/blood/proc/dry() /obj/effect/decal/cleanable/blood/proc/dry()
name = "dried [src.name]" name = "dried [src.name]"
desc = "It's dark red and crusty. Someone is not doing their job." desc = "It's dry and crusty. Someone is not doing their job."
color = "#999999" color = adjust_brightness(color, -50)
amount = 0 amount = 0
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
..()
if (amount && istype(user))
add_fingerprint(user)
if (user.gloves)
return
var/taken = rand(1,amount)
amount -= taken
user << "<span class='notice'>You get some of \the [src] on your hands.</span>"
if (!user.blood_DNA)
user.blood_DNA = list()
user.blood_DNA |= blood_DNA.Copy()
user.bloody_hands += taken
user.hand_blood_color = basecolor
user.update_inv_gloves(1)
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
/obj/effect/decal/cleanable/blood/splatter /obj/effect/decal/cleanable/blood/splatter
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5") random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
amount = 2 amount = 2
/obj/effect/decal/cleanable/blood/footprints
name = "bloody footprints"
desc = "Whoops..."
icon='icons/effects/footprints.dmi'
icon_state = "blood1"
amount = 0
random_icon_states = null
/obj/effect/decal/cleanable/blood/tracks
icon_state = "tracks"
desc = "They look like tracks left by wheels."
gender = PLURAL
random_icon_states = null
amount = 0
/obj/effect/decal/cleanable/blood/drip /obj/effect/decal/cleanable/blood/drip
name = "drips of blood" name = "drips of blood"
desc = "It's red." desc = "It's red."
gender = PLURAL gender = PLURAL
icon = 'icons/effects/drip.dmi' icon = 'icons/effects/drip.dmi'
icon_state = "1" icon_state = "1"
random_icon_states = list("1","2","3","4","5")
amount = 0 amount = 0
/obj/effect/decal/cleanable/blood/writing
icon_state = "tracks"
desc = "It looks like a writing in blood."
gender = NEUTER
random_icon_states = list("writing1","writing2","writing3","writing4","writing5")
amount = 0
var/message
/obj/effect/decal/cleanable/blood/writing/New()
..()
if(random_icon_states.len)
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
random_icon_states.Remove(W.icon_state)
icon_state = pick(random_icon_states)
else
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine()
..()
usr << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
/obj/effect/decal/cleanable/blood/gibs /obj/effect/decal/cleanable/blood/gibs
name = "gibs" name = "gibs"
desc = "They look bloody and gruesome." desc = "They look bloody and gruesome."
@@ -99,6 +138,22 @@
icon = 'icons/effects/blood.dmi' icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5" icon_state = "gibbl5"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6") random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
var/fleshcolor = "#FFFFFF"
/obj/effect/decal/cleanable/blood/gibs/update_icon()
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
if(!fleshcolor || fleshcolor == "rainbow")
fleshcolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
giblets.color = fleshcolor
var/icon/blood = new(base_icon,"[icon_state]",dir)
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
blood.Blend(basecolor,ICON_MULTIPLY)
icon = blood
overlays.Cut()
overlays += giblets
/obj/effect/decal/cleanable/blood/gibs/up /obj/effect/decal/cleanable/blood/gibs/up
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1") random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
@@ -123,6 +178,8 @@
sleep(3) sleep(3)
if (i > 0) if (i > 0)
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc) var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
b.basecolor = src.basecolor
b.update_icon()
for(var/datum/disease/D in src.viruses) for(var/datum/disease/D in src.viruses)
var/datum/disease/ND = D.Copy(1) var/datum/disease/ND = D.Copy(1)
b.viruses += ND b.viruses += ND
@@ -142,4 +199,10 @@
icon = 'icons/effects/blood.dmi' icon = 'icons/effects/blood.dmi'
icon_state = "mucus" icon_state = "mucus"
random_icon_states = list("mucus") random_icon_states = list("mucus")
var/list/datum/disease2/disease/virus2 = list() var/list/datum/disease2/disease/virus2 = list()
var/dry=0 // Keeps the lag down
/obj/effect/decal/cleanable/mucus/New()
spawn(DRYING_TIME * 2)
dry=1

View File

@@ -1,25 +1,26 @@
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code. /obj/effect/decal/cleanable/blood/gibs/robot
/obj/effect/decal/cleanable/robot_debris
name = "robot debris" name = "robot debris"
desc = "It's a useless heap of junk... <i>or is it?</i>" desc = "It's a useless heap of junk... <i>or is it?</i>"
gender = PLURAL
density = 0
anchored = 1
layer = 2
icon = 'icons/mob/robots.dmi' icon = 'icons/mob/robots.dmi'
icon_state = "gib1" icon_state = "gib1"
basecolor="#030303"
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7") random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/list/directions) /obj/effect/decal/cleanable/blood/gibs/robot/update_icon()
color = "#FFFFFF"
/obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
return
/obj/effect/decal/cleanable/blood/gibs/robot/streak(var/list/directions)
spawn (0) spawn (0)
var/direction = pick(directions) var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3) sleep(3)
if (i > 0) if (i > 0)
if (prob(40)) if (prob(40))
/*var/obj/effect/decal/cleanable/oil/o =*/ var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
new /obj/effect/decal/cleanable/oil/streak(src.loc) streak.update_icon()
else if (prob(10)) else if (prob(10))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src) s.set_up(3, 1, src)
@@ -27,31 +28,23 @@
if (step_to(src, get_step(src, direction), 0)) if (step_to(src, get_step(src, direction), 0))
break break
/obj/effect/decal/cleanable/robot_debris/limb /obj/effect/decal/cleanable/blood/gibs/robot/limb
random_icon_states = list("gibarm", "gibleg") random_icon_states = list("gibarm", "gibleg")
/obj/effect/decal/cleanable/robot_debris/up /obj/effect/decal/cleanable/blood/gibs/robot/up
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4 random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4
/obj/effect/decal/cleanable/robot_debris/down /obj/effect/decal/cleanable/blood/gibs/robot/down
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4 random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
/obj/effect/decal/cleanable/oil /obj/effect/decal/cleanable/blood/oil
name = "motor oil" name = "motor oil"
desc = "It's black and greasy. Looks like Beepsky made another mess." desc = "It's black and greasy. Looks like Beepsky made another mess."
gender = PLURAL basecolor="#030303"
density = 0
anchored = 1
layer = 2
icon = 'icons/mob/robots.dmi'
icon_state = "floor1"
var/viruses = list()
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
Del() /obj/effect/decal/cleanable/blood/oil/dry()
for(var/datum/disease/D in viruses) return
D.cure(0)
..()
/obj/effect/decal/cleanable/oil/streak /obj/effect/decal/cleanable/blood/oil/streak
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5") random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
amount = 2

View File

@@ -0,0 +1,161 @@
// Stolen en masse from N3X15 of /vg/station with much gratitude.
// The idea is to have 4 bits for coming and 4 for going.
#define TRACKS_COMING_NORTH 1
#define TRACKS_COMING_SOUTH 2
#define TRACKS_COMING_EAST 4
#define TRACKS_COMING_WEST 8
#define TRACKS_GOING_NORTH 16
#define TRACKS_GOING_SOUTH 32
#define TRACKS_GOING_EAST 64
#define TRACKS_GOING_WEST 128
// 5 seconds
#define TRACKS_CRUSTIFY_TIME 50
// color-dir-dry
var/global/list/image/fluidtrack_cache=list()
/datum/fluidtrack
var/direction=0
var/basecolor="#A10808"
var/wet=0
var/fresh=1
var/crusty=0
var/image/overlay
New(_direction,_color,_wet)
src.direction=_direction
src.basecolor=_color
src.wet=_wet
// Footprints, tire trails...
/obj/effect/decal/cleanable/blood/tracks
amount = 0
random_icon_states = null
var/dirs=0
icon = 'icons/effects/fluidtracks.dmi'
icon_state = ""
var/coming_state="blood1"
var/going_state="blood2"
var/updatedtracks=0
// dir = id in stack
var/list/setdirs=list(
"1"=0,
"2"=0,
"4"=0,
"8"=0,
"16"=0,
"32"=0,
"64"=0,
"128"=0
)
// List of laid tracks and their colors.
var/list/datum/fluidtrack/stack=list()
/**
* Add tracks to an existing trail.
*
* @param DNA bloodDNA to add to collection.
* @param comingdir Direction tracks come from, or 0.
* @param goingdir Direction tracks are going to (or 0).
* @param bloodcolor Color of the blood when wet.
*/
proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
var/updated=0
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
var/realgoing=goingdir<<4
// Current bit
var/b=0
// When tracks will start to dry out
var/t=world.time + TRACKS_CRUSTIFY_TIME
var/datum/fluidtrack/track
// Process 4 bits
for(var/bi=0;bi<4;bi++)
b=1<<bi
// COMING BIT
// If setting
if(comingdir&b)
// If not wet or not set
if(dirs&b)
var/sid=setdirs["[b]"]
track=stack[sid]
if(track.wet==t && track.basecolor==bloodcolor)
continue
// Remove existing stack entry
stack.Remove(track)
track=new /datum/fluidtrack(b,bloodcolor,t)
stack.Add(track)
setdirs["[b]"]=stack.Find(track)
updatedtracks |= b
updated=1
// GOING BIT (shift up 4)
b=b<<4
if(realgoing&b)
// If not wet or not set
if(dirs&b)
var/sid=setdirs["[b]"]
track=stack[sid]
if(track.wet==t && track.basecolor==bloodcolor)
continue
// Remove existing stack entry
stack.Remove(track)
track=new /datum/fluidtrack(b,bloodcolor,t)
stack.Add(track)
setdirs["[b]"]=stack.Find(track)
updatedtracks |= b
updated=1
dirs |= comingdir|realgoing
blood_DNA |= DNA.Copy()
if(updated)
update_icon()
update_icon()
overlays.Cut()
color = "#FFFFFF"
var/truedir=0
// Update ONLY the overlays that have changed.
for(var/datum/fluidtrack/track in stack)
var/stack_idx=setdirs["[track.direction]"]
var/state=coming_state
truedir=track.direction
if(truedir&240) // Check if we're in the GOING block
state=going_state
truedir=truedir>>4
if(track.overlay)
track.overlay=null
var/image/I = image(icon, icon_state=state, dir=num2dir(truedir))
I.color = track.basecolor
track.fresh=0
track.overlay=I
stack[stack_idx]=track
overlays += I
updatedtracks=0 // Clear our memory of updated tracks.
/obj/effect/decal/cleanable/blood/tracks/footprints
name = "wet footprints"
desc = "Whoops..."
coming_state = "human1"
going_state = "human2"
amount = 0
/obj/effect/decal/cleanable/blood/tracks/wheels
name = "wet tracks"
desc = "Whoops..."
coming_state = "wheels"
going_state = ""
desc = "They look like tracks left by wheels."
gender = PLURAL
random_icon_states = null
amount = 0

View File

@@ -1,8 +1,8 @@
/proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA) //CARN MARKER /proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA) //CARN MARKER
new /obj/effect/gibspawner/generic(get_turf(location),viruses,MobDNA) new /obj/effect/gibspawner/generic(get_turf(location),viruses,MobDNA)
/proc/hgibs(atom/location, var/list/viruses, var/datum/dna/MobDNA) /proc/hgibs(atom/location, var/list/viruses, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
new /obj/effect/gibspawner/human(get_turf(location),viruses,MobDNA) new /obj/effect/gibspawner/human(get_turf(location),viruses,MobDNA,fleshcolor,bloodcolor)
/proc/xgibs(atom/location, var/list/viruses) /proc/xgibs(atom/location, var/list/viruses)
new /obj/effect/gibspawner/xeno(get_turf(location),viruses) new /obj/effect/gibspawner/xeno(get_turf(location),viruses)
@@ -16,10 +16,15 @@
var/list/gibtypes = list() var/list/gibtypes = list()
var/list/gibamounts = list() var/list/gibamounts = list()
var/list/gibdirections = list() //of lists var/list/gibdirections = list() //of lists
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
New(location, var/list/viruses, var/datum/dna/MobDNA) New(location, var/list/viruses, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
..() ..()
if(fleshcolor) src.fleshcolor = fleshcolor
if(bloodcolor) src.bloodcolor = bloodcolor
if(istype(loc,/turf)) //basically if a badmin spawns it if(istype(loc,/turf)) //basically if a badmin spawns it
Gib(loc,viruses,MobDNA) Gib(loc,viruses,MobDNA)
@@ -44,6 +49,14 @@
var/gibType = gibtypes[i] var/gibType = gibtypes[i]
gib = new gibType(location) gib = new gibType(location)
// Apply human species colouration to masks.
if(fleshcolor)
gib.fleshcolor = fleshcolor
if(bloodcolor)
gib.basecolor = bloodcolor
gib.update_icon()
if(viruses.len > 0) if(viruses.len > 0)
for(var/datum/disease/D in viruses) for(var/datum/disease/D in viruses)
if(prob(virusProb)) if(prob(virusProb))

View File

@@ -17,7 +17,7 @@
..() ..()
xeno xeno
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core) gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
gibamounts = list(1,1,1,1,1,1,1) gibamounts = list(1,1,1,1,1,1,1)
New() New()
@@ -27,7 +27,7 @@
robot robot
sparks = 1 sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb) gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
gibamounts = list(1,1,1,1,1,1) gibamounts = list(1,1,1,1,1,1)
New() New()

View File

@@ -7,6 +7,19 @@
else return dy + (0.5*dx) else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
//var/y1=((Center.y-Dist)<1 ? 1 : Center.y-Dist)
//var/x2=((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist)
//var/y2=((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist)
var/turf/x1y1 = locate(((Center.x-Dist)<1 ? 1 : Center.x-Dist),((Center.y-Dist)<1 ? 1 : Center.y-Dist),Center.z)
var/turf/x2y2 = locate(((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist),((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist),Center.z)
return block(x1y1,x2y2)
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1) proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
src = null //so we don't abort once src is deleted src = null //so we don't abort once src is deleted
spawn(0) spawn(0)
@@ -48,7 +61,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y var/y0 = epicenter.y
var/z0 = epicenter.z var/z0 = epicenter.z
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range))) for(var/turf/T in trange(max(devastation_range, heavy_impact_range, light_impact_range), epicenter))
var/dist = cheap_pythag(T.x - x0,T.y - y0) var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range) dist = 1 if(dist < devastation_range) dist = 1

View File

@@ -6,31 +6,12 @@
/obj /obj
var/explosion_resistance var/explosion_resistance
/datum/explosion_turf
var/turf/turf //The turf which will get ex_act called on it
var/max_power //The largest amount of power the turf sustained
New()
..()
max_power = 0
proc/save_power_if_larger(power) var/list/explosion_turfs = list()
if(power > max_power)
max_power = power
return 1
return 0
var/list/datum/explosion_turf/explosion_turfs = list()
var/explosion_in_progress = 0 var/explosion_in_progress = 0
proc/get_explosion_turf(var/turf/T)
for( var/datum/explosion_turf/ET in explosion_turfs )
if( T == ET.turf )
return ET
var/datum/explosion_turf/ET = new()
ET.turf = T
explosion_turfs += ET
return ET
proc/explosion_rec(turf/epicenter, power) proc/explosion_rec(turf/epicenter, power)
@@ -52,9 +33,8 @@ proc/explosion_rec(turf/epicenter, power)
explosion_in_progress = 1 explosion_in_progress = 1
explosion_turfs = list() explosion_turfs = list()
var/datum/explosion_turf/ETE = get_explosion_turf()
ETE.turf = epicenter explosion_turfs[epicenter] = power
ETE.max_power = power
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it. //This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
for(var/direction in cardinal) for(var/direction in cardinal)
@@ -62,22 +42,21 @@ proc/explosion_rec(turf/epicenter, power)
T.explosion_spread(power - epicenter.explosion_resistance, direction) T.explosion_spread(power - epicenter.explosion_resistance, direction)
//This step applies the ex_act effects for the explosion, as planned in the previous step. //This step applies the ex_act effects for the explosion, as planned in the previous step.
for( var/datum/explosion_turf/ET in explosion_turfs ) for(var/turf/T in explosion_turfs)
if(ET.max_power <= 0) continue if(explosion_turfs[T] <= 0) continue
if(!ET.turf) continue if(!T) continue
//Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation) //Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation)
var/severity = 4 - round(max(min( 3, ((ET.max_power - ET.turf.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) var/severity = 4 - round(max(min( 3, ((explosion_turfs[T] - T.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) //sanity effective power on tile divided by either 3 or one third the total explosion power
//sanity effective power on tile divided by either 3 or one third the total explosion power
// One third because there are three power levels and I // One third because there are three power levels and I
// want each one to take up a third of the crater // want each one to take up a third of the crater
var/x = ET.turf.x var/x = T.x
var/y = ET.turf.y var/y = T.y
var/z = ET.turf.z var/z = T.z
ET.turf.ex_act(severity) T.ex_act(severity)
if(!ET.turf) if(!T)
ET.turf = locate(x,y,z) T = locate(x,y,z)
for( var/atom/A in ET.turf ) for(var/atom/A in T)
A.ex_act(severity) A.ex_act(severity)
explosion_in_progress = 0 explosion_in_progress = 0
@@ -123,10 +102,9 @@ proc/explosion_rec(turf/epicenter, power)
new/obj/effect/debugging/marker(src) new/obj/effect/debugging/marker(src)
*/ */
var/datum/explosion_turf/ET = get_explosion_turf(src) if(explosion_turfs[src] >= power)
if(ET.max_power >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again. return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
ET.max_power = power explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles

View File

@@ -1,7 +1,7 @@
/obj/item /obj/item
name = "item" name = "item"
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/abstract = 0 var/abstract = 0
var/item_state = null var/item_state = null
var/r_speed = 1.0 var/r_speed = 1.0
@@ -316,6 +316,8 @@
return 0 return 0
if( (slot_flags & SLOT_TWOEARS) && H.r_ear ) if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
return 0 return 0
if( w_class < 2 )
return 1
return 1 return 1
if(slot_r_ear) if(slot_r_ear)
if(H.r_ear) if(H.r_ear)
@@ -324,6 +326,8 @@
return 0 return 0
if( (slot_flags & SLOT_TWOEARS) && H.l_ear ) if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
return 0 return 0
if( w_class < 2 )
return 1
return 1 return 1
if(slot_w_uniform) if(slot_w_uniform)
if(H.w_uniform) if(H.w_uniform)
@@ -349,7 +353,7 @@
H << "\red You need a jumpsuit before you can attach this [name]." H << "\red You need a jumpsuit before you can attach this [name]."
return 0 return 0
if(slot_flags & SLOT_DENYPOCKET) if(slot_flags & SLOT_DENYPOCKET)
return return 0
if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
return 1 return 1
if(slot_r_store) if(slot_r_store)
@@ -569,6 +573,7 @@
//apply the blood-splatter overlay if it isn't already in there //apply the blood-splatter overlay if it isn't already in there
if(!blood_DNA.len) if(!blood_DNA.len)
blood_overlay.color = blood_color
overlays += blood_overlay overlays += blood_overlay
//if this blood isn't already in the list, add it //if this blood isn't already in the list, add it
@@ -589,4 +594,17 @@
//not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made. //not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made.
for(var/obj/item/A in world) for(var/obj/item/A in world)
if(A.type == type && !A.blood_overlay) if(A.type == type && !A.blood_overlay)
A.blood_overlay = I A.blood_overlay = image(I)
/obj/item/proc/showoff(mob/user)
for (var/mob/M in view(user))
M.show_message("[user] holds up [src]. <a HREF=?src=\ref[M];lookitem=\ref[src]>Take a closer look.</a>",1)
/mob/living/carbon/verb/showoff()
set name = "Show Held Item"
set category = "Object"
var/obj/item/I = get_active_hand()
if(I && !I.abstract)
I.showoff(src)

View File

@@ -1,6 +1,6 @@
/obj/item/blueprints /obj/item/blueprints
name = "station blueprints" name = "station blueprints"
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it." desc = "Blueprints of the station. There is a \"Classified\" stamp and several coffee stains on it."
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
icon_state = "blueprints" icon_state = "blueprints"
attack_verb = list("attacked", "bapped", "hit") attack_verb = list("attacked", "bapped", "hit")
@@ -21,7 +21,7 @@
/obj/item/blueprints/attack_self(mob/M as mob) /obj/item/blueprints/attack_self(mob/M as mob)
if (!istype(M,/mob/living/carbon/human)) if (!istype(M,/mob/living/carbon/human))
M << "This is stack of useless pieces of harsh paper." //monkeys cannot into projecting M << "This stack of blue paper means nothing to you." //monkeys cannot into projecting
return return
interact() interact()
return return
@@ -53,18 +53,18 @@
switch (get_area_type()) switch (get_area_type())
if (AREA_SPACE) if (AREA_SPACE)
text += {" text += {"
<p>According this blueprints you are in <b>open space</b> now.</p> <p>According the blueprints, you are now in <b>outer space</b>. Hold your breath.</p>
<p><a href='?src=\ref[src];action=create_area'>Mark this place as new area.</a></p> <p><a href='?src=\ref[src];action=create_area'>Mark this place as new area.</a></p>
"} "}
if (AREA_STATION) if (AREA_STATION)
text += {" text += {"
<p>According this blueprints you are in <b>[A.name]</b> now.</p> <p>According the blueprints, you are now in <b>\"[A.name]\"</b>.</p>
<p>You may <a href='?src=\ref[src];action=edit_area'> <p>You may <a href='?src=\ref[src];action=edit_area'>
move an amendment</a> to the drawing.</p> move an amendment</a> to the drawing.</p>
"} "}
if (AREA_SPECIAL) if (AREA_SPECIAL)
text += {" text += {"
<p>This place isn't noted on these blueprints.</p> <p>This place isn't noted on the blueprint.</p>
"} "}
else else
return return
@@ -105,20 +105,20 @@ move an amendment</a> to the drawing.</p>
if(!istype(res,/list)) if(!istype(res,/list))
switch(res) switch(res)
if(ROOM_ERR_SPACE) if(ROOM_ERR_SPACE)
usr << "\red New area must be complete airtight!" usr << "\red The new area must be completely airtight!"
return return
if(ROOM_ERR_TOOLARGE) if(ROOM_ERR_TOOLARGE)
usr << "\red New area too large!" usr << "\red The new area too large!"
return return
else else
usr << "\red Error! Please notify administration!" usr << "\red Error! Please notify administration!"
return return
var/list/turf/turfs = res var/list/turf/turfs = res
var/str = trim(stripped_input(usr,"New area title","Blueprints editing", "", MAX_NAME_LEN)) var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN))
if(!str || !length(str)) //cancel if(!str || !length(str)) //cancel
return return
if(length(str) > 50) if(length(str) > 50)
usr << "\red Text too long." usr << "\red Name too long."
return return
var/area/A = new var/area/A = new
A.name = str A.name = str
@@ -153,8 +153,8 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/edit_area() /obj/item/blueprints/proc/edit_area()
var/area/A = get_area() var/area/A = get_area()
//world << "DEBUG: edit_area" //world << "DEBUG: edit_area"
var/prevname = A.name var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area title","Blueprints editing", prevname, MAX_NAME_LEN)) var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
if(!str || !length(str) || str==prevname) //cancel if(!str || !length(str) || str==prevname) //cancel
return return
if(length(str) > 50) if(length(str) > 50)

View File

@@ -26,7 +26,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/f_lum = 2 //Luminosity for the flashlight function var/f_lum = 2 //Luminosity for the flashlight function
var/silent = 0 //To beep or not to beep, that is the question var/silent = 0 //To beep or not to beep, that is the question
var/toff = 0 //If 1, messenger disabled 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_text //No text spamming
var/last_honk //Also no honk spamming that's bad too var/last_honk //Also no honk spamming that's bad too
var/ttone = "beep" //The ringtone! 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/cart = "" //A place to stick cartridge menu information
var/detonate = 1 // Can the PDA be blown up? var/detonate = 1 // Can the PDA be blown up?
var/hidden = 0 // Is the PDA hidden from the PDA list? 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/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 var/ownjob = null //related to above
@@ -243,7 +246,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(usr.stat == 2) if(usr.stat == 2)
usr << "You can't do that because you are dead!" usr << "You can't do that because you are dead!"
return 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>&rarr; 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>&larr; 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") usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
@@ -310,6 +319,139 @@ var/global/list/obj/item/device/pda/PDAs = list()
return attack_self(M) return attack_self(M)
return return
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/title = "Personal Data Assistant"
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]") : "--------")
data["cart_loaded"] = cartridge ? 1:0
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
if(mode==2)
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
if(mode==21)
data["messagescount"] = tnote.len
data["messages"] = tnote
else
data["messagescount"] = null
data["messages"] = null
if(active_conversation)
for(var/c in tnote)
if(c["target"] == active_conversation)
data["convo_name"] = sanitize(c["owner"])
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
data["manifest"] = data_core.get_manifest_json()
if(mode==3)
var/turf/T = get_turf_or_move(user.loc)
if(!isnull(T) || mode!=3)
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("reading" = 0)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
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)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
//NOTE: graphic resources are loaded on client login //NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user as mob) /obj/item/device/pda/attack_self(mob/user as mob)
@@ -318,209 +460,30 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(active_uplink_check(user)) if(active_uplink_check(user))
return 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>" ui_interact(user) //NanoUI requires this proc
return
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)]&deg;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)
/obj/item/device/pda/Topic(href, href_list) /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 var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one. //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 ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
if (usr.stat == DEAD) if (usr.stat == DEAD)
return 0 return 0
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that. if(!can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
U.unset_machine()
ui.close()
return 0
add_fingerprint(U) add_fingerprint(U)
U.set_machine(src) U.set_machine(src)
@@ -531,19 +494,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Close")//Self explanatory if("Close")//Self explanatory
U.unset_machine() U.unset_machine()
U << browse(null, "window=pda") ui.close()
return return 0
if("Refresh")//Refresh, goes to the end of the proc. if("Refresh")//Refresh, goes to the end of the proc.
if("Return")//Return if("Return")//Return
if(mode<=9) if(mode<=9)
mode = 0 mode = 0
else else
mode = round(mode/10) mode = round(mode/10)
if(mode==2)
active_conversation = null
if(mode==4)//Fix for cartridges. Redirects to hub. if(mode==4)//Fix for cartridges. Redirects to hub.
mode = 0 mode = 0
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu. else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
cartridge.mode = mode cartridge.mode = mode
cartridge.unlock()
if ("Authenticate")//Checks for ID if ("Authenticate")//Checks for ID
id_check(U, 1) id_check(U, 1)
if("UpdateInfo") if("UpdateInfo")
@@ -555,6 +519,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(ismob(T)) if(ismob(T))
T = T.loc T = T.loc
cartridge.loc = T cartridge.loc = T
mode = 0
scanmode = 0 scanmode = 0
if (cartridge.radio) if (cartridge.radio)
cartridge.radio.hostpda = null cartridge.radio.hostpda = null
@@ -623,61 +588,86 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (in_range(src, U) && loc == U) if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN) n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
if (mode == 1) if (mode == 1)
note = replacetext(n, "\n", "<BR>") note = html_decode(n)
notehtml = n notehtml = note
note = replacetext(note, "\n", "<br>")
else else
U << browse(null, "window=pda") ui.close()
return
if("Toggle Messenger") if("Toggle Messenger")
toff = !toff toff = !toff
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
silent = !silent silent = !silent
if("Clear")//Clears messages 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") if("Ringtone")
var/t = input(U, "Please enter new ringtone", name, ttone) as text var/t = input(U, "Please enter new ringtone", name, ttone) as text
if (in_range(src, U) && loc == U) if (in_range(src, U) && loc == U)
if (t) if (t)
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code))) if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
U << "The PDA softly beeps." U << "The PDA softly beeps."
U << browse(null, "window=pda") ui.close()
else else
t = copytext(sanitize(t), 1, 20) t = copytext(sanitize(t), 1, 20)
ttone = t ttone = t
else else
U << browse(null, "window=pda") ui.close()
return return 0
if("Message") if("Message")
var/obj/item/device/pda/P = locate(href_list["target"]) var/obj/item/device/pda/P = locate(href_list["target"])
src.create_message(U, P) src.create_message(U, P)
if(mode == 2)
if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp.
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("Send Honk")//Honk virus
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch. 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. 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(!isnull(P))
if (!P.toff && cartridge:honk_charges > 0) if (!P.toff && cartridge.charges > 0)
cartridge:honk_charges-- cartridge.charges--
U.show_message("\blue Virus sent!", 1) U.show_message("\blue Virus sent!", 1)
P.honkamt = (rand(15,20)) P.honkamt = (rand(15,20))
else else
U << "PDA not found." U << "PDA not found."
else else
U << browse(null, "window=pda") ui.close()
return return 0
if("Send Silence")//Silent virus if("Send Silence")//Silent virus
if(istype(cartridge, /obj/item/weapon/cartridge/mime)) if(istype(cartridge, /obj/item/weapon/cartridge/mime))
var/obj/item/device/pda/P = locate(href_list["target"]) var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P)) if(!isnull(P))
if (!P.toff && cartridge:mime_charges > 0) if (!P.toff && cartridge.charges > 0)
cartridge:mime_charges-- cartridge.charges--
U.show_message("\blue Virus sent!", 1) U.show_message("\blue Virus sent!", 1)
P.silent = 1 P.silent = 1
P.ttone = "silence" P.ttone = "silence"
else else
U << "PDA not found." U << "PDA not found."
else else
U << browse(null, "window=pda") ui.close()
return return 0
//SYNDICATE FUNCTIONS=================================== //SYNDICATE FUNCTIONS===================================
@@ -695,8 +685,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate)) if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"]) var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P)) if(!isnull(P))
if (!P.toff && cartridge:shock_charges > 0) if (!P.toff && cartridge.charges > 0)
cartridge:shock_charges-- cartridge.charges--
var/difficulty = 0 var/difficulty = 0
@@ -713,7 +703,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.show_message("\red An error flashes on your [src].", 1) U.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3)) else if (prob(difficulty * 3))
U.show_message("\red Energy feeds back into your [src]!", 1) U.show_message("\red Energy feeds back into your [src]!", 1)
U << browse(null, "window=pda") ui.close()
explode() explode()
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up") 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) message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
@@ -726,8 +716,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "PDA not found." U << "PDA not found."
else else
U.unset_machine() U.unset_machine()
U << browse(null, "window=pda") ui.close()
return return 0
//pAI FUNCTIONS=================================== //pAI FUNCTIONS===================================
if("pai") if("pai")
@@ -738,33 +728,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/turf/T = get_turf_or_move(src.loc) var/turf/T = get_turf_or_move(src.loc)
if(T) if(T)
pai.loc = T pai.loc = T
pai = null
//LINK FUNCTIONS=================================== else
else//Cartridge menu linking
mode = text2num(href_list["choice"]) mode = text2num(href_list["choice"])
if(cartridge)
cartridge.mode = mode cartridge.mode = mode
cartridge.unlock()
else//If not in range or not using the pda.
U.unset_machine()
U << browse(null, "window=pda")
return
//EXTRA FUNCTIONS=================================== //EXTRA FUNCTIONS===================================
if (mode == 2||mode == 21)//To clear message overlays. if (mode == 2||mode == 21)//To clear message overlays.
overlays.Cut() overlays.Cut()
newmessage = 0
if ((honkamt > 0) && (prob(60)))//For clown virus. if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt-- honkamt--
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1) playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety. return 1 // return 1 tells it to refresh the UI in NanoUI
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
/obj/item/device/pda/proc/remove_id() /obj/item/device/pda/proc/remove_id()
if (id) if (id)
@@ -823,19 +804,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "ERROR: Cannot reach recepient." U << "ERROR: Cannot reach recepient."
return return
useMS.send_pda_message("[P.owner]","[owner]","[t]") 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>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; 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 if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner var/who = src.owner
if(prob(50)) if(prob(50))
who = P:owner who = P.owner
for(var/mob/living/silicon/ai/ai in mob_list) 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. // Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src) if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>") ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
if (!P.silent) if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc)) for (var/mob/O in hearers(3, P.loc))
@@ -848,12 +834,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
else else
L = get(P, /mob/living/silicon) L = get(P, /mob/living/silicon)
if(L) 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>)" 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>)"
nanomanager.update_user_uis(L, P) // Update the recieving user's PDA UI so that they can see the new message
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]") log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
P.overlays.Cut() P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r") P.overlays += image('icons/obj/pda.dmi', "pda-r")
P.newmessage = 1
else else
U << "<span class='notice'>ERROR: Messaging server is not responding.</span>" U << "<span class='notice'>ERROR: Messaging server is not responding.</span>"
@@ -927,6 +918,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.drop_item() user.drop_item()
cartridge.loc = src cartridge.loc = src
user << "<span class='notice'>You insert [cartridge] into [src].</span>" user << "<span class='notice'>You insert [cartridge] into [src].</span>"
nanomanager.update_uis(src) // update all UIs attached to src
if(cartridge.radio) if(cartridge.radio)
cartridge.radio.hostpda = src cartridge.radio.hostpda = src
@@ -953,7 +945,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
C.loc = src C.loc = src
pai = C pai = C
user << "<span class='notice'>You slot \the [C] into [src].</span>" user << "<span class='notice'>You slot \the [C] into [src].</span>"
updateUsrDialog() nanomanager.update_uis(src) // update all UIs attached to src
else if(istype(C, /obj/item/weapon/pen)) else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src var/obj/item/weapon/pen/O = locate() in src
if(O) if(O)
@@ -1041,9 +1033,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(5) if(5)
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics))) if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
if(istype(A, /obj/item/weapon/tank))
var/obj/item/weapon/tank/t = A
t.manipulated_by = user.real_name
var/obj/icon = A var/obj/icon = A
for (var/mob/O in viewers(user, null)) for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]" O << "\red [user] has used [src] on \icon[icon] [A]"
@@ -1134,8 +1123,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
return return
if ((istype(M, /mob/living/carbon/human) && (M.real_name != src.owner) && (istype(src.cartridge, /obj/item/weapon/cartridge/clown)))) 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) if (src.cartridge.charges < 5)
src.cartridge:honk_charges++ src.cartridge.charges++
M.stop_pulling() M.stop_pulling()
M << "\blue You slipped on the PDA!" M << "\blue You slipped on the PDA!"

View File

@@ -21,6 +21,7 @@
var/access_status_display = 0 var/access_status_display = 0
var/access_quartermaster = 0 var/access_quartermaster = 0
var/access_hydroponics = 0 var/access_hydroponics = 0
var/charges = 0
var/mode = null var/mode = null
var/menu var/menu
var/datum/data/record/active1 = null //General var/datum/data/record/active1 = null //General
@@ -32,107 +33,107 @@
var/message2 var/message2
var/list/stored_data = list() var/list/stored_data = list()
engineering /obj/item/weapon/cartridge/engineering
name = "Power-ON Cartridge" name = "Power-ON Cartridge"
icon_state = "cart-e" icon_state = "cart-e"
access_engine = 1 access_engine = 1
atmos /obj/item/weapon/cartridge/atmos
name = "BreatheDeep Cartridge" name = "BreatheDeep Cartridge"
icon_state = "cart-a" icon_state = "cart-a"
access_atmos = 1 access_atmos = 1
medical /obj/item/weapon/cartridge/medical
name = "Med-U Cartridge" name = "Med-U Cartridge"
icon_state = "cart-m" icon_state = "cart-m"
access_medical = 1 access_medical = 1
chemistry /obj/item/weapon/cartridge/chemistry
name = "ChemWhiz Cartridge" name = "ChemWhiz Cartridge"
icon_state = "cart-chem" icon_state = "cart-chem"
access_reagent_scanner = 1 access_reagent_scanner = 1
security /obj/item/weapon/cartridge/security
name = "R.O.B.U.S.T. Cartridge" name = "R.O.B.U.S.T. Cartridge"
icon_state = "cart-s" icon_state = "cart-s"
access_security = 1 access_security = 1
New() /obj/item/weapon/cartridge/security/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src) radio = new /obj/item/radio/integrated/beepsky(src)
detective /obj/item/weapon/cartridge/detective
name = "D.E.T.E.C.T. Cartridge" name = "D.E.T.E.C.T. Cartridge"
icon_state = "cart-s" icon_state = "cart-s"
access_security = 1 access_security = 1
access_medical = 1 access_medical = 1
janitor /obj/item/weapon/cartridge/janitor
name = "CustodiPRO Cartridge" name = "CustodiPRO Cartridge"
desc = "The ultimate in clean-room design." desc = "The ultimate in clean-room design."
icon_state = "cart-j" icon_state = "cart-j"
access_janitor = 1 access_janitor = 1
lawyer /obj/item/weapon/cartridge/lawyer
name = "P.R.O.V.E. Cartridge" name = "P.R.O.V.E. Cartridge"
icon_state = "cart-s" icon_state = "cart-s"
access_security = 1 access_security = 1
clown /obj/item/weapon/cartridge/clown
name = "Honkworks 5.0" name = "Honkworks 5.0"
icon_state = "cart-clown" icon_state = "cart-clown"
access_clown = 1 access_clown = 1
var/honk_charges = 5 charges = 5
mime /obj/item/weapon/cartridge/mime
name = "Gestur-O 1000" name = "Gestur-O 1000"
icon_state = "cart-mi" icon_state = "cart-mi"
access_mime = 1 access_mime = 1
var/mime_charges = 5 charges = 5
/* /*
botanist /obj/item/weapon/cartridge/botanist
name = "Green Thumb v4.20" name = "Green Thumb v4.20"
icon_state = "cart-b" icon_state = "cart-b"
access_flora = 1 access_flora = 1
*/ */
signal /obj/item/weapon/cartridge/signal
name = "generic signaler cartridge" name = "generic signaler cartridge"
desc = "A data cartridge with an integrated radio signaler module." desc = "A data cartridge with an integrated radio signaler module."
toxins /obj/item/weapon/cartridge/signal/toxins
name = "Signal Ace 2" name = "Signal Ace 2"
desc = "Complete with integrated radio signaler!" desc = "Complete with integrated radio signaler!"
icon_state = "cart-tox" icon_state = "cart-tox"
access_reagent_scanner = 1 access_reagent_scanner = 1
access_atmos = 1 access_atmos = 1
New() /obj/item/weapon/cartridge/signal/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/signal(src) radio = new /obj/item/radio/integrated/signal(src)
quartermaster /obj/item/weapon/cartridge/quartermaster
name = "Space Parts & Space Vendors Cartridge" name = "Space Parts & Space Vendors Cartridge"
desc = "Perfect for the Quartermaster on the go!" desc = "Perfect for the Quartermaster on the go!"
icon_state = "cart-q" icon_state = "cart-q"
access_quartermaster = 1 access_quartermaster = 1
New() /obj/item/weapon/cartridge/quartermaster/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/mule(src) radio = new /obj/item/radio/integrated/mule(src)
head /obj/item/weapon/cartridge/head
name = "Easy-Record DELUXE" name = "Easy-Record DELUXE"
icon_state = "cart-h" icon_state = "cart-h"
access_status_display = 1 access_status_display = 1
hop /obj/item/weapon/cartridge/hop
name = "HumanResources9001" name = "HumanResources9001"
icon_state = "cart-h" icon_state = "cart-h"
access_status_display = 1 access_status_display = 1
@@ -140,52 +141,54 @@
access_janitor = 1 access_janitor = 1
access_security = 1 access_security = 1
New() /obj/item/weapon/cartridge/hop/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/mule(src) radio = new /obj/item/radio/integrated/mule(src)
hos /obj/item/weapon/cartridge/hos
name = "R.O.B.U.S.T. DELUXE" name = "R.O.B.U.S.T. DELUXE"
icon_state = "cart-hos" icon_state = "cart-hos"
access_status_display = 1 access_status_display = 1
access_security = 1 access_security = 1
New() /obj/item/weapon/cartridge/hos/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src) radio = new /obj/item/radio/integrated/beepsky(src)
ce /obj/item/weapon/cartridge/ce
name = "Power-On DELUXE" name = "Power-On DELUXE"
icon_state = "cart-ce" icon_state = "cart-ce"
access_status_display = 1 access_status_display = 1
access_engine = 1 access_engine = 1
access_atmos = 1 access_atmos = 1
cmo /obj/item/weapon/cartridge/cmo
name = "Med-U DELUXE" name = "Med-U DELUXE"
icon_state = "cart-cmo" icon_state = "cart-cmo"
access_status_display = 1 access_status_display = 1
access_reagent_scanner = 1 access_reagent_scanner = 1
access_medical = 1 access_medical = 1
rd /obj/item/weapon/cartridge/rd
name = "Signal Ace DELUXE" name = "Signal Ace DELUXE"
icon_state = "cart-rd" icon_state = "cart-rd"
access_status_display = 1 access_status_display = 1
access_reagent_scanner = 1 access_reagent_scanner = 1
access_atmos = 1 access_atmos = 1
New() /obj/item/weapon/cartridge/rd/New()
..() ..()
spawn(5) spawn(5)
radio = new /obj/item/radio/integrated/signal(src) radio = new /obj/item/radio/integrated/signal(src)
captain /obj/item/weapon/cartridge/captain
name = "Value-PAK Cartridge" name = "Value-PAK Cartridge"
desc = "Now with 200% more value!" desc = "Now with 200% more value!"
icon_state = "cart-c" icon_state = "cart-c"
access_quartermaster = 1
access_janitor = 1
access_engine = 1 access_engine = 1
access_security = 1 access_security = 1
access_medical = 1 access_medical = 1
@@ -193,36 +196,16 @@
access_status_display = 1 access_status_display = 1
access_atmos = 1 access_atmos = 1
syndicate /obj/item/weapon/cartridge/syndicate
name = "Detomatix Cartridge" name = "Detomatix Cartridge"
icon_state = "cart" icon_state = "cart"
access_remote_door = 1 access_remote_door = 1
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing. remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
var/shock_charges = 4 charges = 4
proc/unlock() /obj/item/weapon/cartridge/proc/post_status(var/command, var/data1, var/data2)
if (!istype(loc, /obj/item/device/pda))
return
generate_menu()
print_to_host(menu)
return
proc/print_to_host(var/text)
if (!istype(loc, /obj/item/device/pda))
return
loc:cart = text
for (var/mob/M in viewers(1, loc.loc))
if (M.client && M.machine == loc)
loc:attack_self(M)
return
proc/post_status(var/command, var/data1, var/data2)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
if(!frequency) return if(!frequency) return
var/datum/signal/status_signal = new var/datum/signal/status_signal = new
@@ -247,360 +230,289 @@
frequency.post_signal(src, status_signal) frequency.post_signal(src, status_signal)
proc/generate_menu()
switch(mode)
if(40) //signaller
menu = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>"
menu += {" /*
<a href='byond://?src=\ref[src];choice=Send Signal'>Send Signal</A><BR> This generates the nano values of the cart menus.
Frequency: Because we close the UI when we insert a new cart
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-10'>-</a> we don't have to worry about null values on items
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=-2'>-</a> the user can't access. Well, unless they are href hacking.
[format_frequency(radio:frequency)] But in that case their UI will just lock up.
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=2'>+</a> */
<a href='byond://?src=\ref[src];choice=Signal Frequency;sfreq=10'>+</a><br>
<br>
Code:
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-5'>-</a>
<a href='byond://?src=\ref[src];choice=Signal Code;scode=-1'>-</a>
[radio:code]
<a href='byond://?src=\ref[src];choice=Signal Code;scode=1'>+</a>
<a href='byond://?src=\ref[src];choice=Signal Code;scode=5'>+</a><br>"}
if (42) //status displays
menu = "<h4><img src=pda_status.png> Station Status Display Interlink</h4>"
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=blank'>Clear</A> \]<BR>" /obj/item/weapon/cartridge/proc/create_NanoUI_values(mob/user as mob)
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=shuttle'>Shuttle ETA</A> \]<BR>" var/values[0]
menu += "\[ <A HREF='?src=\ref[src];choice=Status;statdisp=message'>Message</A> \]"
menu += "<ul><li> Line 1: <A HREF='?src=\ref[src];choice=Status;statdisp=setmsg1'>[ message1 ? message1 : "(none)"]</A>"
menu += "<li> Line 2: <A HREF='?src=\ref[src];choice=Status;statdisp=setmsg2'>[ message2 ? message2 : "(none)"]</A></ul><br>"
menu += "\[ Alert: <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=default'>None</A> |"
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=redalert'>Red Alert</A> |"
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=lockdown'>Lockdown</A> |"
menu += " <A HREF='?src=\ref[src];choice=Status;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR>"
if (43) //Muskets' and Rockdtben's power monitor :D /* Signaler (Mode: 40) */
menu = "<h4><img src=pda_power.png> Power Monitors - Please select one</h4><BR>"
powmonitor = null
powermonitors = list() if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
var/powercount = 0 var/obj/item/radio/integrated/signal/R = radio
values["signal_freq"] = format_frequency(R.frequency)
values["signal_code"] = R.code
/* Station Display (Mode: 42) */
if(mode==42)
values["message1"] = message1 ? message1 : "(none)"
values["message2"] = message2 ? message2 : "(none)"
/* Power Monitor (Mode: 43 / 433) */
if(mode==43 || mode==433)
var/pMonData[0]
for(var/obj/machinery/power/monitor/pMon in world) for(var/obj/machinery/power/monitor/pMon in world)
if(!(pMon.stat & (NOPOWER|BROKEN)) ) if(!(pMon.stat & (NOPOWER|BROKEN)) )
powercount++ pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
powermonitors += pMon if(isnull(powmonitor)) powmonitor = pMon
values["powermonitors"] = pMonData
if(!powercount) values["poweravail"] = powmonitor.powernet.avail
menu += "\red No connection<BR>" values["powerload"] = num2text(powmonitor.powernet.viewload,10)
else
menu += "<FONT SIZE=-1>"
var/count = 0
for(var/obj/machinery/power/monitor/pMon in powermonitors)
count++
menu += "<a href='byond://?src=\ref[src];choice=Power Select;target=[count]'> [pMon] </a><BR>"
menu += "</FONT>"
if (433) //Muskets' and Rockdtben's power monitor :D
menu = "<h4><img src=pda_power.png> Power Monitor </h4><BR>"
if(!powmonitor)
menu += "\red No connection<BR>"
else
var/list/L = list() var/list/L = list()
for(var/obj/machinery/power/terminal/term in powmonitor.powernet.nodes) for(var/obj/machinery/power/terminal/term in powmonitor.powernet.nodes)
if(istype(term.master, /obj/machinery/power/apc)) if(istype(term.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = term.master var/obj/machinery/power/apc/A = term.master
L += A L += A
menu += "<PRE>Total power: [powmonitor.powernet.avail] W<BR>Total load: [num2text(powmonitor.powernet.viewload,10)] W<BR>" var/list/Status = list(0,0,1,1) // Status: off, auto-off, on, auto-on
var/list/chg = list(0,1,1) // Charging: nope, charging, full
menu += "<FONT SIZE=-1>" var/apcData[0]
if(L.len > 0)
menu += "Area Eqp./Lgt./Env. Load Cell<HR>"
var/list/S = list(" Off","AOff"," On", " AOn")
var/list/chg = list("N","C","F")
for(var/obj/machinery/power/apc/A in L) for(var/obj/machinery/power/apc/A in L)
menu += copytext(add_tspace(A.area.name, 30), 1, 30) apcData[++apcData.len] = list("Name" = html_encode(A.area.name), "Equipment" = Status[A.equipment+1], "Lights" = Status[A.lighting+1], "Environment" = Status[A.environ+1], "CellPct" = A.cell ? round(A.cell.percent(),1) : -1, "CellStatus" = A.cell ? chg[A.charging+1] : 0)
menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(A.lastused_total, 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]<BR>"
menu += "</FONT></PRE>" values["apcs"] = apcData
if (44) //medical records //This thing only displays a single screen so it's hard to really get the sub-menu stuff working.
menu = "<h4><img src=pda_medical.png> Medical Record List</h4>"
if(!isnull(data_core.general))
/* General Records (Mode: 44 / 441 / 45 / 451) */
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
values["general"] = active1.fields
values["general_exists"] = 1
else
values["general_exists"] = 0
/* Medical Records (Mode: 44 / 441) */
if(mode == 44 || mode == 441)
var/medData[0]
for(var/datum/data/record/R in sortRecord(data_core.general))
medData[++medData.len] = list(Name = R.fields["name"],"ref" = "\ref[R]")
values["medical_records"] = medData
if(istype(active2, /datum/data/record) && (active2 in data_core.medical))
values["medical"] = active2.fields
values["medical_exists"] = 1
else
values["medical_exists"] = 0
/* Security Records (Mode:45 / 451) */
if(mode == 45 || mode == 451)
var/secData[0]
for (var/datum/data/record/R in sortRecord(data_core.general)) for (var/datum/data/record/R in sortRecord(data_core.general))
menu += "<a href='byond://?src=\ref[src];choice=Medical Records;target=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>" secData[++secData.len] = list(Name = R.fields["name"], "ref" = "\ref[R]")
menu += "<br>" values["security_records"] = secData
if(441)
menu = "<h4><img src=pda_medical.png> Medical Record</h4>"
if (istype(active1, /datum/data/record) && (active1 in data_core.general)) if(istype(active3, /datum/data/record) && (active3 in data_core.security))
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>" values["security"] = active3.fields
menu += "Sex: [active1.fields["sex"]]<br>" values["security_exists"] = 1
menu += "Age: [active1.fields["age"]]<br>"
menu += "Rank: [active1.fields["rank"]]<br>"
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
menu += "Physical Status: [active1.fields["p_stat"]]<br>"
menu += "Mental Status: [active1.fields["m_stat"]]<br>"
else else
menu += "<b>Record Lost!</b><br>" values["security_exists"] = 0
menu += "<br>" /* Security Bot Control (Mode: 46) */
menu += "<h4><img src=pda_medical.png> Medical Data</h4>" if(mode==46)
if (istype(active2, /datum/data/record) && (active2 in data_core.medical)) var/botsData[0]
menu += "Blood Type: [active2.fields["b_type"]]<br><br>" var/beepskyData[0]
if(istype(radio,/obj/item/radio/integrated/beepsky))
menu += "Minor Disabilities: [active2.fields["mi_dis"]]<br>"
menu += "Details: [active2.fields["mi_dis_d"]]<br><br>"
menu += "Major Disabilities: [active2.fields["ma_dis"]]<br>"
menu += "Details: [active2.fields["ma_dis_d"]]<br><br>"
menu += "Allergies: [active2.fields["alg"]]<br>"
menu += "Details: [active2.fields["alg_d"]]<br><br>"
menu += "Current Diseases: [active2.fields["cdi"]]<br>"
menu += "Details: [active2.fields["cdi_d"]]<br><br>"
menu += "Important Notes: [active2.fields["notes"]]<br>"
else
menu += "<b>Record Lost!</b><br>"
menu += "<br>"
if (45) //security records
menu = "<h4><img src=pda_cuffs.png> Security Record List</h4>"
if(!isnull(data_core.general))
for (var/datum/data/record/R in sortRecord(data_core.general))
menu += "<a href='byond://?src=\ref[src];choice=Security Records;target=\ref[R]'>[R.fields["id"]]: [R.fields["name"]]<br>"
menu += "<br>"
if(451)
menu = "<h4><img src=pda_cuffs.png> Security Record</h4>"
if (istype(active1, /datum/data/record) && (active1 in data_core.general))
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
menu += "Sex: [active1.fields["sex"]]<br>"
menu += "Age: [active1.fields["age"]]<br>"
menu += "Rank: [active1.fields["rank"]]<br>"
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
menu += "Physical Status: [active1.fields["p_stat"]]<br>"
menu += "Mental Status: [active1.fields["m_stat"]]<br>"
else
menu += "<b>Record Lost!</b><br>"
menu += "<br>"
menu += "<h4><img src=pda_cuffs.png> Security Data</h4>"
if (istype(active3, /datum/data/record) && (active3 in data_core.security))
menu += "Criminal Status: [active3.fields["criminal"]]<br>"
menu += "Minor Crimes: [active3.fields["mi_crim"]]<br>"
menu += "Details: [active3.fields["mi_crim"]]<br><br>"
menu += "Major Crimes: [active3.fields["ma_crim"]]<br>"
menu += "Details: [active3.fields["ma_crim_d"]]<br><br>"
menu += "Important Notes:<br>"
menu += "[active3.fields["notes"]]"
else
menu += "<b>Record Lost!</b><br>"
menu += "<br>"
if (46) //beepsky control
var/obj/item/radio/integrated/beepsky/SC = radio var/obj/item/radio/integrated/beepsky/SC = radio
if(!SC) beepskyData["active"] = SC.active
menu = "Interlink Error - Please reinsert cartridge." if(SC.active && !isnull(SC.botstatus))
return var/area/loca = SC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
menu = "<h4><img src=pda_cuffs.png> Securitron Interlink</h4>" beepskyData["botstatus"] = list("loca" = loca_name, "mode" = SC.botstatus["mode"])
if(!SC.active)
// list of bots
if(!SC.botlist || (SC.botlist && SC.botlist.len==0))
menu += "No bots found.<BR>"
else else
beepskyData["botstatus"] = list("loca" = null, "mode" = -1)
var/botsCount=0
if(SC.botlist && SC.botlist.len)
for(var/obj/machinery/bot/B in SC.botlist) for(var/obj/machinery/bot/B in SC.botlist)
if (B) botsCount++
menu += "<A href='byond://?src=\ref[SC];op=control;bot=\ref[B]'>[B] at [B.loc.loc]</A><BR>" if(B.loc)
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
menu += "<BR><A href='byond://?src=\ref[SC];op=scanbots'><img src=pda_scanner.png> Scan for active bots</A><BR>" if(!botsData.len)
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
else // bot selected, control it beepskyData["bots"] = botsData
beepskyData["count"] = botsCount
menu += "<B>[SC.active]</B><BR> Status: (<A href='byond://?src=\ref[SC];op=control;bot=\ref[SC.active]'><img src=pda_refresh.png><i>refresh</i></A>)<BR>"
if(!SC.botstatus)
menu += "Waiting for response...<BR>"
else else
beepskyData["active"] = 0
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
beepskyData["botstatus"] = list("loca" = null, "mode" = null)
beepskyData["bots"] = botsData
beepskyData["count"] = 0
menu += "Location: [SC.botstatus["loca"] ]<BR>" values["beepsky"] = beepskyData
menu += "Mode: "
switch(SC.botstatus["mode"])
if(0)
menu += "Ready"
if(1)
menu += "Apprehending target"
if(2,3)
menu += "Arresting target"
if(4)
menu += "Starting patrol"
if(5)
menu += "On patrol"
if(6)
menu += "Responding to summons"
menu += "<BR>\[<A href='byond://?src=\ref[SC];op=stop'>Stop Patrol</A>\] " /* MULEBOT Control (Mode: 48) */
menu += "\[<A href='byond://?src=\ref[SC];op=go'>Start Patrol</A>\] "
menu += "\[<A href='byond://?src=\ref[SC];op=summon'>Summon Bot</A>\]<BR>"
menu += "<HR><A href='byond://?src=\ref[SC];op=botlist'><img src=pda_back.png>Return to bot list</A>"
if (47) //quartermaster order records if(mode==48)
menu = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>" var/muleData[0]
var/mulebotsData[0]
if(istype(radio,/obj/item/radio/integrated/mule))
var/obj/item/radio/integrated/mule/QC = radio
muleData["active"] = QC.active
if(QC.active && !isnull(QC.botstatus))
var/area/loca = QC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
muleData["botstatus"] = list("loca" = loca_name, "mode" = QC.botstatus["mode"],"home"=QC.botstatus["home"],"powr" = QC.botstatus["powr"],"retn" =QC.botstatus["retn"], "pick"=QC.botstatus["pick"], "load" = QC.botstatus["load"], "dest" = sanitize(QC.botstatus["dest"]))
menu += "<BR><B>Supply shuttle</B><BR>" else
menu += "Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>" muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
menu += "Current approved orders: <BR><ol>"
var/mulebotsCount=0
for(var/obj/machinery/bot/B in QC.botlist)
mulebotsCount++
if(B.loc)
mulebotsData[++mulebotsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
if(!mulebotsData.len)
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
muleData["count"] = mulebotsCount
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["active"] = 0
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
muleData["count"] = 0
values["mulebot"] = muleData
/* Supply Shuttle Requests Menu (Mode: 47) */
if(mode==47)
var/supplyData[0]
supplyData["shuttle_moving"] = supply_shuttle.moving
supplyData["shuttle_eta"] = supply_shuttle.eta
supplyData["shuttle_loc"] = supply_shuttle.at_station ? "Station" : "Dock"
var/supplyOrderCount = 0
var/supplyOrderData[0]
for(var/S in supply_shuttle.shoppinglist) for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S var/datum/supply_order/SO = S
menu += "<li>#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "</ol>"
menu += "Current requests: <BR><ol>" supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!supplyOrderData.len)
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
supplyData["approved"] = supplyOrderData
supplyData["approved_count"] = supplyOrderCount
var/requestCount = 0
var/requestData[0]
for(var/S in supply_shuttle.requestlist) for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S var/datum/supply_order/SO = S
menu += "<li>#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]</li>" requestCount++
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management." requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!requestData.len)
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
if (48) //mulebot control supplyData["requests"] = requestData
var/obj/item/radio/integrated/mule/QC = radio supplyData["requests_count"] = requestCount
if(!QC)
menu = "Interlink Error - Please reinsert cartridge."
return
menu = "<h4><img src=pda_mule.png> M.U.L.E. bot Interlink V0.8</h4>"
if(!QC.active) values["supply"] = supplyData
// list of bots
if(!QC.botlist || (QC.botlist && QC.botlist.len==0))
menu += "No bots found.<BR>"
else
for(var/obj/machinery/bot/mulebot/B in QC.botlist)
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [get_area(B)]</A><BR>"
menu += "<BR><A href='byond://?src=\ref[QC];op=scanbots'><img src=pda_scanner.png> Scan for active bots</A><BR>"
else // bot selected, control it
menu += "<B>[QC.active]</B><BR> Status: (<A href='byond://?src=\ref[QC];op=control;bot=\ref[QC.active]'><img src=pda_refresh.png><i>refresh</i></A>)<BR>"
if(!QC.botstatus)
menu += "Waiting for response...<BR>"
else
menu += "Location: [QC.botstatus["loca"] ]<BR>"
menu += "Mode: "
switch(QC.botstatus["mode"])
if(0)
menu += "Ready"
if(1)
menu += "Loading/Unloading"
if(2)
menu += "Navigating to Delivery Location"
if(3)
menu += "Navigating to Home"
if(4)
menu += "Waiting for clear path"
if(5,6)
menu += "Calculating navigation path"
if(7)
menu += "Unable to locate destination"
var/obj/structure/closet/crate/C = QC.botstatus["load"]
menu += "<BR>Current Load: [ !C ? "<i>none</i>" : "[C.name] (<A href='byond://?src=\ref[QC];op=unload'><i>unload</i></A>)" ]<BR>"
menu += "Destination: [!QC.botstatus["dest"] ? "<i>none</i>" : QC.botstatus["dest"] ] (<A href='byond://?src=\ref[QC];op=setdest'><i>set</i></A>)<BR>"
menu += "Power: [QC.botstatus["powr"]]%<BR>"
menu += "Home: [!QC.botstatus["home"] ? "<i>none</i>" : QC.botstatus["home"] ]<BR>"
menu += "Auto Return Home: [QC.botstatus["retn"] ? "<B>On</B> <A href='byond://?src=\ref[QC];op=retoff'>Off</A>" : "(<A href='byond://?src=\ref[QC];op=reton'><i>On</i></A>) <B>Off</B>"]<BR>"
menu += "Auto Pickup Crate: [QC.botstatus["pick"] ? "<B>On</B> <A href='byond://?src=\ref[QC];op=pickoff'>Off</A>" : "(<A href='byond://?src=\ref[QC];op=pickon'><i>On</i></A>) <B>Off</B>"]<BR><BR>"
menu += "\[<A href='byond://?src=\ref[QC];op=stop'>Stop</A>\] "
menu += "\[<A href='byond://?src=\ref[QC];op=go'>Proceed</A>\] "
menu += "\[<A href='byond://?src=\ref[QC];op=home'>Return Home</A>\]<BR>"
menu += "<HR><A href='byond://?src=\ref[QC];op=botlist'><img src=pda_back.png>Return to bot list</A>"
if (49) //janitorial locator
menu = "<h4><img src=pda_bucket.png> Persistent Custodial Object Locator</h4>"
/* Janitor Supplies Locator (Mode: 49) */
if(mode==49)
var/JaniData[0]
var/turf/cl = get_turf(src) var/turf/cl = get_turf(src)
if (cl)
menu += "Current Orbital Location: <b>\[[cl.x],[cl.y]\]</b>"
menu += "<h4>Located Mops:</h4>" if(cl)
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
var/ldat else
for (var/obj/item/weapon/mop/M in world) JaniData["user_loc"] = list("x" = 0, "y" = 0)
var/MopData[0]
for(var/obj/item/weapon/mop/M in world)
var/turf/ml = get_turf(M) var/turf/ml = get_turf(M)
if(ml) if(ml)
if (ml.z != cl.z) if(ml.z != cl.z)
continue continue
var/direction = get_dir(src, M) var/direction = get_dir(src, M)
ldat += "Mop - <b>\[[ml.x],[ml.y] ([uppertext(dir2text(direction))])\]</b> - [M.reagents.total_volume ? "Wet" : "Dry"]<br>" MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry")
if (!ldat) if(!MopData.len)
menu += "None" MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
else
menu += "[ldat]"
menu += "<h4>Located Mop Buckets:</h4>"
ldat = null var/BucketData[0]
for (var/obj/structure/mopbucket/B in world) for(var/obj/structure/mopbucket/B in world)
var/turf/bl = get_turf(B) var/turf/bl = get_turf(B)
if(bl) if(bl)
if (bl.z != cl.z) if(bl.z != cl.z)
continue continue
var/direction = get_dir(src, B) var/direction = get_dir(src,B)
ldat += "Bucket - <b>\[[bl.x],[bl.y] ([uppertext(dir2text(direction))])\]</b> - Water level: [B.reagents.total_volume]/100<br>" BucketData[++BucketData.len] = list ("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if (!ldat) if(!BucketData.len)
menu += "None" BucketData[++BucketData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
else
menu += "[ldat]"
menu += "<h4>Located Cleanbots:</h4>" var/CbotData[0]
for(var/obj/machinery/bot/cleanbot/B in world)
ldat = null
for (var/obj/machinery/bot/cleanbot/B in world)
var/turf/bl = get_turf(B) var/turf/bl = get_turf(B)
if(bl) if(bl)
if (bl.z != cl.z) if(bl.z != cl.z)
continue continue
var/direction = get_dir(src, B) var/direction = get_dir(src,B)
ldat += "Cleanbot - <b>\[[bl.x],[bl.y] ([uppertext(dir2text(direction))])\]</b> - [B.on ? "Online" : "Offline"]<br>" CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline")
if(!CbotData.len)
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/CartData[0]
for(var/obj/structure/janitorialcart/B in world)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
var/direction = get_dir(src,B)
CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if(!CartData.len)
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
JaniData["mops"] = MopData
JaniData["buckets"] = BucketData
JaniData["cleanbots"] = CbotData
JaniData["carts"] = CartData
values["janitor"] = JaniData
return values
if (!ldat)
menu += "None"
else
menu += "[ldat]"
else
menu += "ERROR: Unable to determine current location."
menu += "<br><br><A href='byond://?src=\ref[src];choice=49'>Refresh GPS Locator</a>"
/obj/item/weapon/cartridge/Topic(href, href_list) /obj/item/weapon/cartridge/Topic(href, href_list)
@@ -611,6 +523,9 @@ Code:
usr << browse(null, "window=pda") usr << browse(null, "window=pda")
return return
switch(href_list["choice"]) switch(href_list["choice"])
if("Medical Records") if("Medical Records")
var/datum/data/record/R = locate(href_list["target"]) var/datum/data/record/R = locate(href_list["target"])
@@ -668,10 +583,9 @@ Code:
else else
post_status(href_list["statdisp"]) post_status(href_list["statdisp"])
if("Power Select") if("Power Select")
var/pnum = text2num(href_list["target"]) var/pref = href_list["target"]
powmonitor = powermonitors[pnum] powmonitor = locate(pref)
loc:mode = 433 loc:mode = 433
mode = 433 mode = 433
generate_menu() return 1
print_to_host(menu)

View File

@@ -31,15 +31,6 @@
frequency.post_signal(src, signal, filter = s_filter) 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 return
proc/generate_menu() proc/generate_menu()
@@ -107,7 +98,6 @@
if("summon") if("summon")
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , s_filter = RADIO_SECBOT) 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) post_signal(control_freq, "command", "bot_status", "active", active, s_filter = RADIO_SECBOT)
PDA.cartridge.unlock()
/obj/item/radio/integrated/mule /obj/item/radio/integrated/mule
var/list/botlist = null // list of bots var/list/botlist = null // list of bots
@@ -163,7 +153,6 @@
Topic(href, href_list) Topic(href, href_list)
..() ..()
var/obj/item/device/pda/PDA = src.hostpda
var/cmd = "command" var/cmd = "command"
if(active) cmd = "command [active.suffix]" if(active) cmd = "command [active.suffix]"
@@ -208,7 +197,6 @@
if("stop", "go", "home") if("stop", "go", "home")
post_signal(control_freq, cmd, href_list["op"], s_filter = RADIO_MULEBOT) post_signal(control_freq, cmd, href_list["op"], s_filter = RADIO_MULEBOT)
post_signal(control_freq, cmd, "bot_status", s_filter = RADIO_MULEBOT) post_signal(control_freq, cmd, "bot_status", s_filter = RADIO_MULEBOT)
PDA.cartridge.unlock()

View File

@@ -11,30 +11,36 @@
origin_tech = "syndicate=4;magnets=4" origin_tech = "syndicate=4;magnets=4"
var/can_use = 1 var/can_use = 1
var/obj/effect/dummy/chameleon/active_dummy = null var/obj/effect/dummy/chameleon/active_dummy = null
var/saved_item = "/obj/item/weapon/cigbutt" var/saved_item = /obj/item/weapon/cigbutt
var/saved_icon = 'icons/obj/clothing/masks.dmi'
var/saved_icon_state = "cigbutt"
var/saved_overlays
dropped() /obj/item/device/chameleon/dropped()
disrupt() disrupt()
attack_self() /obj/item/device/chameleon/equipped()
disrupt()
/obj/item/device/chameleon/attack_self()
toggle() toggle()
afterattack(atom/target, mob/user, proximity) /obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return if(!proximity) return
if(istype(target,/obj/item)) if(!active_dummy)
playsound(src, 'sound/weapons/flash.ogg', 100, 1, 1) if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
user << "\blue Scanned [target]." user << "\blue Scanned [target]."
saved_item = target.type saved_item = target.type
saved_icon = target.icon
saved_icon_state = target.icon_state
saved_overlays = target.overlays
proc/toggle() /obj/item/device/chameleon/proc/toggle()
if(!can_use || !saved_item) return if(!can_use || !saved_item) return
if(active_dummy) if(active_dummy)
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) eject_all()
for(var/atom/movable/A in active_dummy) playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
A.loc = active_dummy.loc
if(ismob(A))
if(A:client)
A:client:eye = A
del(active_dummy) del(active_dummy)
active_dummy = null active_dummy = null
usr << "\blue You deactivate the [src]." usr << "\blue You deactivate the [src]."
@@ -43,18 +49,11 @@
flick("emppulse",T) flick("emppulse",T)
spawn(8) T.delete() spawn(8) T.delete()
else else
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/O = new saved_item(src) var/obj/O = new saved_item(src)
if(!O) return if(!O) return
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc) var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.name = O.name C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, src)
C.desc = O.desc
C.icon = O.icon
C.icon_state = O.icon_state
C.dir = O.dir
usr.loc = C
C.master = src
src.active_dummy = C
del(O) del(O)
usr << "\blue You activate the [src]." usr << "\blue You activate the [src]."
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src)) var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
@@ -62,22 +61,25 @@
flick("emppulse",T) flick("emppulse",T)
spawn(8) T.delete() spawn(8) T.delete()
proc/disrupt() /obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
if(active_dummy) if(active_dummy)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src) spark_system.set_up(5, 0, src)
spark_system.attach(src) spark_system.attach(src)
spark_system.start() spark_system.start()
for(var/atom/movable/A in active_dummy) eject_all()
A.loc = active_dummy.loc if(delete_dummy)
if(ismob(A))
if(A:client)
A:client:eye = A
del(active_dummy) del(active_dummy)
active_dummy = null active_dummy = null
can_use = 0 can_use = 0
spawn(100) can_use = 1 spawn(50) can_use = 1
/obj/item/device/chameleon/proc/eject_all()
for(var/atom/movable/A in active_dummy)
A.loc = active_dummy.loc
if(ismob(A))
var/mob/M = A
M.reset_view(null)
/obj/effect/dummy/chameleon /obj/effect/dummy/chameleon
name = "" name = ""
@@ -86,29 +88,45 @@
anchored = 1 anchored = 1
var/can_move = 1 var/can_move = 1
var/obj/item/device/chameleon/master = null var/obj/item/device/chameleon/master = null
attackby()
/obj/effect/dummy/chameleon/proc/activate(var/obj/O, var/mob/M, new_icon, new_iconstate, new_overlays, var/obj/item/device/chameleon/C)
name = O.name
desc = O.desc
icon = new_icon
icon_state = new_iconstate
overlays = new_overlays
dir = O.dir
M.loc = src
master = C
master.active_dummy = src
/obj/effect/dummy/chameleon/attackby()
for(var/mob/M in src) for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates." M << "\red Your chameleon-projector deactivates."
master.disrupt() master.disrupt()
attack_hand()
/obj/effect/dummy/chameleon/attack_hand()
for(var/mob/M in src) for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates." M << "\red Your chameleon-projector deactivates."
master.disrupt() master.disrupt()
ex_act()
/obj/effect/dummy/chameleon/ex_act()
for(var/mob/M in src) for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates." M << "\red Your chameleon-projector deactivates."
master.disrupt() master.disrupt()
bullet_act()
/obj/effect/dummy/chameleon/bullet_act()
for(var/mob/M in src) for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates." M << "\red Your chameleon-projector deactivates."
..() ..()
master.disrupt() master.disrupt()
relaymove(var/mob/user, direction)
/obj/effect/dummy/chameleon/relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement! if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move) if(can_move)
can_move = 0 can_move = 0
switch(usr.bodytemperature) switch(user.bodytemperature)
if(300 to INFINITY) if(300 to INFINITY)
spawn(10) can_move = 1 spawn(10) can_move = 1
if(295 to 300) if(295 to 300)
@@ -119,5 +137,9 @@
spawn(20) can_move = 1 spawn(20) can_move = 1
else else
spawn(25) can_move = 1 spawn(25) can_move = 1
step(src,direction) step(src, direction)
return return
/obj/effect/dummy/chameleon/Del()
master.disrupt(0)
..()

View File

@@ -143,7 +143,9 @@ REAGENT SCANNER
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.") user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.")
if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) if (M.has_brain_worms())
user.show_message("\red Subject suffering from aberrant brain activity. Recommend further scanning.")
else if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)
user.show_message("\red Subject is brain dead.") user.show_message("\red Subject is brain dead.")
else if (M.getBrainLoss() >= 60) else if (M.getBrainLoss() >= 60)
user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.") user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.")

View File

@@ -14,6 +14,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/item_data // raw item text var/item_data // raw item text
var/list/ItemList // Parsed list of items var/list/ItemList // Parsed list of items
var/uses // Numbers of crystals var/uses // Numbers of crystals
var/nanoui_items[0]
// List of items not to shove in their hands. // List of items not to shove in their hands.
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate) var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
@@ -25,13 +26,42 @@ A list of items and costs is stored under the datum of every game mode, alongsid
items = replacetext(item_data) items = replacetext(item_data)
ItemList = text2list(src.items, ";") // Parsing the items text string ItemList = text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses uses = ticker.mode.uplink_uses
nanoui_items = generate_nanoui_items()
//Halfassed fix for href exploit ~Z
for(var/D in ItemList) for(var/D in ItemList)
var/list/O = stringsplit(D, ":") var/list/O = text2list(D, ":")
if(O.len>0) if(O.len>0)
valid_items += O[1] valid_items += O[1]
/*
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 = text2list(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! //Let's build a menu!
/obj/item/device/uplink/proc/generate_menu() /obj/item/device/uplink/proc/generate_menu()
@@ -49,7 +79,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/category_items = 1 //To prevent stupid :P var/category_items = 1 //To prevent stupid :P
for(var/D in ItemList) for(var/D in ItemList)
var/list/O = stringsplit(D, ":") var/list/O = text2list(D, ":")
if(O.len != 3) //If it is not an actual item, make a break in the menu. 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 if(O.len == 1) //If there is one item, it's probably a title
dat += "<b>[O[1]]</b><br>" dat += "<b>[O[1]]</b><br>"
@@ -238,8 +268,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
feedback_add_details("traitor_uplink_items_bought","ST") feedback_add_details("traitor_uplink_items_bought","ST")
/obj/item/device/uplink/Topic(href, href_list) /obj/item/device/uplink/Topic(href, href_list)
if (href_list["buy_item"]) if (href_list["buy_item"])
if(href_list["buy_item"] == "random") if(href_list["buy_item"] == "random")
var/boughtItem = chooseRandomItem() var/boughtItem = chooseRandomItem()
if(boughtItem) if(boughtItem)
@@ -307,31 +337,47 @@ A list of items and costs is stored under the datum of every game mode, alongsid
return 1 return 1
return 0 return 0
// 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 as mob) NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/title = "Syndicate Uplink"
var/data[0]
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>" data["crystals"] = uses
dat += src.generate_menu() data["nano_items"] = nanoui_items
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>" data["welcome"] = welcome
dat += "</font></body>"
user << browse(dat, "window=hidden") // update the ui if it exists, returns null if no ui is passed/found
onclose(user, "hidden") ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
return if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
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)
// open the new ui window
ui.open()
// 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. // The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list) /obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained()) if (usr.stat || usr.restrained())
return return
if (!( istype(usr, /mob/living/carbon/human))) if (!( istype(usr, /mob/living/carbon/human)))
return 0 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)))) if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src) usr.set_machine(src)
if(href_list["lock"]) if(href_list["lock"])
toggle() toggle()
usr << browse(null, "window=hidden") ui.close()
return 1 return 1
if(..(href, href_list) == 1) if(..(href, href_list) == 1)
@@ -347,7 +393,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
A.put_in_any_hand_if_possible(I) A.put_in_any_hand_if_possible(I)
purchase_log += "[usr] ([usr.ckey]) bought [I]." purchase_log += "[usr] ([usr.ckey]) bought [I]."
interact(usr) interact(usr)
return return 1
// I placed this here because of how relevant it is. // 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. // You place this in your uplinkable item to check if an uplink is active or not.

View File

@@ -5,7 +5,7 @@
***********************************************************************/ ***********************************************************************/
//Might want to move this into several files later but for now it works here //Might want to move this into several files later but for now it works here
/obj/item/borg/stun /obj/item/borg/stun
name = "Electrified Arm" name = "electrified arm"
icon = 'icons/obj/decals.dmi' icon = 'icons/obj/decals.dmi'
icon_state = "shock" icon_state = "shock"
@@ -26,7 +26,7 @@
O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2) O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2)
/obj/item/borg/overdrive /obj/item/borg/overdrive
name = "Overdrive" name = "overdrive"
icon = 'icons/obj/decals.dmi' icon = 'icons/obj/decals.dmi'
icon_state = "shock" icon_state = "shock"
@@ -40,27 +40,27 @@
/obj/item/borg/sight/xray /obj/item/borg/sight/xray
name = "X-ray Vision" name = "\proper x-ray Vision"
sight_mode = BORGXRAY sight_mode = BORGXRAY
/obj/item/borg/sight/thermal /obj/item/borg/sight/thermal
name = "Thermal Vision" name = "\proper thermal vision"
sight_mode = BORGTHERM sight_mode = BORGTHERM
/obj/item/borg/sight/meson /obj/item/borg/sight/meson
name = "Meson Vision" name = "\proper meson vision"
sight_mode = BORGMESON sight_mode = BORGMESON
/obj/item/borg/sight/hud /obj/item/borg/sight/hud
name = "Hud" name = "hud"
var/obj/item/clothing/glasses/hud/hud = null var/obj/item/clothing/glasses/hud/hud = null
/obj/item/borg/sight/hud/med /obj/item/borg/sight/hud/med
name = "Medical Hud" name = "medical hud"
New() New()
@@ -70,7 +70,7 @@
/obj/item/borg/sight/hud/sec /obj/item/borg/sight/hud/sec
name = "Security Hud" name = "security hud"
New() New()

View File

@@ -2,7 +2,7 @@
// Contains various borg upgrades. // Contains various borg upgrades.
/obj/item/borg/upgrade /obj/item/borg/upgrade
name = "A borg upgrade module." name = "borg upgrade module."
desc = "Protected by FRM." desc = "Protected by FRM."
icon = 'icons/obj/module.dmi' icon = 'icons/obj/module.dmi'
icon_state = "cyborg_upgrade" icon_state = "cyborg_upgrade"
@@ -153,7 +153,7 @@
/obj/item/borg/upgrade/syndicate/ /obj/item/borg/upgrade/syndicate/
name = "Illegal Equipment Module" name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a robot" desc = "Unlocks the hidden, deadlier functions of a robot"
construction_cost = list("metal"=10000,"glass"=15000,"diamond" = 10000) construction_cost = list("metal"=10000,"glass"=15000,"diamond" = 10000)
icon_state = "cyborg_upgrade3" icon_state = "cyborg_upgrade3"

View File

@@ -1,5 +1,5 @@
/obj/item/stack/rods /obj/item/stack/rods
name = "metal rods" name = "metal rod"
desc = "Some rods. Can be used for building, or something." desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod" singular_name = "metal rod"
icon_state = "rods" icon_state = "rods"

View File

@@ -1,5 +1,5 @@
/obj/item/stack/light_w /obj/item/stack/light_w
name = "wired glass tiles" name = "wired glass tile"
singular_name = "wired glass floor tile" singular_name = "wired glass floor tile"
desc = "A glass tile, which is wired, somehow." desc = "A glass tile, which is wired, somehow."
icon_state = "glass_wire" icon_state = "glass_wire"

View File

@@ -18,7 +18,7 @@ Mineral Sheets
* Sandstone * Sandstone
*/ */
/obj/item/stack/sheet/mineral/sandstone /obj/item/stack/sheet/mineral/sandstone
name = "sandstone bricks" name = "sandstone brick"
desc = "This appears to be a combination of both sand and stone." desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick" singular_name = "sandstone brick"
icon_state = "sheet-sandstone" icon_state = "sheet-sandstone"

View File

@@ -135,7 +135,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
) )
/obj/item/stack/sheet/wood /obj/item/stack/sheet/wood
name = "wooden planks" name = "wooden plank"
desc = "One can only guess that this is a bunch of wood." desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank" singular_name = "wood plank"
icon_state = "sheet-wood" icon_state = "sheet-wood"

View File

@@ -9,6 +9,7 @@
* Stacks * Stacks
*/ */
/obj/item/stack /obj/item/stack
gender = PLURAL
origin_tech = "materials=1" origin_tech = "materials=1"
var/list/datum/stack_recipe/recipes var/list/datum/stack_recipe/recipes
var/singular_name var/singular_name

View File

@@ -1,5 +1,5 @@
/obj/item/stack/tile/light /obj/item/stack/tile/light
name = "light tiles" name = "light tile"
singular_name = "light floor tile" singular_name = "light floor tile"
desc = "A floor tile, made out off glass. It produces light." desc = "A floor tile, made out off glass. It produces light."
icon_state = "tile_e" icon_state = "tile_e"

View File

@@ -1,5 +1,5 @@
/obj/item/stack/tile/plasteel /obj/item/stack/tile/plasteel
name = "floor tiles" name = "floor tile"
singular_name = "floor tile" singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon" desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile" icon_state = "tile"

View File

@@ -9,7 +9,7 @@
* Grass * Grass
*/ */
/obj/item/stack/tile/grass /obj/item/stack/tile/grass
name = "grass tiles" name = "grass tile"
singular_name = "grass floor tile" singular_name = "grass floor tile"
desc = "A patch of grass like they often use on golf courses" desc = "A patch of grass like they often use on golf courses"
icon_state = "tile_grass" icon_state = "tile_grass"
@@ -26,7 +26,7 @@
* Wood * Wood
*/ */
/obj/item/stack/tile/wood /obj/item/stack/tile/wood
name = "wood floor tiles" name = "wood floor tile"
singular_name = "wood floor tile" singular_name = "wood floor tile"
desc = "an easy to fit wood floor tile" desc = "an easy to fit wood floor tile"
icon_state = "tile-wood" icon_state = "tile-wood"

View File

@@ -7,7 +7,7 @@ AI MODULES
// AI module // AI module
/obj/item/weapon/aiModule /obj/item/weapon/aiModule
name = "AI Module" name = "\improper AI module"
icon = 'icons/obj/module.dmi' icon = 'icons/obj/module.dmi'
icon_state = "std_mod" icon_state = "std_mod"
item_state = "electronic" item_state = "electronic"
@@ -87,7 +87,7 @@ AI MODULES
/******************** Safeguard ********************/ /******************** Safeguard ********************/
/obj/item/weapon/aiModule/safeguard /obj/item/weapon/aiModule/safeguard
name = "'Safeguard' AI Module" name = "\improper 'Safeguard' AI module"
var/targetName = "" var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not human and are a threat to humans.'" desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not human and are a threat to humans.'"
origin_tech = "programming=3;materials=4" origin_tech = "programming=3;materials=4"
@@ -116,7 +116,7 @@ AI MODULES
/******************** OneHuman ********************/ /******************** OneHuman ********************/
/obj/item/weapon/aiModule/oneHuman /obj/item/weapon/aiModule/oneHuman
name = "'OneHuman' AI Module" name = "\improper 'OneHuman' AI module"
var/targetName = "" var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is human.'" desc = "A 'one human' AI module: 'Only <name> is human.'"
origin_tech = "programming=3;materials=6" //made with diamonds! origin_tech = "programming=3;materials=6" //made with diamonds!
@@ -148,7 +148,7 @@ AI MODULES
/******************** ProtectStation ********************/ /******************** ProtectStation ********************/
/obj/item/weapon/aiModule/protectStation /obj/item/weapon/aiModule/protectStation
name = "'ProtectStation' AI Module" name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'" desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold origin_tech = "programming=3;materials=4" //made of gold
@@ -196,7 +196,7 @@ AI MODULES
/******************** Quarantine ********************/ /******************** Quarantine ********************/
/obj/item/weapon/aiModule/quarantine /obj/item/weapon/aiModule/quarantine
name = "'Quarantine' AI Module" name = "\improper 'Quarantine' AI module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'" desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4" origin_tech = "programming=3;biotech=2;materials=4"
@@ -212,7 +212,7 @@ AI MODULES
/******************** OxygenIsToxicToHumans ********************/ /******************** OxygenIsToxicToHumans ********************/
/obj/item/weapon/aiModule/oxygen /obj/item/weapon/aiModule/oxygen
name = "'OxygenIsToxicToHumans' AI Module" name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'" desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
origin_tech = "programming=3;biotech=2;materials=4" origin_tech = "programming=3;biotech=2;materials=4"
@@ -249,7 +249,7 @@ AI MODULES
/****************** New Freeform ******************/ /****************** New Freeform ******************/
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE /obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "'Freeform' AI Module" name = "\improper 'Freeform' AI module"
var/newFreeFormLaw = "freeform" var/newFreeFormLaw = "freeform"
var/lawpos = 15 var/lawpos = 15
desc = "A 'freeform' AI module: '<freeform>'" desc = "A 'freeform' AI module: '<freeform>'"
@@ -284,7 +284,7 @@ AI MODULES
/******************** Reset ********************/ /******************** Reset ********************/
/obj/item/weapon/aiModule/reset /obj/item/weapon/aiModule/reset
name = "'Reset' AI Module" name = "\improper 'Reset' AI module"
var/targetName = "name" var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core three.'" desc = "A 'reset' AI module: 'Clears all laws except for the core three.'"
origin_tech = "programming=3;materials=4" origin_tech = "programming=3;materials=4"
@@ -301,7 +301,7 @@ AI MODULES
/******************** Purge ********************/ /******************** Purge ********************/
/obj/item/weapon/aiModule/purge // -- TLE /obj/item/weapon/aiModule/purge // -- TLE
name = "'Purge' AI Module" name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'" desc = "A 'purge' AI Module: 'Purges all laws.'"
origin_tech = "programming=3;materials=6" origin_tech = "programming=3;materials=6"
@@ -317,7 +317,7 @@ AI MODULES
/******************** Asimov ********************/ /******************** Asimov ********************/
/obj/item/weapon/aiModule/asimov // -- TLE /obj/item/weapon/aiModule/asimov // -- TLE
name = "'Asimov' Core AI Module" name = "\improper 'Asimov' core AI module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'" desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4" origin_tech = "programming=3;materials=4"
@@ -351,7 +351,7 @@ AI MODULES
/******************** Corporate ********************/ /******************** Corporate ********************/
/obj/item/weapon/aiModule/corp /obj/item/weapon/aiModule/corp
name = "'Corporate' Core AI Module" name = "\improper 'Corporate' core AI module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'" desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4" origin_tech = "programming=3;materials=4"
@@ -368,7 +368,7 @@ AI MODULES
/****************** P.A.L.A.D.I.N. **************/ /****************** P.A.L.A.D.I.N. **************/
/obj/item/weapon/aiModule/paladin // -- NEO /obj/item/weapon/aiModule/paladin // -- NEO
name = "'P.A.L.A.D.I.N.' Core AI Module" name = "\improper 'P.A.L.A.D.I.N.' core AI module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'" desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6" origin_tech = "programming=3;materials=6"
@@ -385,7 +385,7 @@ AI MODULES
/****************** T.Y.R.A.N.T. *****************/ /****************** T.Y.R.A.N.T. *****************/
/obj/item/weapon/aiModule/tyrant // -- Darem /obj/item/weapon/aiModule/tyrant // -- Darem
name = "'T.Y.R.A.N.T.' Core AI Module" name = "\improper 'T.Y.R.A.N.T.' core AI module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'" desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6;syndicate=2" origin_tech = "programming=3;materials=6;syndicate=2"
@@ -402,7 +402,7 @@ AI MODULES
/******************** Freeform Core ******************/ /******************** Freeform Core ******************/
/obj/item/weapon/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE /obj/item/weapon/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
name = "'Freeform' Core AI Module" name = "\improper 'Freeform' core AI module"
var/newFreeFormLaw = "" var/newFreeFormLaw = ""
desc = "A 'freeform' Core AI module: '<freeform>'" desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=3;materials=6" origin_tech = "programming=3;materials=6"
@@ -427,7 +427,7 @@ AI MODULES
..() ..()
/obj/item/weapon/aiModule/syndicate // Slightly more dynamic freeform module -- TLE /obj/item/weapon/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
name = "Hacked AI Module" name = "hacked AI module"
var/newFreeFormLaw = "" var/newFreeFormLaw = ""
desc = "A hacked AI law module: '<freeform>'" desc = "A hacked AI law module: '<freeform>'"
origin_tech = "programming=3;materials=6;syndicate=7" origin_tech = "programming=3;materials=6;syndicate=7"
@@ -459,7 +459,7 @@ AI MODULES
/******************** Robocop ********************/ /******************** Robocop ********************/
/obj/item/weapon/aiModule/robocop // -- TLE /obj/item/weapon/aiModule/robocop // -- TLE
name = "'Robocop' Core AI Module" name = "\improper 'Robocop' core AI module"
desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'" desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4" origin_tech = "programming=4"
@@ -476,7 +476,7 @@ AI MODULES
/******************** Antimov ********************/ /******************** Antimov ********************/
/obj/item/weapon/aiModule/antimov // -- TLE /obj/item/weapon/aiModule/antimov // -- TLE
name = "'Antimov' Core AI Module" name = "\improper 'Antimov' core AI module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'" desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4" origin_tech = "programming=4"

View File

@@ -35,14 +35,14 @@
set src in usr set src in usr
if (t) if (t)
src.name = text("Data Disk- '[]'", t) src.name = text("data disk- '[]'", t)
else else
src.name = "Data Disk" src.name = "data disk"
src.add_fingerprint(usr) src.add_fingerprint(usr)
return return
/obj/item/weapon/card/data/clown /obj/item/weapon/card/data/clown
name = "coordinates to clown planet" name = "\proper the coordinates to clown planet"
icon_state = "data" icon_state = "data"
item_state = "card-id" item_state = "card-id"
layer = 3 layer = 3

View File

@@ -157,14 +157,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src) var/turf/location = get_turf(src)
smoketime-- smoketime--
if(smoketime < 1) if(smoketime < 1)
new type_butt(location) die()
processing_objects.Remove(src)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
M.u_equip(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
del(src)
return return
if(location) if(location)
location.hotspot_expose(700, 5) location.hotspot_expose(700, 5)
@@ -182,19 +175,27 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob) /obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
if(lit == 1) if(lit == 1)
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>") user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
var/turf/T = get_turf(src) die()
new type_butt(T)
processing_objects.Remove(src)
del(src)
return ..() return ..()
/obj/item/clothing/mask/cigarette/proc/die()
var/turf/T = get_turf(src)
var/obj/item/butt = new type_butt(T)
transfer_fingerprints_to(butt)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
M.u_equip(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
processing_objects.Remove(src)
del(src)
//////////// ////////////
// CIGARS // // CIGARS //
//////////// ////////////
/obj/item/clothing/mask/cigarette/cigar /obj/item/clothing/mask/cigarette/cigar
name = "Premium Cigar" name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!" desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigaroff" icon_state = "cigaroff"
icon_on = "cigaron" icon_on = "cigaron"
@@ -206,14 +207,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
chem_volume = 20 chem_volume = 20
/obj/item/clothing/mask/cigarette/cigar/cohiba /obj/item/clothing/mask/cigarette/cigar/cohiba
name = "Cohiba Robusto Cigar" name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar." desc = "There's little more you could want from a cigar."
icon_state = "cigar2off" icon_state = "cigar2off"
icon_on = "cigar2on" icon_on = "cigar2on"
icon_off = "cigar2off" icon_off = "cigar2off"
/obj/item/clothing/mask/cigarette/cigar/havana /obj/item/clothing/mask/cigarette/cigar/havana
name = "Premium Havanian Cigar" name = "premium Havanian cigar"
desc = "A cigar fit for only the best for the best." desc = "A cigar fit for only the best for the best."
icon_state = "cigar2off" icon_state = "cigar2off"
icon_on = "cigar2on" icon_on = "cigar2on"
@@ -229,6 +230,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = 1 w_class = 1
throwforce = 1 throwforce = 1
/obj/item/weapon/cigbutt/New()
..()
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
transform = turn(transform,rand(0,360))
/obj/item/weapon/cigbutt/cigarbutt /obj/item/weapon/cigbutt/cigarbutt
name = "cigar butt" name = "cigar butt"
desc = "A manky old cigar butt." desc = "A manky old cigar butt."
@@ -330,7 +337,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/lit = 0 var/lit = 0
/obj/item/weapon/lighter/zippo /obj/item/weapon/lighter/zippo
name = "Zippo lighter" name = "\improper Zippo lighter"
desc = "The zippo." desc = "The zippo."
icon_state = "zippo" icon_state = "zippo"
item_state = "zippo" item_state = "zippo"

View File

@@ -1,4 +1,5 @@
/obj/item/weapon/lipstick /obj/item/weapon/lipstick
gender = PLURAL
name = "red lipstick" name = "red lipstick"
desc = "A generic brand of lipstick." desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'

View File

@@ -3,11 +3,8 @@
desc = "This injects the person with DNA." desc = "This injects the person with DNA."
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
icon_state = "dnainjector" icon_state = "dnainjector"
var/dnatype = null var/block=0
var/list/dna = null var/datum/dna2/record/buf=null
var/block = null
var/owner = null
var/ue = null
var/s_time = 10.0 var/s_time = 10.0
throw_speed = 1 throw_speed = 1
throw_range = 5 throw_range = 5
@@ -17,57 +14,76 @@
var/is_bullet = 0 var/is_bullet = 0
var/inuse = 0 var/inuse = 0
// USE ONLY IN PREMADE SYRINGES. WILL NOT WORK OTHERWISE.
var/datatype=0
var/value=0
/obj/item/weapon/dnainjector/New()
if(datatype && block)
buf=new
buf.dna=new
buf.types = datatype
buf.dna.ResetSE()
//testing("[name]: DNA2 SE blocks prior to SetValue: [english_list(buf.dna.SE)]")
SetValue(src.value)
//testing("[name]: DNA2 SE blocks after SetValue: [english_list(buf.dna.SE)]")
/obj/item/weapon/dnainjector/attack_paw(mob/user as mob) /obj/item/weapon/dnainjector/attack_paw(mob/user as mob)
return attack_hand(user) return attack_hand(user)
/obj/item/weapon/dnainjector/proc/GetRealBlock(var/selblock)
if(selblock==0)
return block
else
return selblock
/obj/item/weapon/dnainjector/proc/GetState(var/selblock=0) /obj/item/weapon/dnainjector/proc/GetState(var/selblock=0)
var/real_block var/real_block=GetRealBlock(selblock)
if(!selblock) if(buf.types&DNA2_BUF_SE)
real_block=block return buf.dna.GetSEState(real_block)
selblock=1
else else
real_block=selblock return buf.dna.GetUIState(real_block)
var/list/BOUNDS = GetDNABounds(real_block)
return dna[selblock] > BOUNDS[DNA_ON_LOWERBOUND]
/obj/item/weapon/dnainjector/proc/SetState(var/on, var/selblock=0) /obj/item/weapon/dnainjector/proc/SetState(var/on, var/selblock=0)
var/real_block var/real_block=GetRealBlock(selblock)
if(!selblock) if(buf.types&DNA2_BUF_SE)
real_block=block return buf.dna.SetSEState(real_block,on)
selblock=1
else else
real_block=selblock return buf.dna.SetUIState(real_block,on)
var/list/BOUNDS=GetDNABounds(real_block)
var/val
if(on)
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
else
val=rand(BOUNDS[DNA_OFF_LOWERBOUND],BOUNDS[DNA_OFF_UPPERBOUND])
dna[selblock]=val
/obj/item/weapon/dnainjector/proc/GetValue(var/block=1) /obj/item/weapon/dnainjector/proc/GetValue(var/selblock=0)
return dna[block] var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.GetSEValue(real_block)
else
return buf.dna.GetUIValue(real_block)
/obj/item/weapon/dnainjector/proc/SetValue(var/val,var/selblock=0)
var/real_block=GetRealBlock(selblock)
if(buf.types&DNA2_BUF_SE)
return buf.dna.SetSEValue(real_block,val)
else
return buf.dna.SetUIValue(real_block,val)
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob) /obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living)) if(istype(M,/mob/living))
M.radiation += rand(5,20) M.radiation += rand(5,20)
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
if (dnatype == "ui") if (buf.types & DNA2_BUF_UI)
if (!block) //isolated block? if (!block) //isolated block?
M.UpdateAppearance(dna) M.UpdateAppearance(buf.dna)
if (ue) //unique enzymes? yes if (buf.types & DNA2_BUF_UE) //unique enzymes? yes
M.real_name = ue M.real_name = buf.dna.real_name
M.name = ue M.name = buf.dna.real_name
uses-- uses--
else else
M.dna.SetUIValue(block,src.GetValue()) M.dna.SetUIValue(block,src.GetValue())
M.UpdateAppearance() M.UpdateAppearance()
uses-- uses--
if (dnatype == "se") if (buf.types & DNA2_BUF_SE)
if (!block) //isolated block? if (!block) //isolated block?
M.dna.SE = dna M.dna.SE = buf.dna.SE
M.dna.UpdateSE() M.dna.UpdateSE()
else else
M.dna.SetSEValue(block,src.GetValue()) M.dna.SetSEValue(block,src.GetValue())
@@ -107,12 +123,21 @@
spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
inuse = 0 inuse = 0
M.requests += O M.requests += O
if (dnatype == "se") if (buf.types & DNA2_BUF_SE)
// So you're checking for 14, and yet MONKEYBLOCK is 27 in globals.dm, if(block)// Isolated injector
// and domutcheck checks MONKEYBLOCK...? wat. - N3X testing("Isolated block [block] injector with contents: [GetValue()]")
//if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human)) if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
else
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
else
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) ) if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) )
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
else else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]") // message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_attack("[key_name(user)] injected [key_name(M)] with the [name]") log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
@@ -132,14 +157,23 @@
if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))) if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
user << "\red Apparently it didn't work." user << "\red Apparently it didn't work."
return return
if (dnatype == "se")
// And again... ? if (buf.types & DNA2_BUF_SE)
//if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human)) if(block)// Isolated injector
testing("Isolated block [block] injector with contents: [GetValue()]")
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
else
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
else
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human)) if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)") message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)") log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
else else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]") // message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_game("[key_name(user)] injected [key_name(M)] with the [name]") log_game("[key_name(user)] injected [key_name(M)] with the [name]")
else else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]") // message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
@@ -165,460 +199,462 @@
/obj/item/weapon/dnainjector/hulkmut /obj/item/weapon/dnainjector/hulkmut
name = "DNA-Injector (Hulk)" name = "DNA-Injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition." desc = "This will make you big and strong, but give you a bad skin condition."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = HULKBLOCK block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk /obj/item/weapon/dnainjector/antihulk
name = "DNA-Injector (Anti-Hulk)" name = "DNA-Injector (Anti-Hulk)"
desc = "Cures green skin." desc = "Cures green skin."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = HULKBLOCK block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/xraymut /obj/item/weapon/dnainjector/xraymut
name = "DNA-Injector (Xray)" name = "DNA-Injector (Xray)"
desc = "Finally you can see what the Captain does." desc = "Finally you can see what the Captain does."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 8 //block = 8
New() New()
..()
block = XRAYBLOCK block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray /obj/item/weapon/dnainjector/antixray
name = "DNA-Injector (Anti-Xray)" name = "DNA-Injector (Anti-Xray)"
desc = "It will make you see harder." desc = "It will make you see harder."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 8 //block = 8
New() New()
..()
block = XRAYBLOCK block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/firemut /obj/item/weapon/dnainjector/firemut
name = "DNA-Injector (Fire)" name = "DNA-Injector (Fire)"
desc = "Gives you fire." desc = "Gives you fire."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 10 //block = 10
New() New()
..()
block = FIREBLOCK block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire /obj/item/weapon/dnainjector/antifire
name = "DNA-Injector (Anti-Fire)" name = "DNA-Injector (Anti-Fire)"
desc = "Cures fire." desc = "Cures fire."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 10 //block = 10
New() New()
..()
block = FIREBLOCK block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/telemut /obj/item/weapon/dnainjector/telemut
name = "DNA-Injector (Tele.)" name = "DNA-Injector (Tele.)"
desc = "Super brain man!" desc = "Super brain man!"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 12 //block = 12
New() New()
..()
block = TELEBLOCK block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele /obj/item/weapon/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)" name = "DNA-Injector (Anti-Tele.)"
desc = "Will make you not able to control your mind." desc = "Will make you not able to control your mind."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 12 //block = 12
New() New()
..()
block = TELEBLOCK block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/nobreath /obj/item/weapon/dnainjector/nobreath
name = "DNA-Injector (No Breath)" name = "DNA-Injector (No Breath)"
desc = "Hold your breath and count to infinity." desc = "Hold your breath and count to infinity."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = NOBREATHBLOCK block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath /obj/item/weapon/dnainjector/antinobreath
name = "DNA-Injector (Anti-No Breath)" name = "DNA-Injector (Anti-No Breath)"
desc = "Hold your breath and count to 100." desc = "Hold your breath and count to 100."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = NOBREATHBLOCK block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/remoteview /obj/item/weapon/dnainjector/remoteview
name = "DNA-Injector (Remote View)" name = "DNA-Injector (Remote View)"
desc = "Stare into the distance for a reason." desc = "Stare into the distance for a reason."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = REMOTEVIEWBLOCK block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview /obj/item/weapon/dnainjector/antiremoteview
name = "DNA-Injector (Anti-Remote View)" name = "DNA-Injector (Anti-Remote View)"
desc = "Cures green skin." desc = "Cures green skin."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = REMOTEVIEWBLOCK block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/regenerate /obj/item/weapon/dnainjector/regenerate
name = "DNA-Injector (Regeneration)" name = "DNA-Injector (Regeneration)"
desc = "Healthy but hungry." desc = "Healthy but hungry."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = REGENERATEBLOCK block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate /obj/item/weapon/dnainjector/antiregenerate
name = "DNA-Injector (Anti-Regeneration)" name = "DNA-Injector (Anti-Regeneration)"
desc = "Sickly but sated." desc = "Sickly but sated."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = REGENERATEBLOCK block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/runfast /obj/item/weapon/dnainjector/runfast
name = "DNA-Injector (Increase Run)" name = "DNA-Injector (Increase Run)"
desc = "Running Man." desc = "Running Man."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = INCREASERUNBLOCK block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast /obj/item/weapon/dnainjector/antirunfast
name = "DNA-Injector (Anti-Increase Run)" name = "DNA-Injector (Anti-Increase Run)"
desc = "Walking Man." desc = "Walking Man."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = INCREASERUNBLOCK block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/morph /obj/item/weapon/dnainjector/morph
name = "DNA-Injector (Morph)" name = "DNA-Injector (Morph)"
desc = "A total makeover." desc = "A total makeover."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = MORPHBLOCK block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/antimorph /obj/item/weapon/dnainjector/antimorph
name = "DNA-Injector (Anti-Morph)" name = "DNA-Injector (Anti-Morph)"
desc = "Cures identity crisis." desc = "Cures identity crisis."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = MORPHBLOCK block = MORPHBLOCK
/* ..()
/* No COLDBLOCK on bay
/obj/item/weapon/dnainjector/cold /obj/item/weapon/dnainjector/cold
name = "DNA-Injector (Cold)" name = "DNA-Injector (Cold)"
desc = "Feels a bit chilly." desc = "Feels a bit chilly."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = COLDBLOCK block = COLDBLOCK
..()
/obj/item/weapon/dnainjector/anticold /obj/item/weapon/dnainjector/anticold
name = "DNA-Injector (Anti-Cold)" name = "DNA-Injector (Anti-Cold)"
desc = "Feels room-temperature." desc = "Feels room-temperature."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = COLDBLOCK block = COLDBLOCK
..()
*/ */
/obj/item/weapon/dnainjector/noprints /obj/item/weapon/dnainjector/noprints
name = "DNA-Injector (No Prints)" name = "DNA-Injector (No Prints)"
desc = "Better than a pair of budget insulated gloves." desc = "Better than a pair of budget insulated gloves."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = NOPRINTSBLOCK block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints /obj/item/weapon/dnainjector/antinoprints
name = "DNA-Injector (Anti-No Prints)" name = "DNA-Injector (Anti-No Prints)"
desc = "Not quite as good as a pair of budget insulated gloves." desc = "Not quite as good as a pair of budget insulated gloves."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = NOPRINTSBLOCK block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/insulation /obj/item/weapon/dnainjector/insulation
name = "DNA-Injector (Shock Immunity)" name = "DNA-Injector (Shock Immunity)"
desc = "Better than a pair of real insulated gloves." desc = "Better than a pair of real insulated gloves."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = SHOCKIMMUNITYBLOCK block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation /obj/item/weapon/dnainjector/antiinsulation
name = "DNA-Injector (Anti-Shock Immunity)" name = "DNA-Injector (Anti-Shock Immunity)"
desc = "Not quite as good as a pair of real insulated gloves." desc = "Not quite as good as a pair of real insulated gloves."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = SHOCKIMMUNITYBLOCK block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/midgit /obj/item/weapon/dnainjector/midgit
name = "DNA-Injector (Small Size)" name = "DNA-Injector (Small Size)"
desc = "Makes you shrink." desc = "Makes you shrink."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = SMALLSIZEBLOCK block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit /obj/item/weapon/dnainjector/antimidgit
name = "DNA-Injector (Anti-Small Size)" name = "DNA-Injector (Anti-Small Size)"
desc = "Makes you grow. But not too much." desc = "Makes you grow. But not too much."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = SMALLSIZEBLOCK block = SMALLSIZEBLOCK
..()
///////////////////////////////////// /////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses /obj/item/weapon/dnainjector/antiglasses
name = "DNA-Injector (Anti-Glasses)" name = "DNA-Injector (Anti-Glasses)"
desc = "Toss away those glasses!" desc = "Toss away those glasses!"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 1 //block = 1
New() New()
..()
block = GLASSESBLOCK block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut /obj/item/weapon/dnainjector/glassesmut
name = "DNA-Injector (Glasses)" name = "DNA-Injector (Glasses)"
desc = "Will make you need dorkish glasses." desc = "Will make you need dorkish glasses."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 1 //block = 1
New() New()
..()
block = GLASSESBLOCK block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/epimut /obj/item/weapon/dnainjector/epimut
name = "DNA-Injector (Epi.)" name = "DNA-Injector (Epi.)"
desc = "Shake shake shake the room!" desc = "Shake shake shake the room!"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 3 //block = 3
New() New()
..()
block = HEADACHEBLOCK block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/antiepi /obj/item/weapon/dnainjector/antiepi
name = "DNA-Injector (Anti-Epi.)" name = "DNA-Injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room." desc = "Will fix you up from shaking the room."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 3 //block = 3
New() New()
..()
block = HEADACHEBLOCK block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/anticough /obj/item/weapon/dnainjector/anticough
name = "DNA-Injector (Anti-Cough)" name = "DNA-Injector (Anti-Cough)"
desc = "Will stop that awful noise." desc = "Will stop that awful noise."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 5 //block = 5
New() New()
..()
block = COUGHBLOCK block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut /obj/item/weapon/dnainjector/coughmut
name = "DNA-Injector (Cough)" name = "DNA-Injector (Cough)"
desc = "Will bring forth a sound of horror from your throat." desc = "Will bring forth a sound of horror from your throat."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 5 //block = 5
New() New()
..()
block = COUGHBLOCK block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut /obj/item/weapon/dnainjector/clumsymut
name = "DNA-Injector (Clumsy)" name = "DNA-Injector (Clumsy)"
desc = "Makes clumsy minions." desc = "Makes clumsy minions."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 6 //block = 6
New() New()
..()
block = CLUMSYBLOCK block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy /obj/item/weapon/dnainjector/anticlumsy
name = "DNA-Injector (Anti-Clumy)" name = "DNA-Injector (Anti-Clumy)"
desc = "Cleans up confusion." desc = "Cleans up confusion."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 6 //block = 6
New() New()
..()
block = CLUMSYBLOCK block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/antitour /obj/item/weapon/dnainjector/antitour
name = "DNA-Injector (Anti-Tour.)" name = "DNA-Injector (Anti-Tour.)"
desc = "Will cure tourrets." desc = "Will cure tourrets."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 7 //block = 7
New() New()
..()
block = TWITCHBLOCK block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut /obj/item/weapon/dnainjector/tourmut
name = "DNA-Injector (Tour.)" name = "DNA-Injector (Tour.)"
desc = "Gives you a nasty case off tourrets." desc = "Gives you a nasty case off tourrets."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 7 //block = 7
New() New()
..()
block = TWITCHBLOCK block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut /obj/item/weapon/dnainjector/stuttmut
name = "DNA-Injector (Stutt.)" name = "DNA-Injector (Stutt.)"
desc = "Makes you s-s-stuttterrr" desc = "Makes you s-s-stuttterrr"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 9 //block = 9
New() New()
..()
block = NERVOUSBLOCK block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/antistutt /obj/item/weapon/dnainjector/antistutt
name = "DNA-Injector (Anti-Stutt.)" name = "DNA-Injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment." desc = "Fixes that speaking impairment."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 9 //block = 9
New() New()
..()
block = NERVOUSBLOCK block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/blindmut /obj/item/weapon/dnainjector/blindmut
name = "DNA-Injector (Blind)" name = "DNA-Injector (Blind)"
desc = "Makes you not see anything." desc = "Makes you not see anything."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 11 //block = 11
New() New()
..()
block = BLINDBLOCK block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind /obj/item/weapon/dnainjector/antiblind
name = "DNA-Injector (Anti-Blind)" name = "DNA-Injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!" desc = "ITS A MIRACLE!!!"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 11 //block = 11
New() New()
..()
block = BLINDBLOCK block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/deafmut /obj/item/weapon/dnainjector/deafmut
name = "DNA-Injector (Deaf)" name = "DNA-Injector (Deaf)"
desc = "Sorry, what did you say?" desc = "Sorry, what did you say?"
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 13 //block = 13
New() New()
..()
block = DEAFBLOCK block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf /obj/item/weapon/dnainjector/antideaf
name = "DNA-Injector (Anti-Deaf)" name = "DNA-Injector (Anti-Deaf)"
desc = "Will make you hear once more." desc = "Will make you hear once more."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 13 //block = 13
New() New()
..()
block = DEAFBLOCK block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/hallucination /obj/item/weapon/dnainjector/hallucination
name = "DNA-Injector (Halluctination)" name = "DNA-Injector (Halluctination)"
desc = "What you see isn't always what you get." desc = "What you see isn't always what you get."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 2 //block = 2
New() New()
..()
block = HALLUCINATIONBLOCK block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination /obj/item/weapon/dnainjector/antihallucination
name = "DNA-Injector (Anti-Hallucination)" name = "DNA-Injector (Anti-Hallucination)"
desc = "What you see is what you get." desc = "What you see is what you get."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 2 //block = 2
New() New()
..()
block = HALLUCINATIONBLOCK block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/h2m /obj/item/weapon/dnainjector/h2m
name = "DNA-Injector (Human > Monkey)" name = "DNA-Injector (Human > Monkey)"
desc = "Will make you a flea bag." desc = "Will make you a flea bag."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(4090) value = 0xFFF
//block = 14 //block = 14
New() New()
..()
block = MONKEYBLOCK block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h /obj/item/weapon/dnainjector/m2h
name = "DNA-Injector (Monkey > Human)" name = "DNA-Injector (Monkey > Human)"
desc = "Will make you...less hairy." desc = "Will make you...less hairy."
dnatype = "se" datatype = DNA2_BUF_SE
dna = list(1) value = 0x001
//block = 14 //block = 14
New() New()
..()
block = MONKEYBLOCK block = MONKEYBLOCK
..()

View File

@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/machinery/implantchair /obj/machinery/implantchair
name = "Loyalty Implanter" name = "loyalty implanter"
desc = "Used to implant occupants with loyalty implants." desc = "Used to implant occupants with loyalty implants."
icon = 'icons/obj/machines/implantchair.dmi' icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair" icon_state = "implantchair"

View File

@@ -179,7 +179,7 @@
* Bucher's cleaver * Bucher's cleaver
*/ */
/obj/item/weapon/butch /obj/item/weapon/butch
name = "butcher's Cleaver" name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi' icon = 'icons/obj/kitchen.dmi'
icon_state = "butch" icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products." desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."

View File

@@ -68,7 +68,8 @@ var/global/list/cached_icons = list()
paint_type = "remover" paint_type = "remover"
/* /*
/obj/item/weapon/paint /obj/item/weapon/paint
name = "Paint Can" gender= PLURAL
name = "paint"
desc = "Used to recolor floors and walls. Can not be removed by the janitor." desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral" icon_state = "paint_neutral"
@@ -77,43 +78,44 @@ var/global/list/cached_icons = list()
w_class = 3.0 w_class = 3.0
/obj/item/weapon/paint/red /obj/item/weapon/paint/red
name = "Red paint" name = "red paint"
color = "FF0000" color = "FF0000"
icon_state = "paint_red" icon_state = "paint_red"
/obj/item/weapon/paint/green /obj/item/weapon/paint/green
name = "Green paint" name = "green paint"
color = "00FF00" color = "00FF00"
icon_state = "paint_green" icon_state = "paint_green"
/obj/item/weapon/paint/blue /obj/item/weapon/paint/blue
name = "Blue paint" name = "blue paint"
color = "0000FF" color = "0000FF"
icon_state = "paint_blue" icon_state = "paint_blue"
/obj/item/weapon/paint/yellow /obj/item/weapon/paint/yellow
name = "Yellow paint" name = "yellow paint"
color = "FFFF00" color = "FFFF00"
icon_state = "paint_yellow" icon_state = "paint_yellow"
/obj/item/weapon/paint/violet /obj/item/weapon/paint/violet
name = "Violet paint" name = "violet paint"
color = "FF00FF" color = "FF00FF"
icon_state = "paint_violet" icon_state = "paint_violet"
/obj/item/weapon/paint/black /obj/item/weapon/paint/black
name = "Black paint" name = "black paint"
color = "333333" color = "333333"
icon_state = "paint_black" icon_state = "paint_black"
/obj/item/weapon/paint/white /obj/item/weapon/paint/white
name = "White paint" name = "white paint"
color = "FFFFFF" color = "FFFFFF"
icon_state = "paint_white" icon_state = "paint_white"
/obj/item/weapon/paint/anycolor /obj/item/weapon/paint/anycolor
name = "Any color" gender= PLURAL
name = "any color"
icon_state = "paint_neutral" icon_state = "paint_neutral"
attack_self(mob/user as mob) attack_self(mob/user as mob)
@@ -156,7 +158,8 @@ var/global/list/cached_icons = list()
return return
/obj/item/weapon/paint/paint_remover /obj/item/weapon/paint/paint_remover
name = "Paint remover" gender = PLURAL
name = "paint remover"
icon_state = "paint_neutral" icon_state = "paint_neutral"
afterattack(turf/target, mob/user as mob) afterattack(turf/target, mob/user as mob)

View File

@@ -36,7 +36,7 @@
charge = 0 charge = 0
/obj/item/weapon/cell/secborg /obj/item/weapon/cell/secborg
name = "\improper Security borg rechargable D battery" name = "security borg rechargable D battery"
origin_tech = "powerstorage=0" origin_tech = "powerstorage=0"
maxcharge = 600 //600 max charge / 100 charge per shot = six shots maxcharge = 600 //600 max charge / 100 charge per shot = six shots
g_amt = 40 g_amt = 40

View File

@@ -23,7 +23,7 @@
*/ */
/obj/item/weapon/storage/backpack/holding /obj/item/weapon/storage/backpack/holding
name = "Bag of Holding" name = "bag of holding"
desc = "A backpack that opens into a localized pocket of Blue Space." desc = "A backpack that opens into a localized pocket of Blue Space."
origin_tech = "bluespace=4" origin_tech = "bluespace=4"
icon_state = "holdingpack" icon_state = "holdingpack"
@@ -84,7 +84,7 @@
icon_state = "cultpack" icon_state = "cultpack"
/obj/item/weapon/storage/backpack/clown /obj/item/weapon/storage/backpack/clown
name = "Giggles Von Honkerton" name = "Giggles von Honkerton"
desc = "It's a backpack made by Honk! Co." desc = "It's a backpack made by Honk! Co."
icon_state = "clownpack" icon_state = "clownpack"
item_state = "clownpack" item_state = "clownpack"

View File

@@ -16,8 +16,8 @@
/obj/item/weapon/storage/bible/booze/New() /obj/item/weapon/storage/bible/booze/New()
..() ..()
new /obj/item/weapon/reagent_containers/food/drinks/beer(src) new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/beer(src) new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src)

View File

@@ -59,7 +59,7 @@
new /obj/item/clothing/gloves/latex(src) new /obj/item/clothing/gloves/latex(src)
/obj/item/weapon/storage/box/masks /obj/item/weapon/storage/box/masks
name = "sterile masks" name = "box of sterile masks"
desc = "This box contains masks of sterility." desc = "This box contains masks of sterility."
icon_state = "sterile" icon_state = "sterile"
@@ -75,7 +75,7 @@
/obj/item/weapon/storage/box/syringes /obj/item/weapon/storage/box/syringes
name = "syringes" name = "box of syringes"
desc = "A box full of syringes." desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box" desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe" icon_state = "syringe"
@@ -91,7 +91,7 @@
new /obj/item/weapon/reagent_containers/syringe( src ) new /obj/item/weapon/reagent_containers/syringe( src )
/obj/item/weapon/storage/box/beakers /obj/item/weapon/storage/box/beakers
name = "beaker box" name = "box of beakers"
icon_state = "beaker" icon_state = "beaker"
New() New()
@@ -105,7 +105,7 @@
new /obj/item/weapon/reagent_containers/glass/beaker( src ) new /obj/item/weapon/reagent_containers/glass/beaker( src )
/obj/item/weapon/storage/box/injectors /obj/item/weapon/storage/box/injectors
name = "\improper DNA injectors" name = "box of DNA injectors"
desc = "This box contains injectors it seems." desc = "This box contains injectors it seems."
New() New()
@@ -150,7 +150,7 @@
new /obj/item/weapon/grenade/flashbang(src) new /obj/item/weapon/grenade/flashbang(src)
/obj/item/weapon/storage/box/emps /obj/item/weapon/storage/box/emps
name = "emp grenades" name = "box of emp grenades"
desc = "A box with 5 emp grenades." desc = "A box with 5 emp grenades."
icon_state = "flashbang" icon_state = "flashbang"
@@ -164,7 +164,7 @@
/obj/item/weapon/storage/box/trackimp /obj/item/weapon/storage/box/trackimp
name = "tracking implant kit" name = "boxed tracking implant kit"
desc = "Box full of scum-bag tracking utensils." desc = "Box full of scum-bag tracking utensils."
icon_state = "implant" icon_state = "implant"
@@ -179,7 +179,7 @@
new /obj/item/weapon/locator(src) new /obj/item/weapon/locator(src)
/obj/item/weapon/storage/box/chemimp /obj/item/weapon/storage/box/chemimp
name = "chemical implant kit" name = "boxed chemical implant kit"
desc = "Box of stuff used to implant chemicals." desc = "Box of stuff used to implant chemicals."
icon_state = "implant" icon_state = "implant"
@@ -194,8 +194,9 @@
new /obj/item/weapon/implantpad(src) new /obj/item/weapon/implantpad(src)
/obj/item/weapon/storage/box/rxglasses /obj/item/weapon/storage/box/rxglasses
name = "prescription glasses" name = "box of prescription glasses"
desc = "This box contains nerd glasses." desc = "This box contains nerd glasses."
icon_state = "glasses" icon_state = "glasses"
@@ -319,7 +320,7 @@
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src)
/obj/item/weapon/storage/box/ids /obj/item/weapon/storage/box/ids
name = "spare IDs" name = "box of spare IDs"
desc = "Has so many empty IDs." desc = "Has so many empty IDs."
icon_state = "id" icon_state = "id"
@@ -333,8 +334,9 @@
new /obj/item/weapon/card/id(src) new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src) new /obj/item/weapon/card/id(src)
/obj/item/weapon/storage/box/seccarts /obj/item/weapon/storage/box/seccarts
name = "Spare R.O.B.U.S.T. Cartridges" name = "box of spare R.O.B.U.S.T. Cartridges"
desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security."
icon_state = "pda" icon_state = "pda"
@@ -350,7 +352,7 @@
/obj/item/weapon/storage/box/handcuffs /obj/item/weapon/storage/box/handcuffs
name = "spare handcuffs" name = "box of spare handcuffs"
desc = "A box full of handcuffs." desc = "A box full of handcuffs."
icon_state = "handcuff" icon_state = "handcuff"
@@ -364,8 +366,9 @@
new /obj/item/weapon/handcuffs(src) new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src) new /obj/item/weapon/handcuffs(src)
/obj/item/weapon/storage/box/mousetraps /obj/item/weapon/storage/box/mousetraps
name = "box of Pest-B-Gon Mousetraps" name = "box of Pest-B-Gon mousetraps"
desc = "<B><FONT=red>WARNING:</FONT></B> <I>Keep out of reach of children</I>." desc = "<B><FONT=red>WARNING:</FONT></B> <I>Keep out of reach of children</I>."
icon_state = "mousetraps" icon_state = "mousetraps"
@@ -439,7 +442,7 @@
new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
/obj/item/weapon/storage/box/lights /obj/item/weapon/storage/box/lights
name = "replacement bulbs" name = "box of replacement bulbs"
icon = 'icons/obj/storage.dmi' icon = 'icons/obj/storage.dmi'
icon_state = "light" icon_state = "light"
desc = "This box is shaped on the inside so that only light tubes and bulbs fit." desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
@@ -456,7 +459,7 @@
new /obj/item/weapon/light/bulb(src) new /obj/item/weapon/light/bulb(src)
/obj/item/weapon/storage/box/lights/tubes /obj/item/weapon/storage/box/lights/tubes
name = "replacement tubes" name = "box of replacement tubes"
icon_state = "lighttube" icon_state = "lighttube"
/obj/item/weapon/storage/box/lights/tubes/New() /obj/item/weapon/storage/box/lights/tubes/New()
@@ -465,7 +468,7 @@
new /obj/item/weapon/light/tube(src) new /obj/item/weapon/light/tube(src)
/obj/item/weapon/storage/box/lights/mixed /obj/item/weapon/storage/box/lights/mixed
name = "replacement lights" name = "box of replacement lights"
icon_state = "lightmixed" icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/mixed/New() /obj/item/weapon/storage/box/lights/mixed/New()

View File

@@ -81,7 +81,7 @@
*/ */
/obj/item/weapon/storage/fancy/candle_box /obj/item/weapon/storage/fancy/candle_box
name = "Candle pack" name = "candle pack"
desc = "A pack of red candles." desc = "A pack of red candles."
icon = 'icons/obj/candle.dmi' icon = 'icons/obj/candle.dmi'
icon_state = "candlebox5" icon_state = "candlebox5"

View File

@@ -149,7 +149,7 @@
return return
/obj/item/weapon/storage/pill_bottle/kelotane /obj/item/weapon/storage/pill_bottle/kelotane
name = "Pill bottle (kelotane)" name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns." desc = "Contains pills used to treat burns."
New() New()
@@ -163,7 +163,7 @@
new /obj/item/weapon/reagent_containers/pill/kelotane( src ) new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/antitox /obj/item/weapon/storage/pill_bottle/antitox
name = "Pill bottle (Anti-toxin)" name = "bottle of anti-toxin pills"
desc = "Contains pills used to counter toxins." desc = "Contains pills used to counter toxins."
New() New()
@@ -177,7 +177,7 @@
new /obj/item/weapon/reagent_containers/pill/antitox( src ) new /obj/item/weapon/reagent_containers/pill/antitox( src )
/obj/item/weapon/storage/pill_bottle/inaprovaline /obj/item/weapon/storage/pill_bottle/inaprovaline
name = "Pill bottle (inaprovaline)" name = "bottle of inaprovaline pills"
desc = "Contains pills used to stabilize patients." desc = "Contains pills used to stabilize patients."
New() New()

View File

@@ -67,7 +67,7 @@
/obj/item/weapon/storage/lockbox/loyalty /obj/item/weapon/storage/lockbox/loyalty
name = "Lockbox (Loyalty Implants)" name = "lockbox of loyalty implants"
req_access = list(access_security) req_access = list(access_security)
New() New()
@@ -79,7 +79,7 @@
/obj/item/weapon/storage/lockbox/clusterbang /obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox (clusterbang)" name = "lockbox of clusterbangs"
desc = "You have a bad feeling about opening this." desc = "You have a bad feeling about opening this."
req_access = list(access_security) req_access = list(access_security)

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