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

@@ -204,7 +204,7 @@
var/obj/structure/closet/crate/freezer/C = new(src.loc)
var/num = rand(2,6)
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/dry_ramen, \
/obj/item/weapon/reagent_containers/food/snacks/candiedapple, \

View File

@@ -17,35 +17,34 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
return
if (istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if(user)
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.u_equip(W)
W.loc = src
if (istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
cig.smoketime = 0
processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
del(cig)
else if (cig.lit == 0)
if(istype(cig, /obj/item/weapon/match))
user << "You place [cig] in [src] without even lighting it. Why would you do that?"
else
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
else if (cig.lit == -1)
src.visible_message("[user] places [cig] in [src].")
user.update_inv_l_hand()
user.update_inv_r_hand()
add_fingerprint(user)
if (contents.len == max_butts)
icon_state = icon_full
desc = empty_desc + " It's stuffed full."
else if (contents.len > max_butts/2)
icon_state = icon_half
desc = empty_desc + " It's half-filled."
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
src.visible_message("[user] places [W] in [src].")
user.update_inv_l_hand()
user.update_inv_r_hand()
add_fingerprint(user)
if (contents.len == max_butts)
icon_state = icon_full
desc = empty_desc + " It's stuffed full."
else if (contents.len > max_butts/2)
icon_state = icon_half
desc = empty_desc + " It's half-filled."
else
health = max(0,health - W.force)
user << "You hit [src] with [W]."
@@ -62,7 +61,6 @@
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O
O.loc = src.loc
icon_state = icon_empty
return ..()
@@ -70,7 +68,6 @@
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
contents -= O
O.loc = src.loc
icon_state = icon_broken

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

View File

@@ -134,6 +134,7 @@ zone/proc/DebugDisplay(client/client)
client/proc/TestZASRebuild()
set category = "Debug"
// var/turf/turf = get_turf(mob)
var/zone/current_zone = mob.loc:zone
if(!current_zone)
@@ -155,7 +156,7 @@ client/proc/TestZASRebuild()
for(var/direction in cardinal)
var/turf/simulated/adjacent = get_step(current, direction)
if(!current.ZAirPass(adjacent))
if(!current.ZCanPass(adjacent))
continue
if(turfs.Find(adjacent))
current_adjacents += adjacent
@@ -210,4 +211,9 @@ client/proc/TestZASRebuild()
for(var/turf/current in turfs)
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
//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
if(air_contents.toxins < 0.001)
if(air_contents.toxins < 0.1)
air_contents.toxins = 0
if(fuel)
if(fuel.moles < 0.001)
if(fuel.moles < 0.1)
air_contents.trace_gases.Remove(fuel)
//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)
//Liquid Fuel
if(liquid.amount <= 0)
if(liquid.amount <= 0.1)
del liquid
else
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(liquid)
return 1
if (toxins)
if(toxins >= 0.1)
return 1
if(fuel)
if(fuel && fuel.moles >= 0.1)
return 1
return 0
@@ -272,9 +272,9 @@ datum/gas_mixture/proc/check_combustability(obj/effect/decal/cleanable/liquid_fu
if(oxygen && (toxins || fuel || liquid))
if(liquid)
return 1
if (toxins >= 0.7)
if (toxins >= 0.1)
return 1
if(fuel && fuel.moles >= 1.4)
if(fuel && fuel.moles >= 0.1)
return 1
return 0

View File

@@ -67,7 +67,7 @@ var/global/vs_control/vsc = new
var/connection_insulation = 1
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_NAME = "Connections - Temperature Difference"
@@ -288,6 +288,7 @@ var/global/vs_control/vsc = new
airflow_speed_decay = 1
airflow_delay = 20
airflow_mob_slowdown = 3
connection_insulation = 0
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"

View File

@@ -369,25 +369,26 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
Z.interactions_with_neighbors++
interactions_with_neighbors++
for(var/zone/Z in closed_connection_zones)
//If that zone has already processed, skip it.
if(Z.last_update > last_update || !Z.air)
continue
var/handle_temperature = abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta
if(Z.status == ZONE_SLEEPING)
if (handle_temperature)
Z.SetStatus(ZONE_ACTIVE)
else
if(!vsc.connection_insulation)
for(var/zone/Z in closed_connection_zones)
//If that zone has already processed, skip it.
if(Z.last_update > last_update || !Z.air)
continue
if(air && Z.air)
if( handle_temperature )
ShareHeat(air, Z.air, closed_connection_zones[Z])
var/handle_temperature = abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta
Z.interactions_with_neighbors++
interactions_with_neighbors++
if(Z.status == ZONE_SLEEPING)
if (handle_temperature)
Z.SetStatus(ZONE_ACTIVE)
else
continue
if(air && Z.air)
if( handle_temperature )
ShareHeat(air, Z.air, closed_connection_zones[Z])
Z.interactions_with_neighbors++
interactions_with_neighbors++
if(!interactions_with_neighbors && !interactions_with_unsim)
SetStatus(ZONE_SLEEPING)
@@ -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)
//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.
var
//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 )
B.temperature = max(0, (B.temperature - temp_avg) * (1- (ratio / max(1,B.group_multiplier)) ) + temp_avg )
*/
///////////////////
//Zone Rebuilding//

View File

@@ -209,8 +209,9 @@
if(M)
var/turf/ear = get_turf(M)
if(ear)
if(speaker_coverage[ear])
. |= M
// Ghostship is magic: Ghosts can hear radio chatter from anywhere
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 .
#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
all_species[S.name] = S
if(S.flags & WHITELISTED)
if(S.flags & IS_WHITELISTED)
whitelisted_species += S.name
return 1

View File

@@ -773,4 +773,14 @@ proc
for(var/O in A.overlays)
var/image/I = O
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
*/
/proc/replacetext(text, find, replacement)
var/find_len = length(find)
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 .
return list2text(text2list(text, find), replacement)
/proc/replacetextEx(text, find, replacement)
var/find_len = length(find)
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 .
return list2text(text2listEx(text, find), replacement)
//Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u)
@@ -287,27 +265,6 @@ proc/checkhtml(var/t)
return message
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 = "*")
//This proc fills in all spaces with the "replace" var (* by default) with whatever
@@ -346,4 +303,4 @@ proc/checkhtml(var/t)
var/new_text = ""
for(var/i = length(text); i > 0; i--)
new_text += copytext(text, i, i+1)
return new_text
return new_text

View File

@@ -83,22 +83,94 @@
return hex
//Attaches each element of a list to a single string seperated by 'seperator'.
/proc/dd_list2text(var/list/the_list, separator)
var/total = the_list.len
if(!total)
return
var/count = 2
var/newText = "[the_list[1]]"
while(count <= total)
if(separator)
newText += separator
newText += "[the_list[count]]"
count++
return newText
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/list2text(list/ls, sep)
if(ls.len <= 1) // Early-out code for empty or singleton lists.
return ls.len ? ls[1] : ""
var/l = ls.len // Made local for sanic speed.
var/i = 0 // Incremented every time a list index is accessed.
if(sep <> null)
// Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
#define S1 sep, 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.
// 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=",")
if(!istype(list) || !list.len)
return
@@ -108,62 +180,50 @@ proc/tg_list2text(list/list, glue=",")
return output
//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.
/proc/text2list(text, seperator="\n")
//Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
/proc/text2list(text, delimiter="\n")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = 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!
/proc/text2listEx(text, seperator="\n")
/proc/text2listEx(text, delimiter="\n")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list()
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( 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 .
var/last_found = 1
var/found
do
found = findtextEx(text, delimiter, last_found, 0)
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
//Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n")
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
/proc/dir2text(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)
/mob/verb/button_pressed_F12()
/mob/verb/button_pressed_F12(var/full = 0 as null)
set name = "F12"
set hidden = 1
if(hud_used)
if(ishuman(src))
if(!src.client) return
if(!client) return
if(client.view != world.view)
return
if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
@@ -209,10 +210,15 @@ datum/hud/New(mob/owner)
//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
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.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.
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.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.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.
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
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
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.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
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
/atom/proc/attack_ghost(mob/dead/observer/user as mob)
if(user.client && user.client.inquisitive_ghost)

View File

@@ -63,6 +63,9 @@
var/automute_on = 0 //enables automuting/spam prevention
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/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech
@@ -181,7 +184,7 @@
if(type == "config")
switch (name)
if ("resource_urls")
config.resource_urls = stringsplit(value, " ")
config.resource_urls = text2list(value, " ")
if ("admin_legacy_system")
config.admin_legacy_system = 1
@@ -459,10 +462,15 @@
else //probably windows, if not this should work anyway
config.python_path = "python"
if("allow_cult_ghostwriter")
config.cult_ghostwriter = 1
if("req_cult_ghostwriter")
config.cult_ghostwriter_req_cultists = value
else
diary << "Unknown setting in configuration: '[name]'"
else if(type == "game_options")
if(!value)
diary << "Unknown value for setting [name] in [filename]."

View File

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

View File

@@ -107,13 +107,13 @@
var/datum/data/record/L = new()
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["rank"] = H.mind.assigned_role
L.fields["age"] = H.age
L.fields["sex"] = H.gender
L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.SE
L.fields["identity"] = H.dna.UI
L.fields["enzymes"] = H.dna.SE // Used in respawning
L.fields["identity"] = H.dna.UI // "
L.fields["image"] = getFlatIcon(H,0) //This is god-awful
locked += L
return

View File

@@ -297,7 +297,7 @@ var/list/advance_cures = list(
for(var/datum/symptom/S in symptoms)
L += S.id
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
return result

View File

@@ -45,7 +45,7 @@
H.op_stage.appendix = 2.0
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)
groin.wounds += W
src.cure()

View File

@@ -74,6 +74,8 @@ datum/mind
current.mind = null
if(new_character.mind) //remove any mind currently in our new body's mind variable
new_character.mind.current = null
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
current = new_character //link ourself to our new body
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/storage/fancy/cigarettes/dromedaryco,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/ale,
/obj/item/weapon/reagent_containers/food/drinks/ale,
/obj/item/weapon/reagent_containers/food/drinks/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer,
/obj/item/weapon/reagent_containers/food/drinks/beer)
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer)
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
@@ -695,6 +695,18 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
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
name = "Shotgun shells"
contains = list(/obj/item/ammo_casing/shotgun,

View File

@@ -51,122 +51,194 @@
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"]
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
/obj/effect/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"]
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
//world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=3>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=3>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/*
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\
)
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/obj/effect/laser
name = "laser"

View File

@@ -325,6 +325,13 @@
icon = 'icons/obj/wizard.dmi'
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
name = "stick"
desc = "A great tool to drag someone else's drinks across the bar."

View File

@@ -6,6 +6,7 @@
var/list/fingerprintshidden
var/fingerprintslast = null
var/list/blood_DNA
var/blood_color
var/last_bumped = 0
var/pass_flags = 0
var/throwpass = 0
@@ -361,7 +362,9 @@ its easier to just keep the beam vertical.
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.
blood_DNA = list()
blood_color = "#A10808"
if (M.species)
blood_color = M.species.blood_color
//adding blood to humans
else if (istype(src, /mob/living/carbon/human))
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)
var/global/list/assigned_blocks[STRUCDNASIZE]
var/global/list/datum/dna/gene/dna_genes[0]
// UI Indices (can change to mutblock style, if desired)
#define DNA_UI_HAIR_R 1
#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_LENGTH 13 // Update this when you add something, or you WILL break shit.
/////////////////
// GENE DEFINES
/////////////////
/* Note RE: unassigned blocks
Many genes in baycode are currently sitting unused
(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.
*/
// Skip checking if it's already active.
// Used for genes that check for value rather than a binary on/off.
#define GENE_ALWAYS_ACTIVATE 1
/datum/dna
// 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/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,
// 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
///////////////////////////////////////
@@ -84,7 +99,11 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
// Create random UI.
/datum/dna/proc/ResetUI(var/defer=0)
for(var/i=1,i<=DNA_UI_LENGTH,i++)
UI[i]=rand(0,4095)
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)
if(!defer)
UpdateUI()
@@ -110,13 +129,13 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
SetUIValueRange(DNA_UI_BEARD_G, character.g_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, character.b_facial, 255, 1)
SetUIValueRange(DNA_UI_EYES_R, character.r_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_R, character.r_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_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)
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len,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.
// 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(value < minvalue)
value=minvalue
else if(value > maxvalue)
value=maxvalue
ASSERT(maxvalue<=4095)
var/range = (4095 / maxvalue)
if(value)
SetUIValue(block,round(value * range))
SetUIValue(block,round(value * range),defer)
// Getter version of above.
/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
if (block<=0) return 0
var/value = GetUIValue(block)
return round(1+(value / 4096)*maxvalue)
return round(1 +(value / 4096)*maxvalue)
// Is the UI gene "on" or "off"?
// 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)
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.)
/datum/dna/proc/GetSEState(var/block)
if (block<=0) return 0
@@ -253,7 +274,7 @@ var/global/list/assigned_blocks[STRUCDNASIZE]
if(on)
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
else
val=rand(BOUNDS[DNA_OFF_LOWERBOUND],BOUNDS[DNA_OFF_UPPERBOUND])
val=rand(1,BOUNDS[DNA_OFF_UPPERBOUND])
SetSEValue(block,val,defer)
// 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)
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

View File

@@ -1,5 +1,37 @@
#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
/obj/machinery/dna_scannernew
name = "\improper DNA modifier"
@@ -14,6 +46,7 @@
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/opened = 0
/obj/machinery/dna_scannernew/New()
..()
@@ -80,12 +113,6 @@
usr.loc = src
src.occupant = usr
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)
return
@@ -111,7 +138,12 @@
if (G.affecting.abiotic())
user << "\blue <B>Subject cannot have abiotic items on.</B>"
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)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
@@ -119,8 +151,6 @@
src.occupant = M
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
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \
@@ -132,19 +162,11 @@
if(ghost.mind == M.mind)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
del(G)
return
/obj/machinery/dna_scannernew/proc/go_out()
if ((!( src.occupant ) || src.locked))
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)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
@@ -205,11 +227,7 @@
var/selected_ui_target_hex = 1
var/radiation_duration = 2.0
var/radiation_intensity = 1.0
var/list/buffers = list(
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/list/datum/dna2/record/buffers[3]
var/irradiating = 0
var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/obj/machinery/dna_scannernew/connected = null
@@ -219,6 +237,7 @@
use_power = 1
idle_power_usage = 10
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)
if(istype(I, /obj/item/weapon/screwdriver))
@@ -308,13 +327,13 @@
arr += "[i]:[EncodeDNABlock(buffer[i])]"
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,":")
if(!pos) return 0
var/id = text2num(copytext(blk,1,pos))
if(!id) return 0
I.block = id
I.dna = list(buffer[id])
I.buf = buffer
return 1
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
@@ -336,6 +355,7 @@
ui_interact(user)
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
src.add_hiddenprint(user)
ui_interact(user)
/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
* 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 ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
@@ -363,27 +383,26 @@
data["selectedMenuKey"] = selected_menu_key
data["locked"] = src.connected.locked
data["hasOccupant"] = connected.occupant ? 1 : 0
data["isInjectorReady"] = injector_ready
data["hasDisk"] = disk ? 1 : 0
var/diskData[0]
if (!disk)
if (!disk || !disk.buf)
diskData["data"] = null
diskData["owner"] = null
diskData["label"] = null
diskData["type"] = null
diskData["ue"] = null
else
diskData["data"] = disk.data
diskData["owner"] = disk.owner
diskData["label"] = disk.name
diskData["type"] = disk.data_type
diskData["ue"] = disk.ue
diskData = disk.buf.GetData()
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["radiationDuration"] = radiation_duration
@@ -432,23 +451,19 @@
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
if (!ui) // no ui has been passed, so we'll search for one
{
ui = nanomanager.get_open_ui(user, src, ui_key)
}
// 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
// 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)
// When the UI is first opened this is the data it will use
ui.set_initial_data(data)
// 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
// auto update every Master Controller tick
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)
if(..())
@@ -624,10 +639,13 @@
src.selected_se_block = select_block
if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
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
if (href_list["pulseSERadiation"])
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
var/lock_state = src.connected.locked
@@ -650,23 +668,27 @@
else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE)
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)
domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
domutcheck(src.connected.occupant,src.connected)
else
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
if (prob(80-src.radiation_duration))
//testing("Random bad mut!")
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
else
randmuti(src.connected.occupant)
//testing("Random identity mut!")
src.connected.occupant.UpdateAppearance()
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
src.connected.locked = lock_state
return 1 // return 1 forces an update to all Nano uis attached to src
if(href_list["ejectBeaker"])
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
return 1
@@ -677,18 +699,14 @@
// Transfer Buffer Management
if(href_list["bufferOption"])
var/bufferOption = href_list["bufferOption"]
// These bufferOptions do not require a bufferId
if (bufferOption == "wipeDisk")
if ((isnull(src.disk)) || (src.disk.read_only))
//src.temphtml = "Invalid disk. Please try again."
return 0
src.disk.data = null
src.disk.data_type = null
src.disk.ue = null
src.disk.owner = null
src.disk.name = null
src.disk.buf=null
//src.temphtml = "Data saved."
return 1
@@ -702,7 +720,7 @@
// All bufferOptions from here on require a bufferId
if (!href_list["bufferId"])
return 0
var/bufferId = text2num(href_list["bufferId"])
if (bufferId < 1 || bufferId > 3)
@@ -710,56 +728,46 @@
if (bufferOption == "saveUI")
if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["ue"] = 0
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffers[bufferId]["owner"] = src.connected.occupant.name
else
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
src.buffers[bufferId]["label"] = "Unique Identifier"
src.buffers[bufferId]["type"] = "ui"
var/datum/dna2/record/databuf=new
databuf.types = DNA2_BUF_UE
databuf.dna = src.connected.occupant.dna
databuf.name = "Unique Identifier"
src.buffers[bufferId] = databuf
return 1
if (bufferOption == "saveUIAndUE")
if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffers[bufferId]["owner"] = src.connected.occupant.name
else
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
src.buffers[bufferId]["label"] = "Unique Identifier + Unique Enzymes"
src.buffers[bufferId]["type"] = "ui"
src.buffers[bufferId]["ue"] = 1
var/datum/dna2/record/databuf=new
databuf.types = DNA2_BUF_UI|DNA2_BUF_UE
databuf.dna = src.connected.occupant.dna
databuf.name = "Unique Identifier + Unique Enzymes"
src.buffers[bufferId] = databuf
return 1
if (bufferOption == "saveSE")
if(src.connected.occupant && src.connected.occupant.dna)
src.buffers[bufferId]["ue"] = 0
src.buffers[bufferId]["data"] = src.connected.occupant.dna.SE
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffers[bufferId]["owner"] = src.connected.occupant.name
else
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
src.buffers[bufferId]["label"] = "Structural Enzymes"
src.buffers[bufferId]["type"] = "se"
var/datum/dna2/record/databuf=new
databuf.types = DNA2_BUF_SE
databuf.dna = src.connected.occupant.dna
databuf.name = "Structural Enzymes"
src.buffers[bufferId] = databuf
return 1
if (bufferOption == "clear")
src.buffers[bufferId]["data"] = null
src.buffers[bufferId]["owner"] = null
src.buffers[bufferId]["label"] = null
src.buffers[bufferId]["ue"] = null
src.buffers[bufferId]=null
return 1
if (bufferOption == "changeLabel")
var/label = src.buffers[bufferId]["label"] ? src.buffers[bufferId]["label"] : "New Label"
src.buffers[bufferId]["label"] = sanitize(input("New Label:", "Edit Label", label))
var/datum/dna2/record/buf = src.buffers[bufferId]
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
if (bufferOption == "transfer")
if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna)
return
irradiating = 2
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
@@ -769,33 +777,37 @@
irradiating = 0
src.connected.locked = lock_state
if (src.buffers[bufferId]["type"] == "ui")
if (src.buffers[bufferId]["ue"])
src.connected.occupant.real_name = src.buffers[bufferId]["owner"]
src.connected.occupant.name = src.buffers[bufferId]["owner"]
src.connected.occupant.UpdateAppearance(src.buffers[bufferId]["data"])
else if (src.buffers[bufferId]["type"] == "se")
src.connected.occupant.dna.SE = src.buffers[bufferId]["data"]
var/datum/dna2/record/buf = src.buffers[bufferId]
if ((buf.types & DNA2_BUF_UI))
if ((buf.types & DNA2_BUF_UE))
src.connected.occupant.real_name = buf.dna.real_name
src.connected.occupant.name = buf.dna.real_name
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()
domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += rand(20,50)
return 1
if (bufferOption == "createInjector")
if (src.injector_ready)
if (src.injector_ready || waiting_for_user_input)
var/success = 1
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"])
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffers[bufferId]["data"])
success = setInjectorBlock(I,blk,src.buffers[bufferId]["data"])
waiting_for_user_input=1
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(buf.GetData())
success = setInjectorBlock(I,blk,buf)
else
I.dna = src.buffers[bufferId]["data"]
I.buf = buf
waiting_for_user_input=0
if(success)
I.loc = src.loc
I.name += " ([src.buffers[bufferId]["label"]])"
if (src.buffers[bufferId]["ue"]) I.ue = src.buffers[bufferId]["owner"] //lazy haw haw
I.name += " ([buf.name])"
//src.temphtml = "Injector created."
src.injector_ready = 0
spawn(300)
@@ -807,14 +819,11 @@
return 1
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."
return 0
src.buffers[bufferId]["data"] = src.disk.data
src.buffers[bufferId]["type"] = src.disk.data_type
src.buffers[bufferId]["ue"] = src.disk.ue
src.buffers[bufferId]["owner"] = src.disk.owner
src.buffers[bufferId]=src.disk.buf
//src.temphtml = "Data loaded."
return 1
@@ -823,11 +832,10 @@
//src.temphtml = "Invalid disk. Please try again."
return 0
src.disk.data = buffers[bufferId]["data"]
src.disk.data_type = src.buffers[bufferId]["type"]
src.disk.ue = src.buffers[bufferId]["ue"]
src.disk.owner = src.buffers[bufferId]["owner"]
src.disk.name = "data disk - '[src.buffers[bufferId]["owner"]]'"
var/datum/dna2/record/buf = src.buffers[bufferId]
src.disk.buf = buf
src.disk.name = "data disk - '[buf.dna.real_name]'"
//src.temphtml = "Data saved."
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)
if(!changeling) return
if(src.has_brain_worms())
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
return
var/mob/living/carbon/C = src
changeling.chem_charges--
C.remove_changeling_powers()
@@ -370,24 +374,24 @@
if(changeling_power(20,1,100,DEAD))
// charge the changeling chemical cost for stasis
changeling.chem_charges -= 20
// restore us to health
C.rejuvenate()
// remove our fake death flag
C.status_flags &= ~(FAKEDEATH)
// let us move again
C.update_canmove()
// re-add out changeling powers
C.make_changeling()
C.make_changeling()
// sending display messages
C << "<span class='notice'>We have regenerated.</span>"
C.visible_message("<span class='warning'>[src] appears to wake from the dead, having healed all wounds.</span>")
feedback_add_details("changeling_powers","FD")
return 1

View File

@@ -1,5 +1,3 @@
#define METEOR_TEMPERATURE
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
//set to at least 100 unless you want evarr ruining every round
@@ -95,18 +93,9 @@
icon_state = "smallf"
pass_flags = PASSTABLE | PASSGRILLE
/obj/effect/meteor/Move()
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(METEOR_TEMPERATURE, 1000)
..()
return
/obj/effect/meteor/Bump(atom/A)
spawn(0)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
shake_camera(M, 3, 1)
if (A)
A.meteorhit(src)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
@@ -117,9 +106,7 @@
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \
prob(15))
explosion(src.loc, 4, 5, 6, 7, 0)
playsound(src.loc, "explosion", 50, 1)
del(src)
return
@@ -146,16 +133,18 @@
if(--src.hits <= 0)
del(src) //Dont blow up singularity containment if we get stuck there.
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
shake_camera(M, 3, 1)
if (A)
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if(!T || T.z != src.z)
continue
shake_camera(M, 3, get_dist(M.loc, src.loc) > 20 ? 1 : 3)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
explosion(src.loc, 0, 1, 2, 3, 0)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if (--src.hits <= 0)
if(prob(15) && !istype(A, /obj/structure/grille))
explosion(src.loc, 1, 2, 3, 4, 0)
playsound(src.loc, "explosion", 50, 1)
del(src)
return

View File

@@ -2,7 +2,7 @@
// (mostly) DNA2 SETUP
/////////////////////////
// Randomize block, assign a reference name, and optionally define difficulty (by making activation zone smaller or bigger)
// Randomize block, assign a reference name, and optionally define difficulty (by making activation zone smaller or bigger)
// The name is used on /vg/ for species with predefined genetic traits,
// and for the DNA panel in the player panel.
/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS)
@@ -74,7 +74,7 @@
XRAYBLOCK = getAssignedBlock("XRAY", numsToAssign, DNA_HARDER_BOUNDS)
CLUMSYBLOCK = getAssignedBlock("CLUMSY", numsToAssign)
FAKEBLOCK = getAssignedBlock("FAKE", numsToAssign)
// UNUSED!
//COUGHBLOCK = getAssignedBlock("COUGH", numsToAssign)
//GLASSESBLOCK = getAssignedBlock("GLASSES", numsToAssign)
@@ -96,8 +96,20 @@
//SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign)
//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

View File

@@ -19,6 +19,10 @@
if(istype(M, /mob/living/carbon/human/dummy))
return..()
if(M.has_brain_worms()) //Borer stuff - RR
user << "<span class='warning'>This being is corrupted by an alien intelligence and cannot be soul trapped.</span>"
return..()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")

View File

@@ -250,6 +250,9 @@
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>")
if(occupant.has_brain_worms())
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<BR/>"
if(occupant.vessel)
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
var/blood_percent = blood_volume / 560

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 (valve_open)
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
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
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
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
if (href_list["remove_tank"])

View File

@@ -56,7 +56,7 @@
src.visible_message("\red <B>[user] has slashed [src]!</B>")
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
if(prob(10))
new /obj/effect/decal/cleanable/oil(src.loc)
new /obj/effect/decal/cleanable/blood/oil(src.loc)
healthcheck()
@@ -66,7 +66,7 @@
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
if(prob(10))
new /obj/effect/decal/cleanable/oil(src.loc)
new /obj/effect/decal/cleanable/blood/oil(src.loc)
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()
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/robot_debris
target_types += /obj/effect/decal/cleanable/crayon
target_types += /obj/effect/decal/cleanable/liquid_fuel
target_types += /obj/effect/decal/cleanable/mucus
target_types += /obj/effect/decal/cleanable/dirt
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/gibs/
target_types += /obj/effect/decal/cleanable/dirt
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
anchored = 1

View File

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

View File

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

View File

@@ -219,7 +219,7 @@ Auto Patrol: []"},
walk_to(src,0)
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))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
@@ -726,7 +726,7 @@ Auto Patrol: []"},
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/oil(src.loc)
new /obj/effect/decal/cleanable/blood/oil(src.loc)
del(src)
/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.
item_state = "card-id"
w_class = 1.0
var/data = ""
var/ue = 0
var/data_type = "ui" //ui|se
var/owner = "God Emperor of Mankind"
var/datum/dna2/record/buf=null
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
name = "data disk - 'God Emperor of Mankind'"
data = "066000033000000000AF00330660FF4DB002690"
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
ue = 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
name = "data disk - 'Mr. Muggles'"
data_type = "se"
data = "0983E840344C39F4B059D5145FC5785DC6406A4FFF"
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.
/proc/find_dead_player(var/find_key)
if (isnull(find_key))
@@ -102,6 +119,7 @@
return src.healthstring
/obj/machinery/clonepod/attack_ai(mob/user as mob)
src.add_hiddenprint(user)
return attack_hand(user)
/obj/machinery/clonepod/attack_paw(mob/user as mob)
return attack_hand(user)
@@ -116,20 +134,20 @@
//Clonepod
//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)
return 0
var/datum/mind/clonemind = locate(mindref)
var/datum/mind/clonemind = locate(R.mind)
if(!istype(clonemind,/datum/mind)) //not a mind
return 0
if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
return 0
if(clonemind.active) //somebody is using that mind
if( ckey(clonemind.key)!=ckey )
if( ckey(clonemind.key)!=R.ckey )
return 0
else
for(var/mob/dead/observer/G in player_list)
if(G.ckey == ckey)
if(G.ckey == R.ckey)
if(G.can_reenter_corpse)
break
else
@@ -147,9 +165,9 @@
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
occupant = H
if(!clonename) //to prevent null names
clonename = "clone ([rand(0,999)])"
H.real_name = clonename
if(!R.dna.real_name) //to prevent null names
R.dna.real_name = "clone ([rand(0,999)])"
H.real_name = R.dna.real_name
src.icon_state = "pod_1"
//Get the clone body ready
@@ -161,7 +179,7 @@
H.updatehealth()
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>"
// -- Mode/mind specific stuff goes here
@@ -180,24 +198,24 @@
// -- End mode specific stuff
if(!H.dna)
if(!R.dna)
H.dna = new /datum/dna()
H.dna.real_name = H.real_name
if(ui)
H.UpdateAppearance(ui)
if(se)
H.dna.SE = se
H.dna.UpdateSE()
randmutb(H) //Sometimes the clones come out wrong.
else
H.dna=R.dna
H.UpdateAppearance()
randmutb(H) //Sometimes the clones come out wrong.
H.dna.UpdateSE()
H.dna.UpdateUI()
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.species = mrace
for(var/datum/language/L in languages)
H.add_language(L.name)
H.update_mutantrace()
H.set_species(R.dna.species)
//for(var/datum/language/L in languages)
// H.add_language(L.name)
H.suiciding = 0
src.attempting = 0
return 1

View File

@@ -262,7 +262,7 @@ That prevents a few funky behaviors.
A.loc = T.loc
A.cancel_camera()
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)
if("AIFIXER")//AI Fixer terminal.
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")
A.cancel_camera()
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
if(!C.contents.len && T.occupant && !T.active)
C.name = "inteliCard - [T.occupant.name]"
@@ -298,7 +298,7 @@ That prevents a few funky behaviors.
C.icon_state = "aicard-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."
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.cancel_camera()
T.occupant = null
@@ -323,7 +323,7 @@ That prevents a few funky behaviors.
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
A.cancel_camera()
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
if(!C.AI && T.occupant && !T.active)
if (T.occupant.stat)

View File

@@ -262,7 +262,7 @@
if(locked)
user << "\red Circuit controls are locked."
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))
if(!input)
usr << "No input found please hang up and try your call again."

View File

@@ -10,7 +10,7 @@
var/scantemp = "Scanner unoccupied"
var/menu = 1 //Which menu screen to display
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/loading = 0 // Nice loading text
@@ -136,8 +136,8 @@
if(2)
dat += "<h4>Current records</h4>"
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
for(var/datum/data/record/R in src.records)
dat += "<a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
for(var/datum/dna2/record/R in src.records)
dat += "<li><a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.dna.real_name]</a><li>"
if(3)
dat += "<h4>Selected Record</h4>"
@@ -146,10 +146,11 @@
if (!src.active_record)
dat += "<font color=red>ERROR: Record not found.</font>"
else
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>"
var/obj/item/weapon/implant/health/H = locate(src.active_record.fields["imp"])
dat += {"<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>
<b>Name:</b> [src.active_record.dna.real_name]<br>"}
var/obj/item/weapon/implant/health/H = null
if(src.active_record.implant)
H=locate(src.active_record.implant)
if ((H) && (istype(H)))
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>"
@@ -166,13 +167,13 @@
else
dat += "<br>" //Keeping a line empty for appearances I guess.
dat += {"<b>UI:</b> [src.active_record.fields["UI"]]<br>
<b>SE:</b> [src.active_record.fields["SE"]]<br><br>"}
dat += {"<b>UI:</b> [src.active_record.dna.uni_identity]<br>
<b>SE:</b> [src.active_record.dna.struc_enzymes]<br><br>"}
if(pod1 && pod1.biomass >= CLONE_BIOMASS)
dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
else
dat += {"<b>Unsufficient biomass</b><br>"}
dat += {"<b>Insufficient biomass</b><br>"}
if(4)
if (!src.active_record)
@@ -217,8 +218,8 @@
else if (href_list["view_rec"])
src.active_record = locate(href_list["view_rec"])
if(istype(src.active_record,/datum/data/record))
if ((isnull(src.active_record.fields["ckey"])) || (src.active_record.fields["ckey"] == ""))
if(istype(src.active_record,/datum/dna2/record))
if ((isnull(src.active_record.ckey)))
del(src.active_record)
src.temp = "ERROR: Record Corrupt"
else
@@ -248,7 +249,7 @@
else if (href_list["disk"]) //Load or eject.
switch(href_list["disk"])
if("load")
if ((isnull(src.diskette)) || (src.diskette.data == ""))
if ((isnull(src.diskette)) || isnull(src.diskette.buf))
src.temp = "Load error."
src.updateUsrDialog()
return
@@ -258,12 +259,7 @@
src.updateUsrDialog()
return
if (src.diskette.data_type == "ui")
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.active_record = src.diskette.buf
src.temp = "Load successful."
if("eject")
@@ -277,28 +273,24 @@
src.updateUsrDialog()
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
if("ui")
src.diskette.data = src.active_record.fields["UI"]
src.diskette.ue = 0
src.diskette.data_type = "ui"
src.diskette.buf.types=DNA2_BUF_UI
if("ue")
src.diskette.data = src.active_record.fields["UI"]
src.diskette.ue = 1
src.diskette.data_type = "ui"
src.diskette.buf.types=DNA2_BUF_UI|DNA2_BUF_UE
if("se")
src.diskette.data = src.active_record.fields["SE"]
src.diskette.ue = 0
src.diskette.data_type = "se"
src.diskette.owner = src.active_record.fields["name"]
src.diskette.name = "data disk - '[src.diskette.owner]'"
src.diskette.buf.types=DNA2_BUF_SE
src.diskette.name = "data disk - '[src.active_record.dna.real_name]'"
src.temp = "Save \[[href_list["save_disk"]]\] successful."
else if (href_list["refresh"])
src.updateUsrDialog()
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!
if(istype(C))
//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)
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..."
records.Remove(C)
del(C)
menu = 1
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
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..."
records.Remove(C)
del(C)
@@ -363,27 +355,25 @@
subject.dna.check_integrity()
var/datum/data/record/R = new /datum/data/record( )
R.fields["mrace"] = subject.species
R.fields["ckey"] = subject.ckey
R.fields["name"] = subject.real_name
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
R.fields["UI"] = subject.dna.UI
R.fields["SE"] = subject.dna.SE
R.fields["languages"] = subject.languages
var/datum/dna2/record/R = new /datum/dna2/record()
R.dna=subject.dna
R.ckey = subject.ckey
R.id= copytext(md5(subject.real_name), 2, 6)
R.name=R.dna.real_name
R.types=DNA2_BUF_UI|DNA2_BUF_UE|DNA2_BUF_SE
//Add an implant if needed
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
if (isnull(imp))
imp = new /obj/item/weapon/implant/health(subject)
imp.implanted = subject
R.fields["imp"] = "\ref[imp]"
R.implant = "\ref[imp]"
//Update it if needed
else
R.fields["imp"] = "\ref[imp]"
R.implant = "\ref[imp]"
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
scantemp = "Subject successfully scanned."
@@ -391,8 +381,8 @@
//Find a specific record by key.
/obj/machinery/computer/cloning/proc/find_record(var/find_key)
var/selected_record = null
for(var/datum/data/record/R in src.records)
if (R.fields["ckey"] == find_key)
for(var/datum/dna2/record/R in src.records)
if (R.ckey == find_key)
selected_record = R
break
return selected_record

View File

@@ -443,7 +443,6 @@
//Sender isn't faking as someone who exists
if(isnull(PDARec))
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, customrecepient.loc))
@@ -456,8 +455,13 @@
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Sender is faking as someone who exists
else
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)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
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
* 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 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
var/occupantData[0]
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
if (occupant)
occupantData["name"] = occupant.name
occupantData["stat"] = occupant.stat
occupantData["health"] = occupant.health
@@ -131,23 +120,18 @@
for(var/datum/reagent/R in beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
if (!ui) // no ui has been passed, so we'll search for one
{
ui = nanomanager.get_open_ui(user, src, ui_key)
}
// 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
// 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)
// When the UI is first opened this is the data it will use
ui.set_initial_data(data)
// 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
// auto update every Master Controller tick
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)
if(usr == occupant)

View File

@@ -70,6 +70,7 @@
set background = 1
if(src.attached)
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?")
src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
@@ -105,6 +106,9 @@
if(NOCLONE in T.mutations)
return
if(T.species && T.species.flags & NO_BLOOD)
return
// If the human is losing too much blood, beep.
if(T.vessel.get_reagent_amount("blood") < BLOOD_VOLUME_SAFE) if(prob(5))
visible_message("\The [src] beeps loudly.")

View File

@@ -43,6 +43,11 @@
if (recipe.items)
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
********************/

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+="<BR><A href='?src=\ref[src];setScreen=[0]'>Return</A><BR>"
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>"
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>"
else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"

View File

@@ -288,7 +288,10 @@ 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.
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 ---
if(compression > 0)

View File

@@ -173,7 +173,7 @@
if(D)
var/transaction_amount = currently_vending.price
if(transaction_amount <= D.money)
//transfer the money
D.money -= transaction_amount
vendor_account.money += transaction_amount
@@ -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/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/kahlua = 5,/obj/item/weapon/reagent_containers/food/drinks/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/bottle/kahlua = 5,/obj/item/weapon/reagent_containers/food/drinks/cans/beer = 6,
/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/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/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/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 8,
/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/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)
@@ -667,15 +667,15 @@
icon_state = "Cola_Machine"
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."
products = list(/obj/item/weapon/reagent_containers/food/drinks/cola = 10,/obj/item/weapon/reagent_containers/food/drinks/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/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/space_up = 10,
/obj/item/weapon/reagent_containers/food/drinks/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/grape_juice = 10)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/thirteenloko = 5)
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/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/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/space_up = 1,
/obj/item/weapon/reagent_containers/food/drinks/iced_tea = 1,/obj/item/weapon/reagent_containers/food/drinks/grape_juice = 1)
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/cans/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 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/cans/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 10)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5)
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/cans/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 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/cans/iced_tea = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 1)
//This one's from bay12
/obj/machinery/vending/cart

View File

@@ -518,7 +518,7 @@
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
src.updateUsrDialog()
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
/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))
if(!target)
return
if(get_dist(src, target)>1)
if(!target.Adjacent(src))
if(selected && selected.is_ranged())
selected.action(target)
else if(selected && selected.is_melee())

View File

@@ -108,6 +108,13 @@
holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(patient.has_brain_worms())
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
C.images += holder

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/xenoblood
/obj/effect/decal/cleanable/blood/xeno
name = "xeno blood"
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_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/list/viruses = list()
blood_DNA = list()
basecolor = "#05EE05"
Del()
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
/obj/effect/decal/cleanable/blood/gibs/xeno
name = "xeno gibs"
desc = "Gnarly..."
gender = PLURAL
icon = 'icons/effects/blood.dmi'
icon_state = "xgib1"
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")
/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")
/obj/effect/decal/cleanable/xenoblood/xgibs/body
/obj/effect/decal/cleanable/blood/gibs/xeno/body
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")
/obj/effect/decal/cleanable/xenoblood/xgibs/core
/obj/effect/decal/cleanable/blood/gibs/xeno/core
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
/obj/effect/decal/cleanable/blood/xtracks
icon_state = "xtracks"
random_icon_states = null
basecolor = "#05EE05"

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
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
density = 0
anchored = 1
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "floor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
icon_state = "mfloor1"
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
var/base_icon = 'icons/effects/blood.dmi'
var/list/viruses = list()
blood_DNA = list()
var/basecolor="#A10808" // Color when wet.
var/list/datum/disease2/disease/virus2 = list()
var/amount = 5
@@ -21,8 +26,11 @@
/obj/effect/decal/cleanable/blood/New()
..()
update_icon()
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
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.loc && isturf(src.loc))
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
@@ -33,61 +41,92 @@
spawn(DRYING_TIME * (amount+1))
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)
if (!istype(perp))
return
if(amount < 1)
return
if (!istype(perp))
return
if(amount < 1)
return
if(perp.shoes)
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
if(!perp.shoes.blood_overlay)
perp.shoes.generate_blood_overlay()
if(!perp.shoes.blood_DNA)
perp.shoes.blood_DNA = list()
perp.shoes.overlays += perp.shoes.blood_overlay
perp.update_inv_shoes(1)
perp.shoes.blood_DNA |= blood_DNA.Copy()
else
perp.track_blood = max(amount,perp.track_blood) //Or feet
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
if(perp.shoes)
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
if(!perp.shoes.blood_overlay)
perp.shoes.generate_blood_overlay()
if(!perp.shoes.blood_DNA)
perp.shoes.blood_DNA = list()
perp.shoes.blood_overlay.color = basecolor
perp.shoes.overlays += perp.shoes.blood_overlay
perp.update_inv_shoes(1)
perp.shoes.blood_DNA |= blood_DNA.Copy()
perp.shoes.blood_color=basecolor
else
perp.track_blood = max(amount,perp.track_blood) //Or feet
if(!perp.feet_blood_DNA)
perp.feet_blood_DNA = list()
perp.feet_blood_DNA |= blood_DNA.Copy()
perp.feet_blood_color=basecolor
amount--
amount--
/obj/effect/decal/cleanable/blood/proc/dry()
name = "dried [src.name]"
desc = "It's dark red and crusty. Someone is not doing their job."
color = "#999999"
amount = 0
name = "dried [src.name]"
desc = "It's dry and crusty. Someone is not doing their job."
color = adjust_brightness(color, -50)
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
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
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
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
amount = 2
/obj/effect/decal/cleanable/blood/drip
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
name = "drips of blood"
desc = "It's red."
gender = PLURAL
icon = 'icons/effects/drip.dmi'
icon_state = "1"
random_icon_states = list("1","2","3","4","5")
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
name = "gibs"
@@ -99,6 +138,22 @@
icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
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
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
@@ -117,19 +172,21 @@
/obj/effect/decal/cleanable/blood/gibs/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/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
for(var/datum/disease/D in src.viruses)
var/datum/disease/ND = D.Copy(1)
b.viruses += ND
ND.holder = b
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/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)
var/datum/disease/ND = D.Copy(1)
b.viruses += ND
ND.holder = b
if (step_to(src, get_step(src, direction), 0))
break
if (step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/mucus
@@ -142,4 +199,10 @@
icon = 'icons/effects/blood.dmi'
icon_state = "mucus"
random_icon_states = list("mucus")
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/robot_debris
/obj/effect/decal/cleanable/blood/gibs/robot
name = "robot debris"
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_state = "gib1"
basecolor="#030303"
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)
var/direction = pick(directions)
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
sleep(3)
if (i > 0)
if (prob(40))
/*var/obj/effect/decal/cleanable/oil/o =*/
new /obj/effect/decal/cleanable/oil/streak(src.loc)
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
streak.update_icon()
else if (prob(10))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
@@ -27,31 +28,23 @@
if (step_to(src, get_step(src, direction), 0))
break
/obj/effect/decal/cleanable/robot_debris/limb
/obj/effect/decal/cleanable/blood/gibs/robot/limb
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
/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
/obj/effect/decal/cleanable/oil
/obj/effect/decal/cleanable/blood/oil
name = "motor oil"
desc = "It's black and greasy. Looks like Beepsky made another mess."
gender = PLURAL
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")
basecolor="#030303"
Del()
for(var/datum/disease/D in viruses)
D.cure(0)
..()
/obj/effect/decal/cleanable/blood/oil/dry()
return
/obj/effect/decal/cleanable/oil/streak
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
/obj/effect/decal/cleanable/blood/oil/streak
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
new /obj/effect/gibspawner/generic(get_turf(location),viruses,MobDNA)
/proc/hgibs(atom/location, var/list/viruses, var/datum/dna/MobDNA)
new /obj/effect/gibspawner/human(get_turf(location),viruses,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,fleshcolor,bloodcolor)
/proc/xgibs(atom/location, var/list/viruses)
new /obj/effect/gibspawner/xeno(get_turf(location),viruses)
@@ -16,10 +16,15 @@
var/list/gibtypes = list()
var/list/gibamounts = list()
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
Gib(loc,viruses,MobDNA)
@@ -44,6 +49,14 @@
var/gibType = gibtypes[i]
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)
for(var/datum/disease/D in viruses)
if(prob(virusProb))

View File

@@ -17,7 +17,7 @@
..()
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)
New()
@@ -27,7 +27,7 @@
robot
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)
New()

View File

@@ -7,6 +7,19 @@
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)
src = null //so we don't abort once src is deleted
spawn(0)
@@ -48,7 +61,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y
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)
if(dist < devastation_range) dist = 1
@@ -85,4 +98,4 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
tile.ex_act(2)
tile.ex_act(2)

View File

@@ -6,31 +6,12 @@
/obj
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)
if(power > max_power)
max_power = power
return 1
return 0
var/list/explosion_turfs = list()
var/list/datum/explosion_turf/explosion_turfs = list()
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)
@@ -52,9 +33,8 @@ proc/explosion_rec(turf/epicenter, power)
explosion_in_progress = 1
explosion_turfs = list()
var/datum/explosion_turf/ETE = get_explosion_turf()
ETE.turf = epicenter
ETE.max_power = power
explosion_turfs[epicenter] = 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.
for(var/direction in cardinal)
@@ -62,22 +42,21 @@ proc/explosion_rec(turf/epicenter, power)
T.explosion_spread(power - epicenter.explosion_resistance, direction)
//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 )
if(ET.max_power <= 0) continue
if(!ET.turf) continue
for(var/turf/T in explosion_turfs)
if(explosion_turfs[T] <= 0) 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)
var/severity = 4 - round(max(min( 3, ((ET.max_power - ET.turf.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1)
//sanity effective power on tile divided by either 3 or one third the total explosion power
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
// One third because there are three power levels and I
// want each one to take up a third of the crater
var/x = ET.turf.x
var/y = ET.turf.y
var/z = ET.turf.z
ET.turf.ex_act(severity)
if(!ET.turf)
ET.turf = locate(x,y,z)
for( var/atom/A in ET.turf )
var/x = T.x
var/y = T.y
var/z = T.z
T.ex_act(severity)
if(!T)
T = locate(x,y,z)
for(var/atom/A in T)
A.ex_act(severity)
explosion_in_progress = 0
@@ -123,10 +102,9 @@ proc/explosion_rec(turf/epicenter, power)
new/obj/effect/debugging/marker(src)
*/
var/datum/explosion_turf/ET = get_explosion_turf(src)
if(ET.max_power >= power)
if(explosion_turfs[src] >= power)
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/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
name = "item"
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/item_state = null
var/r_speed = 1.0
@@ -316,6 +316,8 @@
return 0
if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_r_ear)
if(H.r_ear)
@@ -324,6 +326,8 @@
return 0
if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_w_uniform)
if(H.w_uniform)
@@ -349,7 +353,7 @@
H << "\red You need a jumpsuit before you can attach this [name]."
return 0
if(slot_flags & SLOT_DENYPOCKET)
return
return 0
if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
return 1
if(slot_r_store)
@@ -569,6 +573,7 @@
//apply the blood-splatter overlay if it isn't already in there
if(!blood_DNA.len)
blood_overlay.color = blood_color
overlays += blood_overlay
//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.
for(var/obj/item/A in world)
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
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_state = "blueprints"
attack_verb = list("attacked", "bapped", "hit")
@@ -21,7 +21,7 @@
/obj/item/blueprints/attack_self(mob/M as mob)
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
interact()
return
@@ -53,18 +53,18 @@
switch (get_area_type())
if (AREA_SPACE)
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>
"}
if (AREA_STATION)
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'>
move an amendment</a> to the drawing.</p>
"}
if (AREA_SPECIAL)
text += {"
<p>This place isn't noted on these blueprints.</p>
<p>This place isn't noted on the blueprint.</p>
"}
else
return
@@ -105,20 +105,20 @@ move an amendment</a> to the drawing.</p>
if(!istype(res,/list))
switch(res)
if(ROOM_ERR_SPACE)
usr << "\red New area must be complete airtight!"
usr << "\red The new area must be completely airtight!"
return
if(ROOM_ERR_TOOLARGE)
usr << "\red New area too large!"
usr << "\red The new area too large!"
return
else
usr << "\red Error! Please notify administration!"
return
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
return
if(length(str) > 50)
usr << "\red Text too long."
usr << "\red Name too long."
return
var/area/A = new
A.name = str
@@ -153,8 +153,8 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/edit_area()
var/area/A = get_area()
//world << "DEBUG: edit_area"
var/prevname = A.name
var/str = trim(stripped_input(usr,"New area title","Blueprints editing", prevname, MAX_NAME_LEN))
var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
if(!str || !length(str) || str==prevname) //cancel
return
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/silent = 0 //To beep or not to beep, that is the question
var/toff = 0 //If 1, messenger disabled
var/tnote = null //Current Texts
var/tnote[0] //Current Texts
var/last_text //No text spamming
var/last_honk //Also no honk spamming that's bad too
var/ttone = "beep" //The ringtone!
@@ -38,7 +38,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/cart = "" //A place to stick cartridge menu information
var/detonate = 1 // Can the PDA be blown up?
var/hidden = 0 // Is the PDA hidden from the PDA list?
var/active_conversation = null // New variable that allows us to only view a single conversation.
var/list/conversations = list() // For keeping up with who we have PDA messsages from.
var/newmessage = 0 //To remove hackish overlay check
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above
@@ -243,7 +246,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(usr.stat == 2)
usr << "You can't do that because you are dead!"
return
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[tnote]</body></html>"
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
for(var/index in tnote)
if(index["sent"])
HTML += addtext("<i><b>&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")
@@ -310,6 +319,139 @@ var/global/list/obj/item/device/pda/PDAs = list()
return attack_self(M)
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
/obj/item/device/pda/attack_self(mob/user as mob)
@@ -318,453 +460,292 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(active_uplink_check(user))
return
var/dat = "<html><head><title>Personal Data Assistant</title></head><body bgcolor=\"#808000\"><style>a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}</style>"
dat += "<a href='byond://?src=\ref[src];choice=Close'><img src=pda_exit.png> Close</a>"
if ((!isnull(cartridge)) && (mode == 0))
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><img src=pda_eject.png> Eject [cartridge]</a>"
if (mode)
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png> Return</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Refresh</a>"
dat += "<br>"
if (!owner)
dat += "Warning: No owner information entered. Please swipe card.<br><br>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Retry</a>"
else
switch (mode)
if (0)
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
dat += "Owner: [owner], [ownjob]<br>"
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
dat += text("<br><A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br>")
dat += "Station Time: [worldtime2text()]"//:[world.time / 100 % 6][world.time / 100 % 10]"
dat += "<br><br>"
dat += "<h4>General Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
//dat += "<li><a href='byond://?src=\red[src];choice=chatroom'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
if (cartridge)
if (cartridge.access_clown)
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><img src=pda_honk.png> Honk Synthesizer</a></li>"
if(cartridge.access_status_display)
dat += "<li><a href='byond://?src=\ref[src];choice=42'><img src=pda_status.png> Set Status Display</a></li>"
dat += "</ul>"
if (cartridge.access_engine)
dat += "<h4>Engineering Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=43'><img src=pda_power.png> Power Monitor</a></li>"
dat += "</ul>"
if (cartridge.access_medical)
dat += "<h4>Medical Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=44'><img src=pda_medical.png> Medical Records</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Medical Scan'><img src=pda_scanner.png> [scanmode == 1 ? "Disable" : "Enable"] Medical Scanner</a></li>"
dat += "</ul>"
if (cartridge.access_security)
dat += "<h4>Security Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
dat += "<li><a href='byond://?src=\ref[src];choice=46'><img src=pda_cuffs.png> Security Bot Access</a></li>"
dat += "</ul>"
else dat += "</ul>"
if(cartridge.access_quartermaster)
dat += "<h4>Quartermaster Functions:</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png> Supply Records</A></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=48'><img src=pda_mule.png> Delivery Bot Control</A></li>"
dat += "</ul>"
dat += "</ul>"
dat += "<h4>Utilities</h4>"
dat += "<ul>"
if (cartridge)
if (cartridge.access_janitor)
dat += "<li><a href='byond://?src=\ref[src];choice=49'><img src=pda_bucket.png> Custodial Locator</a></li>"
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
if (cartridge.access_reagent_scanner)
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
if (cartridge.access_engine)
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png> [scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
if (cartridge.access_atmos)
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
if (cartridge.access_remote_door)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
if (pai)
if(pai.loc != src)
pai = null
else
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"
dat += "</ul>"
if (1)
dat += "<h4><img src=pda_notes.png> Notekeeper V2.1</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
dat += note
if (2)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png> Ringer: [silent == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png> Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
dat += "<ul>"
var/count = 0
if (!toff)
for (var/obj/item/device/pda/P in sortAtom(PDAs))
if (!P.owner||P.toff||P == src||P.hidden) continue
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><img src=pda_honk.png>*Send Virus*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
dat += "</li>"
count++
dat += "</ul>"
if (count == 0)
dat += "None detected.<br>"
if(21)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png> Clear Messages</a>"
dat += "<h4><img src=pda_mail.png> Messages</h4>"
dat += tnote
dat += "<br>"
if (3)
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
var/turf/T = get_turf_or_move(user.loc)
if (isnull(T))
dat += "Unable to obtain a reading.<br>"
else
var/datum/gas_mixture/environment = T.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
if (total_moles)
var/o2_level = environment.oxygen/total_moles
var/n2_level = environment.nitrogen/total_moles
var/co2_level = environment.carbon_dioxide/total_moles
var/plasma_level = environment.toxins/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
dat += "Nitrogen: [round(n2_level*100)]%<br>"
dat += "Oxygen: [round(o2_level*100)]%<br>"
dat += "Carbon Dioxide: [round(co2_level*100)]%<br>"
dat += "Plasma: [round(plasma_level*100)]%<br>"
if(unknown_level > 0.01)
dat += "OTHER: [round(unknown_level)]%<br>"
dat += "Temperature: [round(environment.temperature-T0C)]&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)
ui_interact(user) //NanoUI requires this proc
return
/obj/item/device/pda/Topic(href, href_list)
if(href_list["cartmenu"] && !isnull(cartridge))
cartridge.Topic(href, href_list)
return 1
if(href_list["radiomenu"] && !isnull(cartridge) && !isnull(cartridge.radio))
cartridge.radio.Topic(href, href_list)
return 1
..()
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one.
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
if (usr.stat == DEAD)
return 0
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
add_fingerprint(U)
U.set_machine(src)
switch(href_list["choice"])
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)
U.set_machine(src)
switch(href_list["choice"])
//BASIC FUNCTIONS===================================
if("Close")//Self explanatory
U.unset_machine()
U << browse(null, "window=pda")
return
if("Refresh")//Refresh, goes to the end of the proc.
if("Return")//Return
if(mode<=9)
if("Close")//Self explanatory
U.unset_machine()
ui.close()
return 0
if("Refresh")//Refresh, goes to the end of the proc.
if("Return")//Return
if(mode<=9)
mode = 0
else
mode = round(mode/10)
if(mode==2)
active_conversation = null
if(mode==4)//Fix for cartridges. Redirects to hub.
mode = 0
else
mode = round(mode/10)
if(mode==4)//Fix for cartridges. Redirects to hub.
mode = 0
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
cartridge.mode = mode
cartridge.unlock()
if ("Authenticate")//Checks for ID
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
var/turf/T = loc
if(ismob(T))
T = T.loc
cartridge.loc = T
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
cartridge.mode = mode
if ("Authenticate")//Checks for ID
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
name = "PDA-[owner] ([ownjob])"
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
var/turf/T = loc
if(ismob(T))
T = T.loc
cartridge.loc = T
mode = 0
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
//MENU FUNCTIONS===================================
if("0")//Hub
mode = 0
if("1")//Notes
mode = 1
if("2")//Messenger
mode = 2
if("21")//Read messeges
mode = 21
if("3")//Atmos scan
mode = 3
if("4")//Redirects to hub
mode = 0
if("chatroom") // chatroom hub
mode = 5
if("41") //Manifest
mode = 41
if("0")//Hub
mode = 0
if("1")//Notes
mode = 1
if("2")//Messenger
mode = 2
if("21")//Read messeges
mode = 21
if("3")//Atmos scan
mode = 3
if("4")//Redirects to hub
mode = 0
if("chatroom") // chatroom hub
mode = 5
if("41") //Manifest
mode = 41
//MAIN FUNCTIONS===================================
if("Light")
if(fon)
fon = 0
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
else SetLuminosity(0)
else
fon = 1
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_medical))
scanmode = 1
if("Reagent Scan")
if(scanmode == 3)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner))
scanmode = 3
if("Halogen Counter")
if(scanmode == 4)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_engine))
scanmode = 4
if("Honk")
if ( !(last_honk && world.time < last_honk + 20) )
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
last_honk = world.time
if("Gas Scan")
if(scanmode == 5)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_atmos))
scanmode = 5
if("Light")
if(fon)
fon = 0
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
else SetLuminosity(0)
else
fon = 1
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_medical))
scanmode = 1
if("Reagent Scan")
if(scanmode == 3)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner))
scanmode = 3
if("Halogen Counter")
if(scanmode == 4)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_engine))
scanmode = 4
if("Honk")
if ( !(last_honk && world.time < last_honk + 20) )
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
last_honk = world.time
if("Gas Scan")
if(scanmode == 5)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_atmos))
scanmode = 5
//MESSENGER/NOTE FUNCTIONS===================================
if ("Edit")
var/n = input(U, "Please enter message", name, notehtml) as message
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
if (mode == 1)
note = replacetext(n, "\n", "<BR>")
notehtml = n
else
U << browse(null, "window=pda")
return
if("Toggle Messenger")
toff = !toff
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
silent = !silent
if("Clear")//Clears messages
tnote = null
if("Ringtone")
var/t = input(U, "Please enter new ringtone", name, ttone) as text
if (in_range(src, U) && loc == U)
if (t)
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
U << "The PDA softly beeps."
U << browse(null, "window=pda")
else
t = copytext(sanitize(t), 1, 20)
ttone = t
else
U << browse(null, "window=pda")
return
if("Message")
var/obj/item/device/pda/P = locate(href_list["target"])
src.create_message(U, P)
if ("Edit")
var/n = input(U, "Please enter message", name, notehtml) as message
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
if (mode == 1)
note = html_decode(n)
notehtml = note
note = replacetext(note, "\n", "<br>")
else
ui.close()
if("Toggle Messenger")
toff = !toff
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
silent = !silent
if("Clear")//Clears messages
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)
if("Send Honk")//Honk virus
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
if(!isnull(P))
if (!P.toff && cartridge:honk_charges > 0)
cartridge:honk_charges--
U.show_message("\blue Virus sent!", 1)
P.honkamt = (rand(15,20))
active_conversation = null
if(mode==21)
mode=2
if("Ringtone")
var/t = input(U, "Please enter new ringtone", name, ttone) as text
if (in_range(src, U) && loc == U)
if (t)
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
U << "The PDA softly beeps."
ui.close()
else
U << "PDA not found."
t = copytext(sanitize(t), 1, 20)
ttone = t
else
ui.close()
return 0
if("Message")
var/obj/item/device/pda/P = locate(href_list["target"])
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(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
U.show_message("\blue Virus sent!", 1)
P.honkamt = (rand(15,20))
else
U << browse(null, "window=pda")
return
if("Send Silence")//Silent virus
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge:mime_charges > 0)
cartridge:mime_charges--
U.show_message("\blue Virus sent!", 1)
P.silent = 1
P.ttone = "silence"
else
U << "PDA not found."
U << "PDA not found."
else
ui.close()
return 0
if("Send Silence")//Silent virus
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
U.show_message("\blue Virus sent!", 1)
P.silent = 1
P.ttone = "silence"
else
U << browse(null, "window=pda")
return
U << "PDA not found."
else
ui.close()
return 0
//SYNDICATE FUNCTIONS===================================
if("Toggle Door")
if(cartridge && cartridge.access_remote_door)
for(var/obj/machinery/door/poddoor/M in world)
if(M.id == cartridge.remote_door_id)
if(M.density)
M.open()
else
M.close()
if("Toggle Door")
if(cartridge && cartridge.access_remote_door)
for(var/obj/machinery/door/poddoor/M in world)
if(M.id == cartridge.remote_door_id)
if(M.density)
M.open()
else
M.close()
if("Detonate")//Detonate PDA
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge:shock_charges > 0)
cartridge:shock_charges--
if("Detonate")//Detonate PDA
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"])
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
var/difficulty = 0
var/difficulty = 0
if(P.cartridge)
difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
else
difficulty += 2
if(P.cartridge)
difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
else
difficulty += 2
if(prob(difficulty * 12) || (P.hidden_uplink))
U.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3))
U.show_message("\red Energy feeds back into your [src]!", 1)
U << browse(null, "window=pda")
explode()
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
else
U.show_message("\blue Success!", 1)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1)
P.explode()
else
U << "PDA not found."
if(prob(difficulty * 12) || (P.hidden_uplink))
U.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3))
U.show_message("\red Energy feeds back into your [src]!", 1)
ui.close()
explode()
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
else
U.show_message("\blue Success!", 1)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1)
P.explode()
else
U.unset_machine()
U << browse(null, "window=pda")
return
U << "PDA not found."
else
U.unset_machine()
ui.close()
return 0
//pAI FUNCTIONS===================================
if("pai")
switch(href_list["option"])
if("1") // Configure pAI device
pai.attack_self(U)
if("2") // Eject pAI device
var/turf/T = get_turf_or_move(src.loc)
if(T)
pai.loc = T
if("pai")
switch(href_list["option"])
if("1") // Configure pAI device
pai.attack_self(U)
if("2") // Eject pAI device
var/turf/T = get_turf_or_move(src.loc)
if(T)
pai.loc = T
pai = null
//LINK FUNCTIONS===================================
else//Cartridge menu linking
mode = text2num(href_list["choice"])
else
mode = text2num(href_list["choice"])
if(cartridge)
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===================================
if (mode == 2||mode == 21)//To clear message overlays.
overlays.Cut()
newmessage = 0
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.unset_machine()
U << browse(null, "window=pda")
return
return 1 // return 1 tells it to refresh the UI in NanoUI
/obj/item/device/pda/proc/remove_id()
if (id)
@@ -793,7 +774,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!can_use())
return
last_text = world.time
// check if telecomms I/O route 1459 is stable
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
@@ -823,19 +804,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "ERROR: Cannot reach recepient."
return
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]")))
if(!conversations.Find("\ref[P]"))
conversations.Add("\ref[P]")
if(!P.conversations.Find("\ref[src]"))
P.conversations.Add("\ref[src]")
tnote += "<i><b>&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
var/who = src.owner
if(prob(50))
who = P:owner
who = P.owner
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
@@ -848,12 +834,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
L = get(P, /mob/living/silicon)
if(L)
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
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]")
P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
P.newmessage = 1
else
U << "<span class='notice'>ERROR: Messaging server is not responding.</span>"
@@ -927,8 +918,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.drop_item()
cartridge.loc = src
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
nanomanager.update_uis(src) // update all UIs attached to src
if(cartridge.radio)
cartridge.radio.hostpda = src
cartridge.radio.hostpda = src
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
@@ -953,7 +945,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
C.loc = src
pai = C
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))
var/obj/item/weapon/pen/O = locate() in src
if(O)
@@ -1041,9 +1033,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(5)
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
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
@@ -1134,8 +1123,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
if ((istype(M, /mob/living/carbon/human) && (M.real_name != src.owner) && (istype(src.cartridge, /obj/item/weapon/cartridge/clown))))
if (src.cartridge:honk_charges < 5)
src.cartridge:honk_charges++
if (src.cartridge.charges < 5)
src.cartridge.charges++
M.stop_pulling()
M << "\blue You slipped on the PDA!"

File diff suppressed because it is too large Load Diff

View File

@@ -31,15 +31,6 @@
frequency.post_signal(src, signal, filter = s_filter)
proc/print_to_host(var/text)
if (isnull(src.hostpda))
return
src.hostpda.cart = text
for (var/mob/M in viewers(1, src.hostpda.loc))
if (M.client && M.machine == src.hostpda)
src.hostpda.cartridge.unlock()
return
proc/generate_menu()
@@ -107,7 +98,6 @@
if("summon")
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(PDA) , s_filter = RADIO_SECBOT)
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = RADIO_SECBOT)
PDA.cartridge.unlock()
/obj/item/radio/integrated/mule
var/list/botlist = null // list of bots
@@ -163,7 +153,6 @@
Topic(href, href_list)
..()
var/obj/item/device/pda/PDA = src.hostpda
var/cmd = "command"
if(active) cmd = "command [active.suffix]"
@@ -208,7 +197,6 @@
if("stop", "go", "home")
post_signal(control_freq, cmd, href_list["op"], s_filter = RADIO_MULEBOT)
post_signal(control_freq, cmd, "bot_status", s_filter = RADIO_MULEBOT)
PDA.cartridge.unlock()

View File

@@ -11,73 +11,75 @@
origin_tech = "syndicate=4;magnets=4"
var/can_use = 1
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()
disrupt()
/obj/item/device/chameleon/dropped()
disrupt()
attack_self()
toggle()
/obj/item/device/chameleon/equipped()
disrupt()
afterattack(atom/target, mob/user, proximity)
if(!proximity) return
if(istype(target,/obj/item))
playsound(src, 'sound/weapons/flash.ogg', 100, 1, 1)
/obj/item/device/chameleon/attack_self()
toggle()
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return
if(!active_dummy)
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]."
saved_item = target.type
saved_icon = target.icon
saved_icon_state = target.icon_state
saved_overlays = target.overlays
proc/toggle()
if(!can_use || !saved_item) return
if(active_dummy)
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
for(var/atom/movable/A in active_dummy)
A.loc = active_dummy.loc
if(ismob(A))
if(A:client)
A:client:eye = A
/obj/item/device/chameleon/proc/toggle()
if(!can_use || !saved_item) return
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
del(active_dummy)
active_dummy = null
usr << "\blue You deactivate the [src]."
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
spawn(8) T.delete()
else
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/O = new saved_item(src)
if(!O) return
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, src)
del(O)
usr << "\blue You activate the [src]."
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
spawn(8) T.delete()
/obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
if(active_dummy)
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.attach(src)
spark_system.start()
eject_all()
if(delete_dummy)
del(active_dummy)
active_dummy = null
usr << "\blue You deactivate the [src]."
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
spawn(8) T.delete()
else
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
var/obj/O = new saved_item(src)
if(!O) return
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.name = O.name
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)
usr << "\blue You activate the [src]."
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
spawn(8) T.delete()
proc/disrupt()
if(active_dummy)
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.attach(src)
spark_system.start()
for(var/atom/movable/A in active_dummy)
A.loc = active_dummy.loc
if(ismob(A))
if(A:client)
A:client:eye = A
del(active_dummy)
active_dummy = null
can_use = 0
spawn(100) can_use = 1
active_dummy = null
can_use = 0
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
name = ""
@@ -86,38 +88,58 @@
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
attackby()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(usr.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src,direction)
return
/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)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
/obj/effect/dummy/chameleon/attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
/obj/effect/dummy/chameleon/ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
/obj/effect/dummy/chameleon/bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
/obj/effect/dummy/chameleon/relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(user.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src, direction)
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]"))
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.")
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.")
else if (M.getBrainLoss() >= 60)
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/list/ItemList // Parsed list of items
var/uses // Numbers of crystals
var/nanoui_items[0]
// List of items not to shove in their hands.
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
@@ -25,12 +26,41 @@ A list of items and costs is stored under the datum of every game mode, alongsid
items = replacetext(item_data)
ItemList = text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
//Halfassed fix for href exploit ~Z
nanoui_items = generate_nanoui_items()
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
var/list/O = text2list(D, ":")
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!
/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
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 == 1) //If there is one item, it's probably a title
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")
/obj/item/device/uplink/Topic(href, href_list)
if (href_list["buy_item"])
if(href_list["buy_item"] == "random")
var/boughtItem = chooseRandomItem()
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 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'>"
dat += src.generate_menu()
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
dat += "</font></body>"
user << browse(dat, "window=hidden")
onclose(user, "hidden")
return
data["crystals"] = uses
data["nano_items"] = nanoui_items
data["welcome"] = welcome
// 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, "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.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
return
if (!( istype(usr, /mob/living/carbon/human)))
return 0
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src)
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")
ui.close()
return 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)
purchase_log += "[usr] ([usr.ckey]) bought [I]."
interact(usr)
return
return 1
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
@@ -388,4 +434,4 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/radio/headset/uplink/New()
..()
hidden_uplink = new(src)
hidden_uplink.uses = 10
hidden_uplink.uses = 10

View File

@@ -5,7 +5,7 @@
***********************************************************************/
//Might want to move this into several files later but for now it works here
/obj/item/borg/stun
name = "Electrified Arm"
name = "electrified arm"
icon = 'icons/obj/decals.dmi'
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)
/obj/item/borg/overdrive
name = "Overdrive"
name = "overdrive"
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
@@ -40,27 +40,27 @@
/obj/item/borg/sight/xray
name = "X-ray Vision"
name = "\proper x-ray Vision"
sight_mode = BORGXRAY
/obj/item/borg/sight/thermal
name = "Thermal Vision"
name = "\proper thermal vision"
sight_mode = BORGTHERM
/obj/item/borg/sight/meson
name = "Meson Vision"
name = "\proper meson vision"
sight_mode = BORGMESON
/obj/item/borg/sight/hud
name = "Hud"
name = "hud"
var/obj/item/clothing/glasses/hud/hud = null
/obj/item/borg/sight/hud/med
name = "Medical Hud"
name = "medical hud"
New()
@@ -70,7 +70,7 @@
/obj/item/borg/sight/hud/sec
name = "Security Hud"
name = "security hud"
New()

View File

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

View File

@@ -1,5 +1,5 @@
/obj/item/stack/rods
name = "metal rods"
name = "metal rod"
desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod"
icon_state = "rods"
@@ -63,4 +63,4 @@
usr << "\blue You assemble a grille"
F.add_fingerprint(usr)
use(2)
return
return

View File

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

View File

@@ -18,7 +18,7 @@ Mineral Sheets
* 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."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
/obj/item/stack/tile/plasteel
name = "floor tiles"
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
@@ -42,4 +42,4 @@
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
return

View File

@@ -9,7 +9,7 @@
* Grass
*/
/obj/item/stack/tile/grass
name = "grass tiles"
name = "grass tile"
singular_name = "grass floor tile"
desc = "A patch of grass like they often use on golf courses"
icon_state = "tile_grass"
@@ -26,7 +26,7 @@
* Wood
*/
/obj/item/stack/tile/wood
name = "wood floor tiles"
name = "wood floor tile"
singular_name = "wood floor tile"
desc = "an easy to fit wood floor tile"
icon_state = "tile-wood"
@@ -52,4 +52,4 @@
throw_speed = 5
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
max_amount = 60
max_amount = 60

View File

@@ -7,7 +7,7 @@ AI MODULES
// AI module
/obj/item/weapon/aiModule
name = "AI Module"
name = "\improper AI module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
@@ -87,7 +87,7 @@ AI MODULES
/******************** Safeguard ********************/
/obj/item/weapon/aiModule/safeguard
name = "'Safeguard' AI Module"
name = "\improper 'Safeguard' AI module"
var/targetName = ""
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"
@@ -116,7 +116,7 @@ AI MODULES
/******************** OneHuman ********************/
/obj/item/weapon/aiModule/oneHuman
name = "'OneHuman' AI Module"
name = "\improper 'OneHuman' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is human.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
@@ -148,7 +148,7 @@ AI MODULES
/******************** 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.'"
origin_tech = "programming=3;materials=4" //made of gold
@@ -196,7 +196,7 @@ AI MODULES
/******************** 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.'"
origin_tech = "programming=3;biotech=2;materials=4"
@@ -212,7 +212,7 @@ AI MODULES
/******************** OxygenIsToxicToHumans ********************/
/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.'"
origin_tech = "programming=3;biotech=2;materials=4"
@@ -249,7 +249,7 @@ AI MODULES
/****************** New Freeform ******************/
/obj/item/weapon/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "'Freeform' AI Module"
name = "\improper 'Freeform' AI module"
var/newFreeFormLaw = "freeform"
var/lawpos = 15
desc = "A 'freeform' AI module: '<freeform>'"
@@ -284,7 +284,7 @@ AI MODULES
/******************** Reset ********************/
/obj/item/weapon/aiModule/reset
name = "'Reset' AI Module"
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core three.'"
origin_tech = "programming=3;materials=4"
@@ -301,7 +301,7 @@ AI MODULES
/******************** Purge ********************/
/obj/item/weapon/aiModule/purge // -- TLE
name = "'Purge' AI Module"
name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
origin_tech = "programming=3;materials=6"
@@ -317,7 +317,7 @@ AI MODULES
/******************** Asimov ********************/
/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.'"
origin_tech = "programming=3;materials=4"
@@ -351,7 +351,7 @@ AI MODULES
/******************** Corporate ********************/
/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.'"
origin_tech = "programming=3;materials=4"
@@ -368,7 +368,7 @@ AI MODULES
/****************** P.A.L.A.D.I.N. **************/
/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.'"
origin_tech = "programming=3;materials=6"
@@ -385,7 +385,7 @@ AI MODULES
/****************** T.Y.R.A.N.T. *****************/
/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.'"
origin_tech = "programming=3;materials=6;syndicate=2"
@@ -402,7 +402,7 @@ AI MODULES
/******************** Freeform Core ******************/
/obj/item/weapon/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
name = "'Freeform' Core AI Module"
name = "\improper 'Freeform' core AI module"
var/newFreeFormLaw = ""
desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=3;materials=6"
@@ -427,7 +427,7 @@ AI MODULES
..()
/obj/item/weapon/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
name = "Hacked AI Module"
name = "hacked AI module"
var/newFreeFormLaw = ""
desc = "A hacked AI law module: '<freeform>'"
origin_tech = "programming=3;materials=6;syndicate=7"
@@ -459,7 +459,7 @@ AI MODULES
/******************** Robocop ********************/
/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.'"
origin_tech = "programming=4"
@@ -476,7 +476,7 @@ AI MODULES
/******************** Antimov ********************/
/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.'"
origin_tech = "programming=4"

View File

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

View File

@@ -157,14 +157,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
new type_butt(location)
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)
die()
return
if(location)
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)
if(lit == 1)
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)
new type_butt(T)
processing_objects.Remove(src)
del(src)
die()
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 //
////////////
/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!"
icon_state = "cigaroff"
icon_on = "cigaron"
@@ -206,14 +207,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
chem_volume = 20
/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."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
/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."
icon_state = "cigar2off"
icon_on = "cigar2on"
@@ -229,6 +230,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = 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
name = "cigar butt"
desc = "A manky old cigar butt."
@@ -330,7 +337,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/lit = 0
/obj/item/weapon/lighter/zippo
name = "Zippo lighter"
name = "\improper Zippo lighter"
desc = "The zippo."
icon_state = "zippo"
item_state = "zippo"

View File

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

View File

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

View File

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

View File

@@ -179,7 +179,7 @@
* Bucher's cleaver
*/
/obj/item/weapon/butch
name = "butcher's Cleaver"
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
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"
/*
/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."
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
@@ -77,43 +78,44 @@ var/global/list/cached_icons = list()
w_class = 3.0
/obj/item/weapon/paint/red
name = "Red paint"
name = "red paint"
color = "FF0000"
icon_state = "paint_red"
/obj/item/weapon/paint/green
name = "Green paint"
name = "green paint"
color = "00FF00"
icon_state = "paint_green"
/obj/item/weapon/paint/blue
name = "Blue paint"
name = "blue paint"
color = "0000FF"
icon_state = "paint_blue"
/obj/item/weapon/paint/yellow
name = "Yellow paint"
name = "yellow paint"
color = "FFFF00"
icon_state = "paint_yellow"
/obj/item/weapon/paint/violet
name = "Violet paint"
name = "violet paint"
color = "FF00FF"
icon_state = "paint_violet"
/obj/item/weapon/paint/black
name = "Black paint"
name = "black paint"
color = "333333"
icon_state = "paint_black"
/obj/item/weapon/paint/white
name = "White paint"
name = "white paint"
color = "FFFFFF"
icon_state = "paint_white"
/obj/item/weapon/paint/anycolor
name = "Any color"
gender= PLURAL
name = "any color"
icon_state = "paint_neutral"
attack_self(mob/user as mob)
@@ -156,7 +158,8 @@ var/global/list/cached_icons = list()
return
/obj/item/weapon/paint/paint_remover
name = "Paint remover"
gender = PLURAL
name = "paint remover"
icon_state = "paint_neutral"
afterattack(turf/target, mob/user as mob)

View File

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

View File

@@ -23,7 +23,7 @@
*/
/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."
origin_tech = "bluespace=4"
icon_state = "holdingpack"
@@ -84,7 +84,7 @@
icon_state = "cultpack"
/obj/item/weapon/storage/backpack/clown
name = "Giggles Von Honkerton"
name = "Giggles von Honkerton"
desc = "It's a backpack made by Honk! Co."
icon_state = "clownpack"
item_state = "clownpack"

View File

@@ -16,8 +16,8 @@
/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/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/cans/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)

View File

@@ -59,7 +59,7 @@
new /obj/item/clothing/gloves/latex(src)
/obj/item/weapon/storage/box/masks
name = "sterile masks"
name = "box of sterile masks"
desc = "This box contains masks of sterility."
icon_state = "sterile"
@@ -75,7 +75,7 @@
/obj/item/weapon/storage/box/syringes
name = "syringes"
name = "box of syringes"
desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
@@ -91,7 +91,7 @@
new /obj/item/weapon/reagent_containers/syringe( src )
/obj/item/weapon/storage/box/beakers
name = "beaker box"
name = "box of beakers"
icon_state = "beaker"
New()
@@ -105,7 +105,7 @@
new /obj/item/weapon/reagent_containers/glass/beaker( src )
/obj/item/weapon/storage/box/injectors
name = "\improper DNA injectors"
name = "box of DNA injectors"
desc = "This box contains injectors it seems."
New()
@@ -150,7 +150,7 @@
new /obj/item/weapon/grenade/flashbang(src)
/obj/item/weapon/storage/box/emps
name = "emp grenades"
name = "box of emp grenades"
desc = "A box with 5 emp grenades."
icon_state = "flashbang"
@@ -164,7 +164,7 @@
/obj/item/weapon/storage/box/trackimp
name = "tracking implant kit"
name = "boxed tracking implant kit"
desc = "Box full of scum-bag tracking utensils."
icon_state = "implant"
@@ -179,7 +179,7 @@
new /obj/item/weapon/locator(src)
/obj/item/weapon/storage/box/chemimp
name = "chemical implant kit"
name = "boxed chemical implant kit"
desc = "Box of stuff used to implant chemicals."
icon_state = "implant"
@@ -194,8 +194,9 @@
new /obj/item/weapon/implantpad(src)
/obj/item/weapon/storage/box/rxglasses
name = "prescription glasses"
name = "box of prescription glasses"
desc = "This box contains nerd glasses."
icon_state = "glasses"
@@ -319,7 +320,7 @@
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src)
/obj/item/weapon/storage/box/ids
name = "spare IDs"
name = "box of spare IDs"
desc = "Has so many empty IDs."
icon_state = "id"
@@ -333,8 +334,9 @@
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
/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."
icon_state = "pda"
@@ -350,7 +352,7 @@
/obj/item/weapon/storage/box/handcuffs
name = "spare handcuffs"
name = "box of spare handcuffs"
desc = "A box full of handcuffs."
icon_state = "handcuff"
@@ -364,8 +366,9 @@
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
/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>."
icon_state = "mousetraps"
@@ -439,7 +442,7 @@
new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
/obj/item/weapon/storage/box/lights
name = "replacement bulbs"
name = "box of replacement bulbs"
icon = 'icons/obj/storage.dmi'
icon_state = "light"
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)
/obj/item/weapon/storage/box/lights/tubes
name = "replacement tubes"
name = "box of replacement tubes"
icon_state = "lighttube"
/obj/item/weapon/storage/box/lights/tubes/New()
@@ -465,7 +468,7 @@
new /obj/item/weapon/light/tube(src)
/obj/item/weapon/storage/box/lights/mixed
name = "replacement lights"
name = "box of replacement lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/mixed/New()
@@ -473,4 +476,4 @@
for(var/i = 0; i < 14; i++)
new /obj/item/weapon/light/tube(src)
for(var/i = 0; i < 7; i++)
new /obj/item/weapon/light/bulb(src)
new /obj/item/weapon/light/bulb(src)

View File

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

View File

@@ -149,7 +149,7 @@
return
/obj/item/weapon/storage/pill_bottle/kelotane
name = "Pill bottle (kelotane)"
name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns."
New()
@@ -163,7 +163,7 @@
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/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."
New()
@@ -177,7 +177,7 @@
new /obj/item/weapon/reagent_containers/pill/antitox( src )
/obj/item/weapon/storage/pill_bottle/inaprovaline
name = "Pill bottle (inaprovaline)"
name = "bottle of inaprovaline pills"
desc = "Contains pills used to stabilize patients."
New()

View File

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

View File

@@ -69,12 +69,12 @@
return
/obj/item/weapon/storage/box/syndie_kit
name = "Box"
name = "box"
desc = "A sleek, sturdy box"
icon_state = "box_of_doom"
/obj/item/weapon/storage/box/syndie_kit/imp_freedom
name = "Freedom Implant (with injector)"
name = "boxed freedom implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_freedom/New()
..()
@@ -100,7 +100,7 @@
return
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
name = "Uplink Implant (with injector)"
name = "boxed uplink implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_uplink/New()
..()
@@ -110,7 +110,7 @@
return
/obj/item/weapon/storage/box/syndie_kit/space
name = "Space Suit and Helmet"
name = "boxed space suit and helmet"
/obj/item/weapon/storage/box/syndie_kit/space/New()
..()

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