mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 17:15:25 +01:00
Merge remote-tracking branch 'upstream/dev'
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
#include "code\controllers\autotransfer.dm"
|
||||
#include "code\controllers\configuration.dm"
|
||||
#include "code\controllers\failsafe.dm"
|
||||
#include "code\controllers\hooks-defs.dm"
|
||||
#include "code\controllers\hooks.dm"
|
||||
#include "code\controllers\lighting_controller.dm"
|
||||
#include "code\controllers\master_controller.dm"
|
||||
@@ -178,8 +179,13 @@
|
||||
#include "code\game\area\areas.dm"
|
||||
#include "code\game\area\Space Station 13 areas.dm"
|
||||
#include "code\game\dna\dna2.dm"
|
||||
#include "code\game\dna\dna2_domutcheck.dm"
|
||||
#include "code\game\dna\dna2_helpers.dm"
|
||||
#include "code\game\dna\dna_modifier.dm"
|
||||
#include "code\game\dna\genes\disabilities.dm"
|
||||
#include "code\game\dna\genes\gene.dm"
|
||||
#include "code\game\dna\genes\monkey.dm"
|
||||
#include "code\game\dna\genes\powers.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -439,6 +445,7 @@
|
||||
#include "code\game\objects\effects\decals\Cleanable\humans.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\misc.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\robots.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\tracks.dm"
|
||||
#include "code\game\objects\effects\spawners\bombspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\gibspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\vaultspawner.dm"
|
||||
@@ -612,6 +619,7 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm"
|
||||
@@ -781,6 +789,7 @@
|
||||
#include "code\modules\economy\TradeDestinations.dm"
|
||||
#include "code\modules\events\alien_infestation.dm"
|
||||
#include "code\modules\events\blob.dm"
|
||||
#include "code\modules\events\borers.dm"
|
||||
#include "code\modules\events\brand_intelligence.dm"
|
||||
#include "code\modules\events\carp_migration.dm"
|
||||
#include "code\modules\events\comms_blackout.dm"
|
||||
@@ -1100,6 +1109,7 @@
|
||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pneumatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\rocket.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\shotgun.dm"
|
||||
#include "code\modules\projectiles\projectile\animate.dm"
|
||||
#include "code\modules\projectiles\projectile\beams.dm"
|
||||
@@ -1130,6 +1140,7 @@
|
||||
#include "code\modules\reagents\reagent_containers\robodropper.dm"
|
||||
#include "code\modules\reagents\reagent_containers\spray.dm"
|
||||
#include "code\modules\reagents\reagent_containers\syringes.dm"
|
||||
#include "code\modules\reagents\reagent_containers\food\cans.dm"
|
||||
#include "code\modules\reagents\reagent_containers\food\condiment.dm"
|
||||
#include "code\modules\reagents\reagent_containers\food\drinks.dm"
|
||||
#include "code\modules\reagents\reagent_containers\food\snacks.dm"
|
||||
@@ -1301,6 +1312,7 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
#include "code\WorkInProgress\Chinsky\ashtray.dm"
|
||||
#include "code\WorkInProgress\Chinsky\guestpass.dm"
|
||||
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
|
||||
#include "code\WorkInProgress\kilakk\fax.dm"
|
||||
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
||||
|
||||
@@ -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, \
|
||||
|
||||
@@ -17,35 +17,34 @@
|
||||
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (health < 1)
|
||||
return
|
||||
if (istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
|
||||
if(user)
|
||||
if (contents.len >= max_butts)
|
||||
user << "This ashtray is full."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
|
||||
if (contents.len >= max_butts)
|
||||
user << "This ashtray is full."
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
|
||||
if (istype(W,/obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/cig = W
|
||||
if (cig.lit == 1)
|
||||
src.visible_message("[user] crushes [cig] in [src], putting it out.")
|
||||
cig.smoketime = 0
|
||||
processing_objects.Remove(cig)
|
||||
var/obj/item/butt = new cig.type_butt(src)
|
||||
cig.transfer_fingerprints_to(butt)
|
||||
del(cig)
|
||||
else if (cig.lit == 0)
|
||||
if(istype(cig, /obj/item/weapon/match))
|
||||
user << "You place [cig] in [src] without even lighting it. Why would you do that?"
|
||||
else
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
else if (cig.lit == -1)
|
||||
src.visible_message("[user] places [cig] in [src].")
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
if (contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = empty_desc + " It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
icon_state = icon_half
|
||||
desc = empty_desc + " It's half-filled."
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
|
||||
src.visible_message("[user] places [W] in [src].")
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
if (contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = empty_desc + " It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
icon_state = icon_half
|
||||
desc = empty_desc + " It's half-filled."
|
||||
else
|
||||
health = max(0,health - W.force)
|
||||
user << "You hit [src] with [W]."
|
||||
@@ -62,7 +61,6 @@
|
||||
if (contents.len)
|
||||
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
|
||||
for (var/obj/item/clothing/mask/cigarette/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
icon_state = icon_empty
|
||||
return ..()
|
||||
@@ -70,7 +68,6 @@
|
||||
/obj/item/ashtray/proc/die()
|
||||
src.visible_message("\red [src] shatters spilling its contents!")
|
||||
for (var/obj/item/clothing/mask/cigarette/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
icon_state = icon_broken
|
||||
|
||||
|
||||
@@ -0,0 +1,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
|
||||
+8
-8
@@ -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
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(client_check && !M.client)
|
||||
L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
|
||||
L |= recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
|
||||
continue
|
||||
if(sight_check && !isInSight(A, O))
|
||||
continue
|
||||
@@ -155,7 +155,7 @@
|
||||
L |= A
|
||||
|
||||
if(isobj(A) || ismob(A))
|
||||
L = recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
|
||||
L |= recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check, include_radio)
|
||||
return L
|
||||
|
||||
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
|
||||
@@ -182,7 +182,7 @@
|
||||
hear += A
|
||||
|
||||
if(isobj(A) || ismob(A))
|
||||
hear = recursive_mob_check(A, hear, 3, 1, 0, 1)
|
||||
hear |= recursive_mob_check(A, hear, 3, 1, 0, 1)
|
||||
|
||||
return hear
|
||||
|
||||
|
||||
+11
-1
@@ -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])
|
||||
@@ -164,6 +164,19 @@ proc/tg_list2text(list/list, glue=",")
|
||||
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)
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
RestrainedClickOn(A)
|
||||
else
|
||||
*/
|
||||
A.add_hiddenprint(src)
|
||||
A.attack_ai(src)
|
||||
|
||||
/*
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
// Cyborgs have no range-checking unless there is item use
|
||||
if(!W)
|
||||
A.add_hiddenprint(src)
|
||||
A.attack_robot(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/log_runtime = 0 // logs world.log to a file
|
||||
var/sql_enabled = 1 // for sql switching
|
||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
@@ -62,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
|
||||
|
||||
@@ -242,6 +246,9 @@
|
||||
if ("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
|
||||
if ("log_runtime")
|
||||
config.log_runtime = 1
|
||||
|
||||
if("allow_admin_ooccolor")
|
||||
config.allow_admin_ooccolor = 1
|
||||
|
||||
@@ -455,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]."
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Startup hook.
|
||||
* Called in world.dm when the server starts.
|
||||
*/
|
||||
/hook/startup
|
||||
|
||||
/**
|
||||
* Roundstart hook.
|
||||
* Called in gameticker.dm when a round starts.
|
||||
*/
|
||||
/hook/roundstart
|
||||
|
||||
/**
|
||||
* Roundend hook.
|
||||
* Called in gameticker.dm when a round ends.
|
||||
*/
|
||||
/hook/roundend
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
+183
-111
@@ -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"
|
||||
|
||||
@@ -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."
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
+49
-28
@@ -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.
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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
|
||||
|
||||
+110
-98
@@ -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)
|
||||
@@ -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
|
||||
@@ -624,10 +643,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 +672,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 +703,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 +724,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 +732,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 +781,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 +823,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 +836,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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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]"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ Implants;
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind)
|
||||
// NT relation option
|
||||
var/special_role = man.mind.special_role
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate")
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Vox Raider")
|
||||
continue //NT intelligence ruled out possiblity that those are too classy to pretend to be a crew.
|
||||
if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
|
||||
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
var/agent_number = 1
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
@@ -137,6 +136,10 @@
|
||||
spawnpos = 1
|
||||
synd_mind.current.loc = synd_spawn[spawnpos]
|
||||
|
||||
synd_mind.current.real_name = "[syndicate_name()] Operative" // placeholder while we get their actual name
|
||||
spawn(0)
|
||||
NukeNameAssign(synd_mind)
|
||||
|
||||
forge_syndicate_objectives(synd_mind)
|
||||
greet_syndicate(synd_mind)
|
||||
equip_syndicate(synd_mind.current)
|
||||
@@ -144,9 +147,7 @@
|
||||
if(!leader_selected)
|
||||
prepare_syndicate_leader(synd_mind, nuke_code)
|
||||
leader_selected = 1
|
||||
else
|
||||
synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]"
|
||||
agent_number++
|
||||
|
||||
spawnpos++
|
||||
update_synd_icons_added(synd_mind)
|
||||
|
||||
@@ -165,10 +166,6 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||
// var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||
spawn(1)
|
||||
// NukeNameAssign(nukelastname(synd_mind.current),syndicates) //allows time for the rest of the syndies to be chosen
|
||||
synd_mind.current.real_name = "[pick(first_names_male)] [pick(last_names)]"
|
||||
if (nuke_code)
|
||||
synd_mind.store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
|
||||
synd_mind.current << "The nuclear authorization code is: <B>[nuke_code]</B>"
|
||||
@@ -370,12 +367,14 @@
|
||||
|
||||
return newname
|
||||
*/
|
||||
/proc/NukeNameAssign(var/lastname,var/list/syndicates)
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
switch(synd_mind.current.gender)
|
||||
if(MALE)
|
||||
synd_mind.name = "[pick(first_names_male)] [pick(last_names)]"
|
||||
if(FEMALE)
|
||||
synd_mind.name = "[pick(first_names_female)] [pick(last_names)]"
|
||||
synd_mind.current.real_name = synd_mind.name
|
||||
return
|
||||
|
||||
/proc/NukeNameAssign(var/datum/mind/synd_mind)
|
||||
var/choose_name = input(synd_mind.current, "You are a [syndicate_name()] agent! What is your name?", "Choose a name") as text
|
||||
|
||||
if(!choose_name)
|
||||
return
|
||||
|
||||
else
|
||||
synd_mind.current.name = choose_name
|
||||
synd_mind.current.real_name = choose_name
|
||||
return
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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>)")
|
||||
|
||||
@@ -250,6 +250,9 @@
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
|
||||
dat += text("Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)<BR><HR>")
|
||||
|
||||
if(occupant.has_brain_worms())
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<BR/>"
|
||||
|
||||
if(occupant.vessel)
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -296,19 +296,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)
|
||||
src.anchored = 1
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -443,7 +443,6 @@
|
||||
//Sender isn't faking as someone who exists
|
||||
if(isnull(PDARec))
|
||||
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
|
||||
customrecepient.tnote += "<i><b>← From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
|
||||
if (!customrecepient.silent)
|
||||
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, customrecepient.loc))
|
||||
@@ -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>← 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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
@@ -569,6 +569,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 +590,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)
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
if(instant || do_after(user, 50))
|
||||
new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
|
||||
user << "You finish drawing."
|
||||
target.add_fingerprint(user) // Adds their fingerprints to the floor the crayon is drawn on.
|
||||
if(uses)
|
||||
uses--
|
||||
if(!uses)
|
||||
@@ -97,4 +98,4 @@
|
||||
user << "\red You ate your crayon!"
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -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>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
|
||||
@@ -310,6 +319,180 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/* Notes for those wanting to modify this code or even understand it.
|
||||
There are two modes: New UI and a UI already existing.
|
||||
If the UI is new, you define your variables, if the ui already exists if it didn't have variables in data for what you want to add
|
||||
then it won't add it even if you make a data["blahblah"] for it. That's the reason for the = null all over the place, so that.
|
||||
ui.push_data(data) proc has to have the var structure already setup otherwise it can't push the update.
|
||||
|
||||
The exception to the "YOU HAVE TO DEFINE IT" rule is cartridges, we later force
|
||||
the ui to close if a cartridge is inserted so that never will be a problem.
|
||||
So there will never be a time a UI creation causes that to be a problem.
|
||||
*/
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main")
|
||||
var/title = "Personal Data Assistant"
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
|
||||
|
||||
data["owner"] = owner // Who is your daddy...
|
||||
data["ownjob"] = ownjob // ...and what does he do?
|
||||
|
||||
data["mode"] = mode // The current view
|
||||
data["scanmode"] = scanmode // Scanners
|
||||
data["fon"] = fon // Flashlight on?
|
||||
data["pai"] = (isnull(pai) ? 0 : 1) // pAI inserted?
|
||||
data["note"] = note // current pda notes
|
||||
data["silent"] = silent // does the pda make noise when it receives a message?
|
||||
data["toff"] = toff // is the messenger function turned off?
|
||||
data["active_conversation"] = active_conversation // Which conversation are we following right now?
|
||||
|
||||
|
||||
data["idInserted"] = (id ? 1 : 0)
|
||||
data["idLink"] = (id ? text("[id.registered_name], [id.assignment]") : "--------")
|
||||
|
||||
|
||||
if(cartridge)
|
||||
var/cartdata[0]
|
||||
|
||||
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
|
||||
cartdata["name"] = cartridge.name
|
||||
cartdata["access"] = list(\
|
||||
"access_security" = cartridge.access_security,\
|
||||
"access_engine" = cartridge.access_engine,\
|
||||
"access_atmos" = cartridge.access_atmos,\
|
||||
"access_medical" = cartridge.access_medical,\
|
||||
"access_clown" = cartridge.access_clown,\
|
||||
"access_mime" = cartridge.access_mime,\
|
||||
"access_janitor" = cartridge.access_janitor,\
|
||||
"access_quartermaster" = cartridge.access_quartermaster,\
|
||||
"access_hydroponics" = cartridge.access_hydroponics,\
|
||||
"access_reagent_scanner" = cartridge.access_reagent_scanner,\
|
||||
"access_remote_door" = cartridge.access_remote_door,\
|
||||
"access_status_display" = cartridge.access_status_display\
|
||||
)
|
||||
if(isnull(cartridge.radio))
|
||||
cartdata["radio"] = 0
|
||||
else
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
|
||||
cartdata["radio"] = 1
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/signal))
|
||||
cartdata["radio"] = 2
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/mule))
|
||||
cartdata["radio"] = 3
|
||||
|
||||
cartdata["type"] = cartridge.type
|
||||
cartdata["charges"] = cartridge.charges ? cartridge.charges : 0
|
||||
data["cartridge"] = cartdata
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data["stationTime"] = worldtime2text()
|
||||
data["newMessage"] = newmessage
|
||||
|
||||
|
||||
|
||||
var/convopdas[0]
|
||||
var/pdas[0]
|
||||
var/count = 0
|
||||
for (var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||
if (!P.owner||P.toff||P == src||P.hidden) continue
|
||||
if(conversations.Find("\ref[P]"))
|
||||
convopdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "1")))
|
||||
else
|
||||
pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0")))
|
||||
count++
|
||||
|
||||
data["convopdas"] = convopdas
|
||||
data["pdas"] = pdas
|
||||
data["pda_count"] = count
|
||||
|
||||
if(mode==21)
|
||||
data["messagescount"] = tnote.len
|
||||
data["messages"] = tnote
|
||||
else
|
||||
data["messagescount"] = null
|
||||
data["messages"] = null
|
||||
|
||||
var/found = 0
|
||||
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"])
|
||||
found = 1
|
||||
break
|
||||
if(!found)
|
||||
data["convo_name"] = null
|
||||
data["convo_job"] = null
|
||||
|
||||
if(!ui || mode==41)
|
||||
data["manifest"] = data_core.get_manifest_json()
|
||||
|
||||
|
||||
if(!ui || mode==3)
|
||||
var/turf/T = get_turf_or_move(user.loc)
|
||||
if(!isnull(T) || 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(\
|
||||
"pressure" = null,\
|
||||
"nitrogen" = null,\
|
||||
"oxygen" = null,\
|
||||
"carbon_dioxide" = null,\
|
||||
"plasma" = null,\
|
||||
"other" = null,\
|
||||
"temp" = null,\
|
||||
"reading" = 0\
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
else
|
||||
// The UI is already open so push the new data to it
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//NOTE: graphic resources are loaded on client login
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
|
||||
@@ -318,203 +501,21 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(active_uplink_check(user))
|
||||
return
|
||||
|
||||
var/dat = "<html><head><title>Personal Data Assistant</title></head><body bgcolor=\"#808000\"><style>a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}</style>"
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Close'><img src=pda_exit.png> Close</a>"
|
||||
|
||||
if ((!isnull(cartridge)) && (mode == 0))
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><img src=pda_eject.png> Eject [cartridge]</a>"
|
||||
if (mode)
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png> Return</a>"
|
||||
dat += " | <a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Refresh</a>"
|
||||
|
||||
dat += "<br>"
|
||||
|
||||
if (!owner)
|
||||
dat += "Warning: No owner information entered. Please swipe card.<br><br>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Retry</a>"
|
||||
else
|
||||
switch (mode)
|
||||
if (0)
|
||||
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
|
||||
dat += "Owner: [owner], [ownjob]<br>"
|
||||
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
|
||||
dat += text("<br><A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br>")
|
||||
|
||||
dat += "Station Time: [worldtime2text()]"//:[world.time / 100 % 6][world.time / 100 % 10]"
|
||||
|
||||
dat += "<br><br>"
|
||||
|
||||
dat += "<h4>General Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
|
||||
//dat += "<li><a href='byond://?src=\red[src];choice=chatroom'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
|
||||
|
||||
if (cartridge)
|
||||
if (cartridge.access_clown)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><img src=pda_honk.png> Honk Synthesizer</a></li>"
|
||||
if(cartridge.access_status_display)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=42'><img src=pda_status.png> Set Status Display</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_engine)
|
||||
dat += "<h4>Engineering Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=43'><img src=pda_power.png> Power Monitor</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_medical)
|
||||
dat += "<h4>Medical Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=44'><img src=pda_medical.png> Medical Records</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Medical Scan'><img src=pda_scanner.png> [scanmode == 1 ? "Disable" : "Enable"] Medical Scanner</a></li>"
|
||||
dat += "</ul>"
|
||||
if (cartridge.access_security)
|
||||
dat += "<h4>Security Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=46'><img src=pda_cuffs.png> Security Bot Access</a></li>"
|
||||
dat += "</ul>"
|
||||
else dat += "</ul>"
|
||||
if(cartridge.access_quartermaster)
|
||||
dat += "<h4>Quartermaster Functions:</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png> Supply Records</A></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=48'><img src=pda_mule.png> Delivery Bot Control</A></li>"
|
||||
dat += "</ul>"
|
||||
dat += "</ul>"
|
||||
|
||||
dat += "<h4>Utilities</h4>"
|
||||
dat += "<ul>"
|
||||
if (cartridge)
|
||||
if (cartridge.access_janitor)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=49'><img src=pda_bucket.png> Custodial Locator</a></li>"
|
||||
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
|
||||
if (cartridge.access_reagent_scanner)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
|
||||
if (cartridge.access_engine)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png> [scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
|
||||
if (cartridge.access_atmos)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
|
||||
if (cartridge.access_remote_door)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
|
||||
if (pai)
|
||||
if(pai.loc != src)
|
||||
pai = null
|
||||
else
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"
|
||||
dat += "</ul>"
|
||||
|
||||
if (1)
|
||||
dat += "<h4><img src=pda_notes.png> Notekeeper V2.1</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
|
||||
dat += note
|
||||
|
||||
if (2)
|
||||
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png> Ringer: [silent == 1 ? "Off" : "On"]</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png> Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
|
||||
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
|
||||
|
||||
dat += "<ul>"
|
||||
|
||||
var/count = 0
|
||||
|
||||
if (!toff)
|
||||
for (var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||
if (!P.owner||P.toff||P == src||P.hidden) continue
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><img src=pda_boom.png>*Detonate*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><img src=pda_honk.png>*Send Virus*</a>)"
|
||||
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
|
||||
dat += "</li>"
|
||||
count++
|
||||
dat += "</ul>"
|
||||
if (count == 0)
|
||||
dat += "None detected.<br>"
|
||||
|
||||
if(21)
|
||||
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png> Clear Messages</a>"
|
||||
|
||||
dat += "<h4><img src=pda_mail.png> Messages</h4>"
|
||||
|
||||
dat += tnote
|
||||
dat += "<br>"
|
||||
|
||||
if (3)
|
||||
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
|
||||
|
||||
var/turf/T = get_turf_or_move(user.loc)
|
||||
if (isnull(T))
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
|
||||
|
||||
if (total_moles)
|
||||
var/o2_level = environment.oxygen/total_moles
|
||||
var/n2_level = environment.nitrogen/total_moles
|
||||
var/co2_level = environment.carbon_dioxide/total_moles
|
||||
var/plasma_level = environment.toxins/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
|
||||
dat += "Nitrogen: [round(n2_level*100)]%<br>"
|
||||
dat += "Oxygen: [round(o2_level*100)]%<br>"
|
||||
dat += "Carbon Dioxide: [round(co2_level*100)]%<br>"
|
||||
dat += "Plasma: [round(plasma_level*100)]%<br>"
|
||||
if(unknown_level > 0.01)
|
||||
dat += "OTHER: [round(unknown_level)]%<br>"
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
|
||||
if (5)
|
||||
dat += "<h4><img src=pda_chatroom.png> Nanotrasen Relay Chat</h4>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected Channels</h4>: <li>"
|
||||
for(var/datum/chatroom/C in chatrooms)
|
||||
dat += "<a href='byond://?src=\ref[src];pdachannel=[C.name]'>#[html_encode(lowertext(C.name))]"
|
||||
if(C.password != "")
|
||||
dat += " <img src=pda_locked.png>"
|
||||
dat += "</li>"
|
||||
|
||||
if (41) //crew manifest
|
||||
dat += "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||
dat += "Entries cannot be modified from this terminal.<br><br>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(1) // make it monochrome
|
||||
dat += "<br>"
|
||||
|
||||
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
|
||||
dat += cart
|
||||
|
||||
dat += "</body></html>"
|
||||
user << browse(dat, "window=pda;size=400x444;border=1;can_resize=1;can_close=0;can_minimize=0")
|
||||
onclose(user, "pda", src)
|
||||
ui_interact(user) //NanoUI requires this proc
|
||||
return
|
||||
|
||||
/obj/item/device/pda/Topic(href, href_list)
|
||||
if(href_list["cartmenu"] && !isnull(cartridge))
|
||||
cartridge.Topic(href, href_list)
|
||||
return 1
|
||||
if(href_list["radiomenu"] && !isnull(cartridge) && !isnull(cartridge.radio))
|
||||
cartridge.radio.Topic(href, href_list)
|
||||
return 1
|
||||
|
||||
|
||||
..()
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
@@ -531,7 +532,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if("Close")//Self explanatory
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Refresh")//Refresh, goes to the end of the proc.
|
||||
if("Return")//Return
|
||||
@@ -539,11 +540,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
mode = 0
|
||||
else
|
||||
mode = round(mode/10)
|
||||
if(mode==2)
|
||||
active_conversation = null
|
||||
if(mode==4)//Fix for cartridges. Redirects to hub.
|
||||
mode = 0
|
||||
else if(mode >= 40 && mode <= 49)//Fix for cartridges. Redirects to refresh the menu.
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
id_check(U, 1)
|
||||
if("UpdateInfo")
|
||||
@@ -555,6 +557,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
cartridge.loc = T
|
||||
ui.close()
|
||||
mode = 0
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
@@ -623,60 +627,85 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
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
|
||||
note = html_decode(n)
|
||||
notehtml = note
|
||||
note = replacetext(note, "\n", "<br>")
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
ui.close()
|
||||
if("Toggle Messenger")
|
||||
toff = !toff
|
||||
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
|
||||
silent = !silent
|
||||
if("Clear")//Clears messages
|
||||
tnote = null
|
||||
if(href_list["option"] == "All")
|
||||
tnote.Cut()
|
||||
conversations.Cut()
|
||||
if(href_list["option"] == "Convo")
|
||||
var/new_tnote[0]
|
||||
for(var/i in tnote)
|
||||
if(i["target"] != active_conversation)
|
||||
new_tnote[++new_tnote.len] = i
|
||||
tnote = new_tnote
|
||||
conversations.Remove(active_conversation)
|
||||
|
||||
active_conversation = null
|
||||
if(mode==21)
|
||||
mode=2
|
||||
|
||||
if("Ringtone")
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
|
||||
U << "The PDA softly beeps."
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
else
|
||||
t = copytext(sanitize(t), 1, 20)
|
||||
ttone = t
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Message")
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
src.create_message(U, P)
|
||||
if(mode == 2)
|
||||
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:honk_charges > 0)
|
||||
cartridge:honk_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
if("Send Silence")//Silent virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:mime_charges > 0)
|
||||
cartridge:mime_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
|
||||
@@ -695,8 +724,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:shock_charges > 0)
|
||||
cartridge:shock_charges--
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
|
||||
var/difficulty = 0
|
||||
|
||||
@@ -713,7 +742,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
else if (prob(difficulty * 3))
|
||||
U.show_message("\red Energy feeds back into your [src]!", 1)
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
explode()
|
||||
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
|
||||
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
|
||||
@@ -726,7 +755,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U << "PDA not found."
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
//pAI FUNCTIONS===================================
|
||||
@@ -738,33 +767,31 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
if(T)
|
||||
pai.loc = T
|
||||
pai = null
|
||||
|
||||
//LINK FUNCTIONS===================================
|
||||
|
||||
else//Cartridge menu linking
|
||||
else
|
||||
mode = text2num(href_list["choice"])
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if(cartridge)
|
||||
cartridge.mode = mode
|
||||
|
||||
|
||||
else//If not in range or not using the pda.
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
ui.close()
|
||||
return
|
||||
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
overlays.Cut()
|
||||
newmessage = 0
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
if (id)
|
||||
@@ -793,7 +820,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 +850,24 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U << "ERROR: Cannot reach recepient."
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
|
||||
P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]")))
|
||||
if(!conversations.Find("\ref[P]"))
|
||||
conversations.Add("\ref[P]")
|
||||
if(!P.conversations.Find("\ref[src]"))
|
||||
P.conversations.Add("\ref[src]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
who = P.owner
|
||||
for(var/mob/living/silicon/ai/ai in mob_list)
|
||||
// Allows other AIs to intercept the message but the AI won't intercept their own message.
|
||||
if(ai.aiPDA != P && ai.aiPDA != src)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
@@ -848,12 +880,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>"
|
||||
|
||||
@@ -923,12 +960,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
cartridge = C
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
if(ui)
|
||||
ui.close()
|
||||
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
@@ -1042,9 +1082,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]"
|
||||
@@ -1135,8 +1172,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
@@ -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()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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,6 +26,39 @@ 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
|
||||
nanoui_items = generate_nanoui_items()
|
||||
|
||||
/*
|
||||
Built the Items List for use with NanoUI
|
||||
*/
|
||||
|
||||
/obj/item/device/uplink/proc/generate_nanoui_items()
|
||||
var/items_nano[0]
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len != 3) //If it is not an actual item, make a break in the menu.
|
||||
if(O.len == 1) //If there is one item, it's probably a title
|
||||
items_nano[++items_nano.len] = list("Category" = "[O[1]]", "items" = list())
|
||||
continue
|
||||
|
||||
var/path_text = O[1]
|
||||
var/cost = text2num(O[2])
|
||||
|
||||
var/path_obj = text2path(path_text)
|
||||
|
||||
// Because we're using strings, this comes up if item paths change.
|
||||
// Failure to handle this error borks uplinks entirely. -Sayu
|
||||
if(!path_obj)
|
||||
error("Syndicate item is not a valid path: [path_text]")
|
||||
else
|
||||
var/itemname = O[3]
|
||||
items_nano[items_nano.len]["items"] += list(list("Name" = itemname, "Cost" = cost, "obj_path" = path_text))
|
||||
|
||||
return items_nano
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Halfassed fix for href exploit ~Z
|
||||
for(var/D in ItemList)
|
||||
@@ -238,8 +272,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 +341,48 @@ 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/title = "Syndicate Uplink"
|
||||
var/data[0]
|
||||
|
||||
data["crystals"] = uses
|
||||
data["nano_items"] = nanoui_items
|
||||
data["welcome"] = welcome
|
||||
|
||||
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
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
else
|
||||
// The UI is already open so push the new data to it
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
|
||||
/obj/item/device/uplink/hidden/interact(mob/user)
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["lock"])
|
||||
toggle()
|
||||
usr << browse(null, "window=hidden")
|
||||
ui.close()
|
||||
return 1
|
||||
|
||||
if(..(href, href_list) == 1)
|
||||
@@ -347,7 +398,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 +439,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
|
||||
|
||||
@@ -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,13 +175,21 @@ 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 //
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
@@ -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)
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
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/beer( src )
|
||||
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/beer( src )
|
||||
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/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/reagent_containers/food/drinks/cans/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/reagent_containers/food/drinks/cans/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/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/update_icon()
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/obj/structure/closet/secure_closet/guncabinet
|
||||
name = "gun cabinet"
|
||||
req_access = list(access_armory)
|
||||
icon = 'icons/obj/guncabinet.dmi'
|
||||
icon_state = "base"
|
||||
icon_off ="base"
|
||||
icon_broken ="base"
|
||||
icon_locked ="base"
|
||||
icon_closed ="base"
|
||||
icon_opened = "base"
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/toggle()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/update_icon()
|
||||
overlays.Cut()
|
||||
if(opened)
|
||||
overlays += icon(icon,"door_open")
|
||||
else
|
||||
var/lazors = 0
|
||||
var/shottas = 0
|
||||
for (var/obj/item/weapon/gun/G in contents)
|
||||
if (istype(G, /obj/item/weapon/gun/energy))
|
||||
lazors++
|
||||
if (istype(G, /obj/item/weapon/gun/projectile/))
|
||||
shottas++
|
||||
if (lazors || shottas)
|
||||
for (var/i = 0 to 2)
|
||||
var/image/gun = image(icon(src.icon))
|
||||
|
||||
if (lazors > 0 && (shottas <= 0 || prob(50)))
|
||||
lazors--
|
||||
gun.icon_state = "laser"
|
||||
else if (shottas > 0)
|
||||
shottas--
|
||||
gun.icon_state = "projectile"
|
||||
|
||||
gun.pixel_x = i*4
|
||||
overlays += gun
|
||||
|
||||
overlays += icon(src.icon,"door")
|
||||
|
||||
if(broken)
|
||||
overlays += icon(src.icon,"broken")
|
||||
else if (locked)
|
||||
overlays += icon(src.icon,"locked")
|
||||
else
|
||||
overlays += icon(src.icon,"open")
|
||||
@@ -39,9 +39,12 @@
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/under/rank/research_director/rdalt(src)
|
||||
new /obj/item/clothing/under/rank/research_director/dress_rd(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/weapon/cartridge/rd(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/device/radio/headset/heads/rd(src)
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
|
||||
@@ -367,5 +367,6 @@
|
||||
new /obj/item/clothing/shoes/green(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/purple(src)
|
||||
new /obj/item/clothing/shoes/red(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
return
|
||||
|
||||
@@ -174,3 +174,28 @@
|
||||
name = "\improper HYDROPONICS"
|
||||
desc = "A warning sign which reads 'HYDROPONICS'"
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/directions/science
|
||||
name = "\improper Science department"
|
||||
desc = "A direction sign, pointing out which way Science department is."
|
||||
icon_state = "direction_sci"
|
||||
|
||||
/obj/structure/sign/directions/engineering
|
||||
name = "\improper Engineering department"
|
||||
desc = "A direction sign, pointing out which way Engineering department is."
|
||||
icon_state = "direction_eng"
|
||||
|
||||
/obj/structure/sign/directions/security
|
||||
name = "\improper Security department"
|
||||
desc = "A direction sign, pointing out which way Security department is."
|
||||
icon_state = "direction_sec"
|
||||
|
||||
/obj/structure/sign/directions/medical
|
||||
name = "\improper Medical Bay"
|
||||
desc = "A direction sign, pointing out which way Meducal Bay is."
|
||||
icon_state = "direction_med"
|
||||
|
||||
/obj/structure/sign/directions/evac
|
||||
name = "\improper Escape Arm"
|
||||
desc = "A direction sign, pointing out which way escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
|
||||
@@ -412,4 +413,4 @@
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
@@ -9,10 +9,17 @@
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
|
||||
var/dirt = 0
|
||||
|
||||
/turf/simulated/New()
|
||||
..()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808")
|
||||
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
|
||||
if(!tracks)
|
||||
tracks = new typepath(src)
|
||||
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
||||
|
||||
/turf/simulated/Entered(atom/A, atom/OL)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
usr << "\red Movement is admin-disabled." //This is to identify lag problems
|
||||
@@ -32,31 +39,39 @@
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes))
|
||||
var/obj/item/clothing/shoes/clown_shoes/O = H.shoes
|
||||
if(H.m_intent == "run")
|
||||
if(O.footstep >= 2)
|
||||
O.footstep = 0
|
||||
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
|
||||
else
|
||||
O.footstep++
|
||||
else
|
||||
playsound(src, "clownstep", 20, 1)
|
||||
|
||||
// Tracking blood
|
||||
var/list/bloodDNA = null
|
||||
var/bloodcolor=""
|
||||
if(H.shoes)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S.track_blood && S.blood_DNA)
|
||||
bloodDNA = S.blood_DNA
|
||||
bloodcolor=S.blood_color
|
||||
S.track_blood--
|
||||
else
|
||||
if(H.track_blood && H.feet_blood_DNA)
|
||||
bloodDNA = H.feet_blood_DNA
|
||||
bloodcolor=H.feet_blood_color
|
||||
H.track_blood--
|
||||
|
||||
if (bloodDNA)
|
||||
var/obj/effect/decal/cleanable/blood/footprints/here = new(src)
|
||||
here.icon_state = "blood1"
|
||||
here.dir = H.dir
|
||||
here.blood_DNA |= bloodDNA.Copy()
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,H.dir,0,bloodcolor) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(from)
|
||||
var/obj/effect/decal/cleanable/blood/footprints/there = new(from)
|
||||
there.icon_state = "blood2"
|
||||
there.dir = H.dir
|
||||
there.blood_DNA |= bloodDNA.Copy()
|
||||
if(istype(from) && from)
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,0,H.dir,bloodcolor) // Going
|
||||
|
||||
bloodDNA = null
|
||||
bloodDNA = null
|
||||
|
||||
switch (src.wet)
|
||||
if(1)
|
||||
@@ -66,8 +81,8 @@
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the wet floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
M.Stun(5)
|
||||
M.Weaken(3)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
@@ -77,13 +92,13 @@
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the wet floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
M.Stun(5)
|
||||
M.Weaken(3)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
|
||||
if(2) //lube //can cause infinite loops - needs work
|
||||
if(2) //lube //can cause infinite loops - needs work
|
||||
if(!istype(M, /mob/living/carbon/slime))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
@@ -95,6 +110,29 @@
|
||||
M << "\blue You slipped on the floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Weaken(10)
|
||||
if(3) // Ice
|
||||
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
|
||||
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP) && prob(30))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the icy floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(4)
|
||||
M.Weaken(3)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
else if(!istype(M, /mob/living/carbon/slime))
|
||||
if (M.m_intent == "run" && prob(30))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
M << "\blue You slipped on the icy floor!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(4)
|
||||
M.Weaken(3)
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -106,29 +144,49 @@
|
||||
for(var/obj/effect/decal/cleanable/blood/B in contents)
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
B.virus2 |= virus_copylist(M.virus2)
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
//if there isn't a blood decal already, make one.
|
||||
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(src)
|
||||
|
||||
//Species-specific blood.
|
||||
if(M.species)
|
||||
newblood.basecolor = M.species.blood_color
|
||||
else
|
||||
newblood.basecolor = "#A10808"
|
||||
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
newblood.virus2 |= virus_copylist(M.virus2)
|
||||
newblood.update_icon()
|
||||
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
|
||||
// Only adds blood on the floor -- Skie
|
||||
/turf/simulated/proc/add_blood_floor(mob/living/carbon/M as mob)
|
||||
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
|
||||
if(istype(M, /mob/living/carbon/monkey))
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
this.virus2 = virus_copylist(M.virus2)
|
||||
this.basecolor = "#A10808"
|
||||
this.update_icon()
|
||||
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
//Species-specific blood.
|
||||
if(H.species)
|
||||
this.basecolor = H.species.blood_color
|
||||
else
|
||||
this.basecolor = "#A10808"
|
||||
this.update_icon()
|
||||
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
|
||||
else if( istype(M, /mob/living/carbon/alien ))
|
||||
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(src)
|
||||
var/obj/effect/decal/cleanable/blood/xeno/this = new /obj/effect/decal/cleanable/blood/xeno(src)
|
||||
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
|
||||
|
||||
else if( istype(M, /mob/living/silicon/robot ))
|
||||
new /obj/effect/decal/cleanable/oil(src)
|
||||
new /obj/effect/decal/cleanable/blood/oil(src)
|
||||
|
||||
@@ -581,7 +581,8 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly (aka lagitational anomolag)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger an Alien infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=aliens'>Trigger a Xenomorph infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=borers'>Trigger a Cortical Borer infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
|
||||
|
||||
@@ -65,6 +65,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/toggleattacklogs,
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/toggleghostwriters,
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/check_customitem_activity,
|
||||
/client/proc/man_up,
|
||||
@@ -72,7 +73,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/response_team, // Response Teams admin verb
|
||||
/client/proc/toggle_antagHUD_use,
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/allow_character_respawn /* Allows a ghost to respawn */
|
||||
/client/proc/allow_character_respawn /* Allows a ghost to respawn */
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -359,14 +360,11 @@ var/list/admin_verbs_mod = list(
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
mob << "\red <b>Invisimin off. Invisibility reset.</b>"
|
||||
mob.icon_state = "ghost"
|
||||
mob.icon = 'icons/mob/human.dmi'
|
||||
mob.update_icons()
|
||||
mob.alpha = max(mob.alpha + 100, 255)
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
mob << "\blue <b>Invisimin on. You are now as invisible as a ghost.</b>"
|
||||
mob.icon_state = "ghost"
|
||||
mob.icon = 'icons/mob/mob.dmi'
|
||||
mob.alpha = max(mob.alpha - 100, 0)
|
||||
|
||||
|
||||
/client/proc/player_panel()
|
||||
@@ -727,6 +725,21 @@ var/list/admin_verbs_mod = list(
|
||||
usr << "You now won't get attack log messages"
|
||||
|
||||
|
||||
/client/proc/toggleghostwriters()
|
||||
set name = "Toggle ghost writers"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
if(config.cult_ghostwriter)
|
||||
config.cult_ghostwriter = 0
|
||||
src << "<b>Disallowed ghost writers.</b>"
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled ghost writers.", 1)
|
||||
else
|
||||
config.cult_ghostwriter = 1
|
||||
src << "<b>Enabled ghost writers.</b>"
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled ghost writers.", 1)
|
||||
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -511,10 +511,10 @@
|
||||
jobs += "</tr><tr align='center'>"
|
||||
counter = 0
|
||||
|
||||
if(jobban_isbanned(M, "Internal Affairs Agent"))
|
||||
if(jobban_isbanned(M, "Internal Affairs Agent"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Internal Affairs Agent;jobban4=\ref[M]'><font color=red>Internal Affairs Agent</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Internal Affairs Agent;jobban4=\ref[M]'>Internal Affairs Agent</a></td>"
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Internal Affairs Agent;jobban4=\ref[M]'>Internal Affairs Agent</a></td>"
|
||||
|
||||
jobs += "</tr></table>"
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
counter = 0
|
||||
|
||||
//pAI isn't technically a job, but it goes in here.
|
||||
|
||||
|
||||
if(jobban_isbanned(M, "pAI"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>"
|
||||
else
|
||||
@@ -804,7 +804,11 @@
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
M << "\red You have been kicked from the server"
|
||||
var/reason = input("Please enter reason")
|
||||
if(!reason)
|
||||
M << "\red You have been kicked from the server"
|
||||
else
|
||||
M << "\red You have been kicked from the server: [reason]"
|
||||
log_admin("[key_name(usr)] booted [key_name(M)].")
|
||||
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
|
||||
//M.client = null
|
||||
@@ -1773,7 +1777,12 @@
|
||||
log_admin("[key_name(usr)] spawned an alien infestation", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempted an alien infestation", 1)
|
||||
new /datum/event/alien_infestation
|
||||
|
||||
if("borers")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","Borers")
|
||||
log_admin("[key_name(usr)] spawned a cortical borer infestation.", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] spawned a cortical borer infestation.", 1)
|
||||
new /datum/event/borer_infestation
|
||||
|
||||
if("power")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -254,13 +254,17 @@
|
||||
'nano/templates/geoscanner.tmpl',
|
||||
'nano/templates/dna_modifier.tmpl',
|
||||
'nano/templates/telescience_console.tmpl',
|
||||
'nano/templates/pda.tmpl',
|
||||
'nano/templates/uplink.tmpl',
|
||||
'nano/images/uiBackground.png',
|
||||
'nano/images/uiIcons16.png',
|
||||
'nano/images/uiIcons24.png',
|
||||
'nano/images/uiBackground-Syndicate.png',
|
||||
'nano/images/uiLinkPendingIcon.gif',
|
||||
'nano/images/uiMaskBackground.png',
|
||||
'nano/images/uiNoticeBackground.jpg',
|
||||
'nano/images/uiTitleFluff.png',
|
||||
'nano/images/uiTitleFluff-Syndicate.png',
|
||||
'html/search.js',
|
||||
'html/panels.css',
|
||||
'icons/pda_icons/pda_atmos.png',
|
||||
|
||||
@@ -73,6 +73,12 @@
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else if(patient.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
|
||||
if(B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
C.images += holder
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
icon_state = "amp"
|
||||
siemens_coefficient = 0.8
|
||||
|
||||
/obj/item/clothing/head/wizard/cap
|
||||
name = "Gentlemans Cap"
|
||||
desc = "A checkered gray flat cap woven together with the rarest of threads."
|
||||
icon_state = "gentcap"
|
||||
siemens_coefficient = 0.8
|
||||
|
||||
/obj/item/clothing/suit/wizrobe
|
||||
name = "wizard robe"
|
||||
desc = "A magnificant, gem-lined robe that seems to radiate power."
|
||||
@@ -79,6 +85,12 @@
|
||||
icon_state = "psyamp"
|
||||
item_state = "psyamp"
|
||||
|
||||
/obj/item/clothing/suit/wizrobe/gentlecoat
|
||||
name = "Gentlemans Coat"
|
||||
desc = "A heavy threaded twead gray jacket. For a different sort of Gentleman."
|
||||
icon_state = "gentlecoat"
|
||||
item_state = "gentlecoat"
|
||||
|
||||
/obj/item/clothing/suit/wizrobe/fake
|
||||
name = "wizard robe"
|
||||
desc = "A rather dull, blue robe meant to mimick real wizard robes."
|
||||
|
||||
@@ -10,6 +10,24 @@
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/rdalt
|
||||
desc = "A dress suit and slacks stained with hard work and dedication to science. Perhaps other things as well, but mostly hard work and dedication."
|
||||
name = "head researcher uniform"
|
||||
icon_state = "rdalt"
|
||||
item_state = "rdalt"
|
||||
item_color = "rdalt"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/dress_rd
|
||||
name = "research director dress uniform"
|
||||
desc = "Feminine fashion for the style concious RD. Its fabric provides minor protection from biological contaminants."
|
||||
icon_state = "dress_rd"
|
||||
item_color = "dress_rd"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
|
||||
/obj/item/clothing/under/rank/scientist
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist."
|
||||
name = "scientist's jumpsuit"
|
||||
|
||||
@@ -138,6 +138,13 @@
|
||||
item_state = "psysuit"
|
||||
item_color = "psysuit"
|
||||
|
||||
/obj/item/clothing/under/gentlesuit
|
||||
name = "Gentlemans Suit"
|
||||
desc = "A silk black shirt with a white tie and a matching gray vest and slacks. Feels proper."
|
||||
icon_state = "gentlesuit"
|
||||
item_state = "gentlesuit"
|
||||
item_color = "gentlesuit"
|
||||
|
||||
/obj/item/clothing/under/gimmick/rank/captain/suit
|
||||
name = "captain's suit"
|
||||
desc = "A green suit and yellow necktie. Exemplifies authority."
|
||||
@@ -285,11 +292,6 @@
|
||||
icon_state = "dress_saloon"
|
||||
item_color = "dress_saloon"
|
||||
|
||||
/obj/item/clothing/under/dress/dress_rd
|
||||
name = "research director dress uniform"
|
||||
desc = "Feminine fashion for the style concious RD."
|
||||
icon_state = "dress_rd"
|
||||
item_color = "dress_rd"
|
||||
|
||||
/obj/item/clothing/under/dress/dress_cap
|
||||
name = "captain dress uniform"
|
||||
@@ -358,7 +360,7 @@
|
||||
flags_inv = HIDESHOES
|
||||
|
||||
/obj/item/clothing/under/wedding/bride_white
|
||||
name = "orange wedding dress"
|
||||
name = "silky wedding dress"
|
||||
desc = "A white wedding gown made from the finest silk."
|
||||
icon_state = "bride_white"
|
||||
item_color = "bride_white"
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
switch(fermenting_item.type)
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/flour) //Flour is still flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/beer/B = new(src)
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = new(src)
|
||||
output += B
|
||||
else
|
||||
error = 1
|
||||
@@ -178,7 +178,7 @@
|
||||
return //Not done yet.
|
||||
|
||||
switch(destilling_item.type)
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/beer) //Flour is still flour
|
||||
if(/obj/item/weapon/reagent_containers/food/drinks/cans/beer) //Flour is still flour
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/V = new(src)
|
||||
output += V
|
||||
else
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
var/track_blood = 0
|
||||
var/list/feet_blood_DNA
|
||||
var/track_blood_type
|
||||
var/feet_blood_color
|
||||
|
||||
/obj/item/clothing/gloves
|
||||
var/transfer_blood = 0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//Cortical borer spawn event - care of RobRichards1997 with minor editing by Zuhayr.
|
||||
|
||||
/datum/event/borer_infestation
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/borer_infestation
|
||||
announceWhen = 400
|
||||
|
||||
var/spawncount = 1
|
||||
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
|
||||
|
||||
/datum/event/borer_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(1, 3)
|
||||
|
||||
/datum/event/borer_infestation/announce()
|
||||
if(successSpawn)
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('sound/AI/aliens.ogg')
|
||||
|
||||
/datum/event/borer_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
//Stops cortical borers getting stuck in small networks. See: Security, Virology
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = get_alien_candidates()
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
var/client/C = pick_n_take(candidates)
|
||||
|
||||
var/mob/living/simple_animal/borer/new_borer = new(vent.loc)
|
||||
new_borer.key = C.key
|
||||
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
@@ -94,7 +94,8 @@
|
||||
if(ai.aiPDA != P && ai.aiPDA != src)
|
||||
ai.show_message("<i>Intercepted message from <b>[sender]</b></i> (Unknown / spam?) <i>to <b>[P:owner]</b>: [message]</i>")
|
||||
|
||||
P.tnote += "<i><b>← From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
|
||||
//Commented out because we don't send messages like this anymore. Instead it will just popup in their chat window.
|
||||
//P.tnote += "<i><b>← From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
H.apply_effect((rand(40,70)),IRRADIATE,0)
|
||||
if (prob(75))
|
||||
randmutb(H) // Applies bad mutation
|
||||
domutcheck(H,null,1)
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
else
|
||||
randmutg(H) // Applies good mutation
|
||||
domutcheck(H,null,1)
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
|
||||
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
|
||||
@@ -477,6 +477,15 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/popcorn
|
||||
|
||||
|
||||
/datum/recipe/cookie
|
||||
reagents = list("milk" = 5, "flour" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/cookie
|
||||
|
||||
/datum/recipe/fortunecookie
|
||||
reagents = list("flour" = 5)
|
||||
items = list(
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
var/antagHUD = 0
|
||||
universal_speak = 1
|
||||
var/atom/movable/following = null
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
|
||||
stat = DEAD
|
||||
|
||||
var/turf/T
|
||||
@@ -93,12 +94,12 @@ Works together with spawning an observer, noted above.
|
||||
|
||||
/mob/dead/observer/Life()
|
||||
..()
|
||||
if(!loc) return
|
||||
if(!loc) return
|
||||
if(!client) return 0
|
||||
|
||||
|
||||
if(client.images.len)
|
||||
for(var/image/hud in client.images)
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
client.images.Remove(hud)
|
||||
if(antagHUD)
|
||||
@@ -145,7 +146,7 @@ Works together with spawning an observer, noted above.
|
||||
var/foundVirus = 0
|
||||
if(patient.virus2.len)
|
||||
foundVirus = 1
|
||||
if(!C) return
|
||||
if(!C) return
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "hudhealth-100"
|
||||
@@ -160,10 +161,17 @@ Works together with spawning an observer, noted above.
|
||||
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
|
||||
|
||||
|
||||
C.images += holder
|
||||
|
||||
|
||||
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
|
||||
var/icon/tempHud = 'icons/mob/hud.dmi'
|
||||
@@ -319,7 +327,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(jobban_isbanned(M, "AntagHUD"))
|
||||
src << "\red <B>You have been banned from using this feature</B>"
|
||||
return
|
||||
if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder)
|
||||
if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder)
|
||||
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
|
||||
if(response == "No") return
|
||||
M.can_reenter_corpse = 0
|
||||
@@ -489,3 +497,79 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
dat += data_core.get_manifest()
|
||||
|
||||
src << browse(dat, "window=manifest;size=370x420;can_close=1")
|
||||
|
||||
//Used for drawing on walls with blood puddles as a spooky ghost.
|
||||
/mob/dead/verb/bloody_doodle()
|
||||
|
||||
set category = "Ghost"
|
||||
set name = "Write in blood"
|
||||
set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC."
|
||||
|
||||
if(!(config.cult_ghostwriter))
|
||||
src << "\red That verb is not currently permitted."
|
||||
return
|
||||
|
||||
if (!src.stat)
|
||||
return
|
||||
|
||||
if (usr != src)
|
||||
return 0 //something is terribly wrong
|
||||
|
||||
var/ghosts_can_write
|
||||
if(ticker.mode.name == "cult")
|
||||
var/datum/game_mode/cult/C = ticker.mode
|
||||
if(C.cult.len > config.cult_ghostwriter_req_cultists)
|
||||
ghosts_can_write = 1
|
||||
|
||||
if(!ghosts_can_write)
|
||||
src << "\red The veil is not thin enough for you to do that."
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.amount > 0)
|
||||
choices += B
|
||||
|
||||
if(!choices.len)
|
||||
src << "<span class = 'warning'>There is no blood to use nearby.</span>"
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices
|
||||
|
||||
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
|
||||
var/turf/simulated/T = src.loc
|
||||
if (direction != "Here")
|
||||
T = get_step(T,text2dir(direction))
|
||||
|
||||
if (!istype(T))
|
||||
src << "<span class='warning'>You cannot doodle there.</span>"
|
||||
return
|
||||
|
||||
if(!choice || choice.amount == 0 || !(src.Adjacent(choice)))
|
||||
return
|
||||
|
||||
var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808"
|
||||
|
||||
var/num_doodles = 0
|
||||
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
|
||||
num_doodles++
|
||||
if (num_doodles > 4)
|
||||
src << "<span class='warning'>There is no space to write on!</span>"
|
||||
return
|
||||
|
||||
var/max_length = 50
|
||||
|
||||
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
|
||||
|
||||
if (message)
|
||||
|
||||
if (length(message) > max_length)
|
||||
message += "-"
|
||||
src << "<span class='warning'>You ran out of blood to write with!</span>"
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
|
||||
W.basecolor = doodle_color
|
||||
W.update_icon()
|
||||
W.message = message
|
||||
W.add_hiddenprint(src)
|
||||
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
|
||||
@@ -31,6 +31,10 @@
|
||||
continue
|
||||
no_queen = 0
|
||||
|
||||
if(src.has_brain_worms())
|
||||
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
|
||||
return
|
||||
|
||||
if(no_queen)
|
||||
adjustToxLoss(-500)
|
||||
src << "\green You begin to evolve!"
|
||||
|
||||
@@ -532,7 +532,7 @@
|
||||
B.host_brain << "\red <B><FONT size=3>Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!</FONT></B>"
|
||||
|
||||
//Check for brain worms in head.
|
||||
/mob/living/carbon/proc/has_brain_worms()
|
||||
/mob/proc/has_brain_worms()
|
||||
|
||||
for(var/I in contents)
|
||||
if(istype(I,/mob/living/simple_animal/borer))
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
E.droplimb(1,1)
|
||||
|
||||
flick("gibbed-h", animation)
|
||||
hgibs(loc, viruses, dna)
|
||||
if(species)
|
||||
hgibs(loc, viruses, dna, species.flesh_color, species.blood_color)
|
||||
else
|
||||
hgibs(loc, viruses, dna)
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
|
||||
@@ -776,6 +776,14 @@
|
||||
if(istype(usr,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
|
||||
if (href_list["lookitem"])
|
||||
var/obj/item/I = locate(href_list["lookitem"])
|
||||
I.examine()
|
||||
|
||||
if (href_list["lookmob"])
|
||||
var/mob/M = locate(href_list["lookmob"])
|
||||
M.examine()
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1100,6 +1108,7 @@
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
src.update_inv_gloves() //handles bloody hands overlays and updating
|
||||
verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
return 1 //we applied blood to the item
|
||||
|
||||
/mob/living/carbon/human/clean_blood()
|
||||
@@ -1266,3 +1275,58 @@ mob/living/carbon/human/yank_out_object()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/bloody_doodle()
|
||||
set category = "IC"
|
||||
set name = "Write in blood"
|
||||
set desc = "Use blood on your hands to write a short message on the floor or a wall, murder mystery style."
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
if (usr != src)
|
||||
return 0 //something is terribly wrong
|
||||
|
||||
if (!bloody_hands)
|
||||
verbs -= /mob/living/carbon/human/proc/bloody_doodle
|
||||
|
||||
if (src.gloves)
|
||||
src << "<span class='warning'>Your [src.gloves] are getting in the way.</span>"
|
||||
return
|
||||
|
||||
var/turf/simulated/T = src.loc
|
||||
if (!istype(T)) //to prevent doodling out of mechs and lockers
|
||||
src << "<span class='warning'>You cannot reach the floor.</span>"
|
||||
return
|
||||
|
||||
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
|
||||
if (direction != "Here")
|
||||
T = get_step(T,text2dir(direction))
|
||||
if (!istype(T))
|
||||
src << "<span class='warning'>You cannot doodle there.</span>"
|
||||
return
|
||||
|
||||
var/num_doodles = 0
|
||||
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
|
||||
num_doodles++
|
||||
if (num_doodles > 4)
|
||||
src << "<span class='warning'>There is no space to write on!</span>"
|
||||
return
|
||||
|
||||
var/max_length = bloody_hands * 30 //tweeter style
|
||||
|
||||
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
|
||||
|
||||
if (message)
|
||||
var/used_blood_amount = round(length(message) / 30, 1)
|
||||
bloody_hands = max(0, bloody_hands - used_blood_amount) //use up some blood
|
||||
|
||||
if (length(message) > max_length)
|
||||
message += "-"
|
||||
src << "<span class='warning'>You ran out of blood to write with!</span>"
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
|
||||
W.basecolor = (hand_blood_color) ? hand_blood_color : "#A10808"
|
||||
W.update_icon()
|
||||
W.message = message
|
||||
W.add_fingerprint(src)
|
||||
|
||||
@@ -134,6 +134,16 @@ emp_act
|
||||
protection += C.armor[type]
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/proc/check_head_coverage()
|
||||
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
|
||||
for(var/bp in body_parts)
|
||||
if(!bp) continue
|
||||
if(bp && istype(bp ,/obj/item/clothing))
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & HEAD)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
|
||||
if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3)
|
||||
|
||||
@@ -56,3 +56,4 @@
|
||||
var/xylophone = 0 //For the spoooooooky xylophone cooldown
|
||||
|
||||
var/mob/remoteview_target = null
|
||||
var/hand_blood_color
|
||||
@@ -470,7 +470,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing.icon = ((w_uniform.icon_override) ? w_uniform.icon_override : 'icons/mob/uniform.dmi')
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
bloodsies.color = w_uniform.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
|
||||
var/tie_color = w_uniform:hastie.item_color
|
||||
@@ -510,12 +512,16 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
var/image/standing = image("icon" = ((gloves.icon_override) ? gloves.icon_override : 'icons/mob/hands.dmi'), "icon_state" = "[t_state]")
|
||||
if(gloves.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
bloodsies.color = gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
overlays_standing[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
bloodsies.color = hand_blood_color
|
||||
overlays_standing[GLOVES_LAYER] = bloodsies
|
||||
else
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
@@ -542,7 +548,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(shoes)
|
||||
var/image/standing = image("icon" = ((shoes.icon_override) ? shoes.icon_override : 'icons/mob/feet.dmi'), "icon_state" = "[shoes.icon_state]")
|
||||
if(shoes.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
bloodsies.color = shoes.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
@@ -568,7 +576,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
else
|
||||
standing = image("icon" = ((head.icon_override) ? head.icon_override : 'icons/mob/head.dmi'), "icon_state" = "[head.icon_state]")
|
||||
if(head.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
bloodsies.color = head.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
@@ -597,7 +607,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
bloodsies.color = wear_suit.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
@@ -621,7 +633,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
var/image/standing = image("icon" = ((wear_mask.icon_override) ? wear_mask.icon_override : 'icons/mob/mask.dmi'), "icon_state" = "[wear_mask.icon_state]")
|
||||
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
bloodsies.color = wear_mask.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
else
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
|
||||
@@ -2,6 +2,38 @@
|
||||
Tiny babby plant critter plus procs.
|
||||
*/
|
||||
|
||||
//Helper object for picking dionaea up.
|
||||
/obj/item/weapon/diona_holder
|
||||
|
||||
name = "diona nymph"
|
||||
desc = "It's a tiny plant critter."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "nymph"
|
||||
slot_flags = SLOT_HEAD
|
||||
origin_tech = "magnets=3;biotech=5"
|
||||
|
||||
/obj/item/weapon/diona_holder/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/diona_holder/Del()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/diona_holder/process()
|
||||
if(!loc) return
|
||||
|
||||
if(!istype(loc,/mob/living))
|
||||
for(var/mob/M in contents)
|
||||
M.loc = get_turf(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/diona_holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
for(var/mob/M in src.contents)
|
||||
M.attackby(W,user)
|
||||
|
||||
//Mob defines.
|
||||
/mob/living/carbon/monkey/diona
|
||||
name = "diona nymph"
|
||||
voice_name = "diona nymph"
|
||||
@@ -10,6 +42,20 @@
|
||||
var/list/donors = list()
|
||||
var/ready_evolve = 0
|
||||
|
||||
/mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == "help")
|
||||
var/obj/item/weapon/diona_holder/D = new(loc)
|
||||
src.loc = D
|
||||
D.name = loc.name
|
||||
D.attack_hand(M)
|
||||
M << "You scoop up [src]."
|
||||
src << "[M] scoops you up."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/diona/New()
|
||||
|
||||
..()
|
||||
@@ -64,6 +110,10 @@
|
||||
set name = "Evolve"
|
||||
set desc = "Grow to a more complex form."
|
||||
|
||||
if(!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist)
|
||||
src << alert("You are currently not whitelisted to play an adult Diona.")
|
||||
return 0
|
||||
|
||||
if(donors.len < 5)
|
||||
src << "You are not yet ready for your growth..."
|
||||
return
|
||||
@@ -73,8 +123,15 @@
|
||||
return
|
||||
|
||||
src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark and twigs!","\red You begin to shift and quiver, then erupt in a shower of shed bark and twigs, attaining your adult form!")
|
||||
var/mob/living/carbon/human/adult = new(loc)
|
||||
|
||||
var/mob/living/carbon/human/adult = new(get_turf(src.loc))
|
||||
adult.set_species("Diona")
|
||||
|
||||
if(istype(loc,/obj/item/weapon/diona_holder/))
|
||||
var/obj/item/weapon/diona_holder/L = loc
|
||||
src.loc = L.loc
|
||||
del(L)
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
adult.add_language(L.name)
|
||||
adult.regenerate_icons()
|
||||
|
||||
@@ -13,13 +13,16 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
if (monkeyizing) return
|
||||
if (update_muts)
|
||||
update_muts=0
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
if (stat != DEAD) //still breathing
|
||||
if (stat != DEAD && !istype(src,/mob/living/carbon/monkey/diona)) //still breathing
|
||||
//First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
|
||||
@@ -10,28 +10,31 @@
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/greaterform = "Human" // Used when humanizing a monkey.
|
||||
var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
icon_state = "monkey1"
|
||||
//var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2.
|
||||
var/update_muts = 1 // Monkey gene must be set at start.
|
||||
|
||||
/mob/living/carbon/monkey/tajara
|
||||
name = "farwa"
|
||||
voice_name = "farwa"
|
||||
speak_emote = list("mews")
|
||||
icon_state = "tajkey1"
|
||||
uni_append = "0A0E00"
|
||||
uni_append = list(0x0A0,0xE00) // 0A0E00
|
||||
|
||||
/mob/living/carbon/monkey/skrell
|
||||
name = "neaera"
|
||||
voice_name = "neaera"
|
||||
speak_emote = list("squicks")
|
||||
icon_state = "skrellkey1"
|
||||
uni_append = "01CC92"
|
||||
uni_append = list(0x01C,0xC92) // 01CC92
|
||||
|
||||
/mob/living/carbon/monkey/unathi
|
||||
name = "stok"
|
||||
voice_name = "stok"
|
||||
speak_emote = list("hisses")
|
||||
icon_state = "stokkey1"
|
||||
uni_append = "044C5D"
|
||||
uni_append = list(0x044,0xC5D) // 044C5D
|
||||
|
||||
/mob/living/carbon/monkey/New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
@@ -52,13 +55,20 @@
|
||||
//dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
//dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
dna.unique_enzymes = md5(name)
|
||||
//////////blah
|
||||
var/gendervar
|
||||
if (gender == MALE)
|
||||
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
|
||||
else
|
||||
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
|
||||
dna.uni_identity += "[gendervar][uni_append]"
|
||||
|
||||
// We're a monkey
|
||||
dna.SetSEState(MONKEYBLOCK, 1)
|
||||
// Fix gender
|
||||
dna.SetUIState(DNA_UI_GENDER, gender != MALE, 1)
|
||||
|
||||
// Set the blocks to uni_append, if needed.
|
||||
if(uni_append.len>0)
|
||||
for(var/b=1;b<=uni_append.len;b++)
|
||||
dna.SetUIValue(DNA_UI_LENGTH-(uni_append.len-b),uni_append[b], 1)
|
||||
dna.UpdateUI()
|
||||
|
||||
update_muts=1
|
||||
|
||||
..()
|
||||
update_icons()
|
||||
return
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
var/list/abilities = list() // For species-derived or admin-given powers
|
||||
|
||||
var/blood_color = "#A10808" //Red.
|
||||
var/flesh_color = "#FFC896" //Pink.
|
||||
|
||||
/datum/species/human
|
||||
name = "Human"
|
||||
language = "Sol Common"
|
||||
@@ -70,6 +73,8 @@
|
||||
|
||||
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
|
||||
|
||||
flesh_color = "#34AF10"
|
||||
|
||||
/datum/species/tajaran
|
||||
name = "Tajaran"
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
@@ -92,6 +97,8 @@
|
||||
|
||||
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
|
||||
|
||||
flesh_color = "#AFA59E"
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
@@ -101,6 +108,8 @@
|
||||
|
||||
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR
|
||||
|
||||
flesh_color = "#8CD7A3"
|
||||
|
||||
/datum/species/vox
|
||||
name = "Vox"
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
@@ -119,6 +128,9 @@
|
||||
|
||||
flags = NO_SCAN
|
||||
|
||||
blood_color = "#2299FC"
|
||||
flesh_color = "#808D11"
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
icobase = 'icons/mob/human_races/r_plant.dmi'
|
||||
@@ -140,3 +152,7 @@
|
||||
heat_level_3 = 4000
|
||||
|
||||
flags = WHITELISTED | NO_BREATHE | REQUIRE_LIGHT | NON_GENDERED | NO_SCAN | IS_PLANT | RAD_ABSORB
|
||||
|
||||
blood_color = "#004400"
|
||||
flesh_color = "#907E4A"
|
||||
|
||||
|
||||
@@ -80,6 +80,12 @@
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else if(patient.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
|
||||
if(B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
client.images += holder
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
src.modules += new /obj/item/weapon/tray/robotray(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
src.emag.reagents = R
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
src << "You whisper silently, \"[message]\""
|
||||
B.host << "The captive mind of [src] whispers, \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
M << "The captive mind of [src] whispers, \"[message]\""
|
||||
|
||||
/mob/living/captive_brain/emote(var/message)
|
||||
return
|
||||
|
||||
@@ -40,28 +46,53 @@
|
||||
wander = 0
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
var/used_dominate
|
||||
var/chemicals = 10 // Chemicals used for reproduction and spitting neurotoxin.
|
||||
var/mob/living/carbon/human/host // Human host for the brain worm.
|
||||
var/truename // Name used for brainworm-speak.
|
||||
var/mob/living/captive_brain/host_brain // Used for swapping control of the body back and forth.
|
||||
var/controlling // Used in human death check.
|
||||
var/docile = 0 // Sugar can stop borers from acting.
|
||||
|
||||
/mob/living/simple_animal/borer/Life()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
if(host)
|
||||
|
||||
if(!stat && !host.stat)
|
||||
|
||||
if(host.reagents.has_reagent("sugar"))
|
||||
if(!docile)
|
||||
if(controlling)
|
||||
host << "\blue You feel the soporific flow of sugar in your host's blood, lulling you into docility."
|
||||
else
|
||||
src << "\blue You feel the soporific flow of sugar in your host's blood, lulling you into docility."
|
||||
docile = 1
|
||||
else
|
||||
if(docile)
|
||||
if(controlling)
|
||||
host << "\blue You shake off your lethargy as the sugar leaves your host's blood."
|
||||
else
|
||||
src << "\blue You shake off your lethargy as the sugar leaves your host's blood."
|
||||
docile = 0
|
||||
|
||||
if(chemicals < 250)
|
||||
chemicals++
|
||||
if(controlling)
|
||||
|
||||
if(docile)
|
||||
host << "\blue You are feeling far too docile to continue controlling your host..."
|
||||
host.release_control()
|
||||
return
|
||||
|
||||
if(prob(5))
|
||||
host.adjustBrainLoss(rand(1,2))
|
||||
|
||||
if(prob(host.brainloss/20))
|
||||
host.say("*[pick(list("blink","blink_r","choke","aflap","drool","twitch","twitch_s","gasp"))]")
|
||||
|
||||
//if(host.brainloss > 100)
|
||||
|
||||
/mob/living/simple_animal/borer/New()
|
||||
..()
|
||||
truename = "[pick("Primary","Secondary","Tertiary","Quaternary")] [rand(1000,9999)]"
|
||||
@@ -104,6 +135,13 @@
|
||||
src << "You drop words into [host]'s mind: \"[message]\""
|
||||
host << "Your own thoughts speak: \"[message]\""
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
M << "[src.truename] whispers to [host], \"[message]\""
|
||||
|
||||
|
||||
/mob/living/simple_animal/borer/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -127,6 +165,46 @@
|
||||
if(M.mind && (istype(M, /mob/living/simple_animal/borer) || istype(M, /mob/dead/observer)))
|
||||
M << "<i>Cortical link, <b>[truename]:</b> [copytext(message, 2)]</i>"
|
||||
|
||||
/mob/living/simple_animal/borer/verb/dominate_victim()
|
||||
set category = "Alien"
|
||||
set name = "Dominate Victim"
|
||||
set desc = "Freeze the limbs of a potential host with supernatural fear."
|
||||
|
||||
if(world.time - used_dominate < 300)
|
||||
src << "You cannot use that ability again so soon."
|
||||
return
|
||||
|
||||
if(host)
|
||||
src << "You cannot do that from within a host body."
|
||||
return
|
||||
|
||||
if(src.stat)
|
||||
src << "You cannot do that in your current state."
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/C in view(3,src))
|
||||
if(C.stat != 2)
|
||||
choices += C
|
||||
|
||||
if(world.time - used_dominate < 300)
|
||||
src << "You cannot use that ability again so soon."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
|
||||
|
||||
if(!M || !src) return
|
||||
|
||||
if(M.has_brain_worms())
|
||||
src << "You cannot infest someone who is already infested!"
|
||||
return
|
||||
|
||||
src << "\red You focus your psychic lance on [M] and freeze their limbs with a wave of terrible dread."
|
||||
M << "\red You feel a creeping, horrible sense of dread come over you, freezing your limbs and setting your heart racing."
|
||||
M.Weaken(3)
|
||||
|
||||
used_dominate = world.time
|
||||
|
||||
/mob/living/simple_animal/borer/verb/bond_brain()
|
||||
set category = "Alien"
|
||||
set name = "Assume Control"
|
||||
@@ -140,12 +218,20 @@
|
||||
src << "You cannot do that in your current state."
|
||||
return
|
||||
|
||||
if(host.internal_organs_by_name["brain"]) //this should only run in admin-weirdness situations, but it's here non the less - RR
|
||||
src << "<span class='warning'>There is no brain here for us to command!</span>"
|
||||
return
|
||||
|
||||
if(docile)
|
||||
src << "\blue You are feeling far too docile to do that."
|
||||
return
|
||||
|
||||
src << "You begin delicately adjusting your connection to the host brain..."
|
||||
|
||||
spawn(300+(host.brainloss*5))
|
||||
|
||||
if(!host || !src || controlling) return
|
||||
|
||||
if(!host || !src || controlling)
|
||||
return
|
||||
else
|
||||
src << "\red <B>You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.</B>"
|
||||
host << "\red <B>You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.</B>"
|
||||
@@ -170,10 +256,14 @@
|
||||
if(stat)
|
||||
src << "You cannot secrete chemicals in your current state."
|
||||
|
||||
if(docile)
|
||||
src << "\blue You are feeling far too docile to do that."
|
||||
return
|
||||
|
||||
if(chemicals < 50)
|
||||
src << "You don't have enough chemicals!"
|
||||
|
||||
var/chem = input("Select a chemical to secrete.", "Chemicals") in list("bicaridine","tramadol","hyperzine")
|
||||
var/chem = input("Select a chemical to secrete.", "Chemicals") in list("bicaridine","tramadol","hyperzine","alkysine")
|
||||
|
||||
if(chemicals < 50 || !host || controlling || !src || stat) //Sanity check.
|
||||
return
|
||||
@@ -194,6 +284,9 @@
|
||||
if(stat)
|
||||
src << "You cannot leave your host in your current state."
|
||||
|
||||
if(docile)
|
||||
src << "\blue You are feeling far too docile to do that."
|
||||
return
|
||||
|
||||
if(!host || !src) return
|
||||
|
||||
@@ -262,17 +355,25 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
if(C.stat != 2)
|
||||
if(C.stat != 2 && src.Adjacent(C))
|
||||
choices += C
|
||||
|
||||
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
|
||||
|
||||
if(!M || !src) return
|
||||
|
||||
if(!(src.Adjacent(M))) return
|
||||
|
||||
if(M.has_brain_worms())
|
||||
src << "You cannot infest someone who is already infested!"
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.check_head_coverage())
|
||||
src << "You cannot get through that host's protective gear."
|
||||
return
|
||||
|
||||
M << "Something slimy begins probing at the opening of your ear canal..."
|
||||
src << "You slither up [M] and begin probing at their ear canal..."
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/mob/living/simple_animal/hostile/hivebot/Die()
|
||||
..()
|
||||
visible_message("<b>[src]</b> blows apart!")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
@@ -217,3 +217,5 @@
|
||||
var/immune_to_ssd = 0
|
||||
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
|
||||
var/list/active_genes=list()
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
name = "Cut Hair"
|
||||
icon_state = "hair_c"
|
||||
|
||||
flair
|
||||
name = "Flaired Hair"
|
||||
icon_state = "hair_flair"
|
||||
|
||||
long
|
||||
name = "Shoulder-length Hair"
|
||||
icon_state = "hair_b"
|
||||
@@ -420,7 +424,7 @@
|
||||
|
||||
una_frills_short
|
||||
name = "Short Unathi Frills"
|
||||
icon_state = "soghun_shortfrill"
|
||||
icon_state = "soghun_shortfrills"
|
||||
species_allowed = list("Unathi")
|
||||
do_colouration = 0
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/datum/nanoui/ui = locate(uiref)
|
||||
|
||||
if (ui)
|
||||
if (istype(ui))
|
||||
ui.close()
|
||||
|
||||
if(ui.ref)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// This is the window/UI manager for Nano UI
|
||||
// There should only ever be one (global) instance of nanomanger
|
||||
/datum/nanomanager
|
||||
// the list of current open /nanoui UIs
|
||||
// a list of current open /nanoui UIs, grouped by src_object and ui_key
|
||||
var/open_uis[0]
|
||||
// a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
var/list/processing_uis = list()
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,7 @@
|
||||
/**
|
||||
* Update all /nanoui uis attached to src_object
|
||||
*
|
||||
* @param src_object /obj|/mob The obj or mob which the uis belong to
|
||||
* @param src_object /obj|/mob The obj or mob which the uis are attached to
|
||||
*
|
||||
* @return int The number of uis updated
|
||||
*/
|
||||
@@ -54,6 +55,48 @@
|
||||
ui.process(1)
|
||||
update_count++
|
||||
return update_count
|
||||
|
||||
/**
|
||||
* Update /nanoui uis belonging to user
|
||||
*
|
||||
* @param user /mob The mob who owns the uis
|
||||
* @param src_object /obj|/mob If src_object is provided, only update uis which are attached to src_object (optional)
|
||||
* @param ui_key string If ui_key is provided, only update uis with a matching ui_key (optional)
|
||||
*
|
||||
* @return int The number of uis updated
|
||||
*/
|
||||
/datum/nanomanager/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
|
||||
return 0 // has no open uis
|
||||
|
||||
var/update_count = 0
|
||||
for (var/datum/nanoui/ui in user.open_uis)
|
||||
if ((isnull(src_object) || !isnull(src_object) && ui.src_object == src_object) && (isnull(ui_key) || !isnull(ui_key) && ui.ui_key == ui_key))
|
||||
ui.process(1)
|
||||
update_count++
|
||||
|
||||
return update_count
|
||||
|
||||
/**
|
||||
* Close /nanoui uis belonging to user
|
||||
*
|
||||
* @param user /mob The mob who owns the uis
|
||||
* @param src_object /obj|/mob If src_object is provided, only close uis which are attached to src_object (optional)
|
||||
* @param ui_key string If ui_key is provided, only close uis with a matching ui_key (optional)
|
||||
*
|
||||
* @return int The number of uis closed
|
||||
*/
|
||||
/datum/nanomanager/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
|
||||
return 0 // has no open uis
|
||||
|
||||
var/close_count = 0
|
||||
for (var/datum/nanoui/ui in user.open_uis)
|
||||
if ((isnull(src_object) || !isnull(src_object) && ui.src_object == src_object) && (isnull(ui_key) || !isnull(ui_key) && ui.ui_key == ui_key))
|
||||
ui.close()
|
||||
close_count++
|
||||
|
||||
return close_count
|
||||
|
||||
/**
|
||||
* Add a /nanoui ui to the list of open uis
|
||||
@@ -106,11 +149,29 @@
|
||||
|
||||
//
|
||||
/datum/nanomanager/proc/user_logout(var/mob/user)
|
||||
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
|
||||
return close_user_uis(user)
|
||||
|
||||
/**
|
||||
* This is called when a player transfers from one mob to another
|
||||
* Transfers all open UIs to the new mob
|
||||
*
|
||||
* @param oldMob /mob The user's old mob
|
||||
* @param newMob /mob The user's new mob
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob)
|
||||
if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
|
||||
return 0 // has no open uis
|
||||
|
||||
for (var/datum/nanoui/ui in user.open_uis)
|
||||
ui.close();
|
||||
if (isnull(newMob.open_uis) || !istype(newMob.open_uis, /list))
|
||||
newMob.open_uis = list()
|
||||
|
||||
for (var/datum/nanoui/ui in oldMob.open_uis)
|
||||
ui.user = newMob
|
||||
newMob.open_uis.Add(ui)
|
||||
|
||||
oldMob.open_uis.Cut()
|
||||
|
||||
return 1 // success
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user