Merge branch 'master' into upstream-merge-33663

This commit is contained in:
LetterJay
2017-12-30 13:29:36 -06:00
committed by GitHub
334 changed files with 6251 additions and 23299 deletions

View File

@@ -107,8 +107,6 @@ GLOBAL_VAR(LastAdminCalledTarget)
GLOBAL_PROTECT(LastAdminCalledTarget)
GLOBAL_VAR(LastAdminCalledProc)
GLOBAL_PROTECT(LastAdminCalledProc)
GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention)
GLOBAL_PROTECT(AdminProcCallSpamPrevention)
/proc/WrapAdminProcCall(target, procname, list/arguments)
var/current_caller = GLOB.AdminProcCaller
@@ -116,14 +114,9 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!ckey)
CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
if(current_caller && current_caller != ckey)
if(!GLOB.AdminProcCallSpamPrevention[ckey])
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
GLOB.AdminProcCallSpamPrevention[ckey] = TRUE
UNTIL(!GLOB.AdminProcCaller)
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
GLOB.AdminProcCallSpamPrevention -= ckey
else
UNTIL(!GLOB.AdminProcCaller)
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
UNTIL(!GLOB.AdminProcCaller)
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
GLOB.LastAdminCalledProc = procname
if(target != GLOBAL_PROC)
GLOB.LastAdminCalledTargetRef = "[REF(target)]"

View File

@@ -45,8 +45,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/manipulate_organs,
/client/proc/start_line_profiling,
/client/proc/stop_line_profiling,
/client/proc/show_line_profiling,
/client/proc/create_mapping_job_icons
/client/proc/show_line_profiling
))
/obj/effect/debugging/mapfix_marker
@@ -266,31 +265,3 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
else
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")
//This generates the icon states for job starting location landmarks.
/client/proc/create_mapping_job_icons()
set name = "Generate job landmarks icons"
set category = "Mapping"
var/icon/final = icon()
var/mob/living/carbon/human/dummy/D = new(locate(1,1,1)) //spawn on 1,1,1 so we don't have runtimes when items are deleted
D.setDir(SOUTH)
for(var/job in subtypesof(/datum/job))
var/datum/job/JB = new job
switch(JB.title)
if("AI")
final.Insert(icon('icons/mob/ai.dmi', "ai", SOUTH, 1), "AI")
if("Cyborg")
final.Insert(icon('icons/mob/robots.dmi', "robot", SOUTH, 1), "Cyborg")
else
for(var/obj/item/I in D)
qdel(I)
randomize_human(D)
JB.equip(D, TRUE, FALSE)
COMPILE_OVERLAYS(D)
var/icon/I = icon(getFlatIcon(D), frame = 1)
final.Insert(I, JB.title)
qdel(D)
//Also add the x
for(var/x_number in 1 to 4)
final.Insert(icon('icons/mob/screen_gen.dmi', "x[x_number == 1 ? "" : x_number]"), "x[x_number == 1 ? "" : x_number]")
fcopy(final, "icons/mob/landmarks.dmi")

View File

@@ -80,32 +80,14 @@
to_chat(src, "<span class='warning'>For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website.</span>")
return
var/shell_scrubbed_input = shell_url_scrub(web_sound_input)
var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_scrubbed_input]\"")
var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --get-url \"[shell_scrubbed_input]\"")
var/errorlevel = output[SHELLEO_ERRORLEVEL]
var/stdout = output[SHELLEO_STDOUT]
var/stderr = output[SHELLEO_STDERR]
if(!errorlevel)
var/list/data
try
data = json_decode(stdout)
catch(var/exception/e)
to_chat(src, "<span class='boldwarning'>Youtube-dl JSON parsing FAILED:</span>")
to_chat(src, "<span class='warning'>[e]: [stdout]</span>")
return
if (data["url"])
web_sound_url = data["url"]
var/title = "[data["title"]]"
var/webpage_url = title
if (data["webpage_url"])
webpage_url = "<a href=\"[data["webpage_url"]]\">[title]</a>"
var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
switch(res)
if("Yes")
to_chat(world, "<span class='boldannounce'>An admin played: [webpage_url]</span>")
if("Cancel")
return
var/static/regex/content_url_regex = regex("https?://\\S+")
if(content_url_regex.Find(stdout))
web_sound_url = content_url_regex.match
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
pitch = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)

View File

@@ -523,7 +523,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(isturf(D))
var/turf/T = D
T.ChangeTurf(T.baseturf)
T.ScrapeAway()
else
qdel(D)

View File

@@ -30,7 +30,7 @@
holder.update_icon()
/obj/item/device/assembly/flash/proc/clown_check(mob/living/carbon/human/user)
if(user.has_disability(CLUMSY) && prob(50))
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
flash_carbon(user, user, 15, 0)
return 0
return 1

View File

@@ -1,142 +1,142 @@
/obj/item/device/assembly/mousetrap
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
materials = list(MAT_METAL=100)
attachable = 1
var/armed = 0
/obj/item/device/assembly/mousetrap/examine(mob/user)
..()
if(armed)
to_chat(user, "The mousetrap is armed!")
else
to_chat(user, "The mousetrap is not armed.")
/obj/item/device/assembly/mousetrap/activate()
if(..())
armed = !armed
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50))
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
pulse(0)
update_icon()
if(usr)
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/describe()
return "The pressure switch is [armed?"primed":"safe"]."
/obj/item/device/assembly/mousetrap/update_icon()
if(armed)
icon_state = "mousetraparmed"
else
icon_state = "mousetrap"
if(holder)
holder.update_icon()
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
if(!armed)
return
var/obj/item/bodypart/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(PIERCEIMMUNE in H.dna.species.species_traits)
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
pulse(0)
return 0
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_bodypart(pick("l_leg", "r_leg"))
H.Knockdown(60)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_bodypart(type)
H.Stun(60)
if(affecting)
if(affecting.receive_damage(1, 0))
H.update_damage_overlays()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("<span class='boldannounce'>SPLAT!</span>")
M.splat()
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
pulse(0)
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
if(!armed)
to_chat(user, "<span class='notice'>You arm [src].</span>")
else
if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50))
var/which_hand = "l_hand"
if(!(user.active_hand_index % 2))
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
to_chat(user, "<span class='notice'>You disarm [src].</span>")
armed = !armed
update_icon()
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
if(armed)
if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50))
var/which_hand = "l_hand"
if(!(user.active_hand_index % 2))
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
..()
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
if(armed)
if(ismob(AM))
var/mob/MM = AM
if(!(MM.movement_type & FLYING))
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == MOVE_INTENT_RUN)
triggered(H)
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
else if(ismouse(MM))
triggered(MM)
else if(AM.density) // For mousetrap grenades, set off by anything heavy
triggered(AM)
..()
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
return 1 //end the search!
return 0
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
triggered(null)
/obj/item/device/assembly/mousetrap/armed
icon_state = "mousetraparmed"
armed = 1
/obj/item/device/assembly/mousetrap
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
materials = list(MAT_METAL=100)
attachable = 1
var/armed = 0
/obj/item/device/assembly/mousetrap/examine(mob/user)
..()
if(armed)
to_chat(user, "The mousetrap is armed!")
else
to_chat(user, "The mousetrap is not armed.")
/obj/item/device/assembly/mousetrap/activate()
if(..())
armed = !armed
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50))
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
pulse(0)
update_icon()
if(usr)
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/describe()
return "The pressure switch is [armed?"primed":"safe"]."
/obj/item/device/assembly/mousetrap/update_icon()
if(armed)
icon_state = "mousetraparmed"
else
icon_state = "mousetrap"
if(holder)
holder.update_icon()
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
if(!armed)
return
var/obj/item/bodypart/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(PIERCEIMMUNE in H.dna.species.species_traits)
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
pulse(0)
return 0
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_bodypart(pick("l_leg", "r_leg"))
H.Knockdown(60)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_bodypart(type)
H.Stun(60)
if(affecting)
if(affecting.receive_damage(1, 0))
H.update_damage_overlays()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("<span class='boldannounce'>SPLAT!</span>")
M.splat()
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
armed = 0
update_icon()
pulse(0)
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
if(!armed)
to_chat(user, "<span class='notice'>You arm [src].</span>")
else
if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50))
var/which_hand = "l_hand"
if(!(user.active_hand_index % 2))
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
to_chat(user, "<span class='notice'>You disarm [src].</span>")
armed = !armed
update_icon()
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
if(armed)
if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50))
var/which_hand = "l_hand"
if(!(user.active_hand_index % 2))
which_hand = "r_hand"
triggered(user, which_hand)
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
..()
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
if(armed)
if(ismob(AM))
var/mob/MM = AM
if(!(MM.movement_type & FLYING))
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == MOVE_INTENT_RUN)
triggered(H)
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
"<span class='warning'>You accidentally step on [src]</span>")
else if(ismouse(MM))
triggered(MM)
else if(AM.density) // For mousetrap grenades, set off by anything heavy
triggered(AM)
..()
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
return 1 //end the search!
return 0
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
if(!armed)
return ..()
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
triggered(null)
/obj/item/device/assembly/mousetrap/armed
icon_state = "mousetraparmed"
armed = 1

View File

@@ -168,7 +168,7 @@
else
chance_of_deletion = 100
if(prob(chance_of_deletion))
T.ChangeTurf(T.baseturf)
T.ScrapeAway()
else
T.to_be_destroyed = FALSE
T.max_fire_temperature_sustained = 0

View File

@@ -452,11 +452,7 @@
for(var/device_id in A.air_scrub_names)
send_signal(device_id, list(
"power" = 1,
"co2_scrub" = 1,
"tox_scrub" = 0,
"n2o_scrub" = 0,
"rare_scrub"= 0,
"water_vapor_scrub"= 0,
"set_filters" = list(/datum/gas/carbon_dioxide),
"scrubbing" = 1,
"widenet" = 0,
))
@@ -470,11 +466,18 @@
for(var/device_id in A.air_scrub_names)
send_signal(device_id, list(
"power" = 1,
"co2_scrub" = 1,
"tox_scrub" = 1,
"n2o_scrub" = 1,
"rare_scrub"= 1,
"water_vapor_scrub"= 1,
"set_filters" = list(
/datum/gas/carbon_dioxide,
/datum/gas/plasma,
/datum/gas/water_vapor,
/datum/gas/hypernoblium,
/datum/gas/nitrous_oxide,
/datum/gas/nitryl,
/datum/gas/tritium,
/datum/gas/bz,
/datum/gas/stimulum,
/datum/gas/pluoxium
),
"scrubbing" = 1,
"widenet" = 1,
))
@@ -501,11 +504,7 @@
for(var/device_id in A.air_scrub_names)
send_signal(device_id, list(
"power" = 1,
"co2_scrub" = 1,
"tox_scrub" = 0,
"n2o_scrub" = 0,
"rare_scrub"= 0,
"water_vapor_scrub"= 0,
"set_filters" = list(/datum/gas/carbon_dioxide),
"scrubbing" = 1,
"widenet" = 0,
))

View File

@@ -242,6 +242,11 @@
if("toggle_filter" in signal.data)
filter_types ^= gas_id2path(signal.data["toggle_filter"])
if("set_filters" in signal.data)
filter_types = list()
for(var/gas in signal.data["set_filters"])
filter_types += gas_id2path(gas)
if("init" in signal.data)
name = signal.data["init"]
return

View File

@@ -26,6 +26,7 @@
flags_2 = SLOWS_WHILE_IN_HAND_2
var/team = WHITE_TEAM
var/reset_cooldown = 0
var/anyonecanpickup = TRUE
var/obj/effect/ctf/flag_reset/reset
var/reset_path = /obj/effect/ctf/flag_reset
@@ -48,7 +49,7 @@
STOP_PROCESSING(SSobj, src)
/obj/item/twohanded/ctf/attack_hand(mob/living/user)
if(!is_ctf_target(user))
if(!is_ctf_target(user) && !anyonecanpickup)
to_chat(user, "Non players shouldn't be moving the flag!")
return
if(team in user.faction)

View File

@@ -372,39 +372,3 @@ GLOBAL_LIST_EMPTY(asset_datums)
var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states)
if(meter)
register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter))
// Representative icons for each research design
/datum/asset/simple/research_designs/register()
for (var/path in subtypesof(/datum/design))
var/datum/design/D = path
// construct the icon and slap it into the resource cache
var/atom/item = initial(D.build_path)
if (!ispath(item, /atom))
// biogenerator outputs to beakers by default
if (initial(D.build_type) & BIOGENERATOR)
item = /obj/item/reagent_containers/glass/beaker/large
else
continue // shouldn't happen, but just in case
// circuit boards become their resulting machines or computers
if (ispath(item, /obj/item/circuitboard))
var/obj/item/circuitboard/C = item
var/machine = initial(C.build_path)
if (machine)
item = machine
var/icon_file = initial(item.icon)
var/icon/I = icon(icon_file, initial(item.icon_state), SOUTH)
// computers (and snowflakes) get their screen and keyboard sprites
if (ispath(item, /obj/machinery/computer) || ispath(item, /obj/machinery/power/solar_control))
var/obj/machinery/computer/C = item
var/screen = initial(C.icon_screen)
var/keyboard = initial(C.icon_keyboard)
if (screen)
I.Blend(icon(icon_file, screen, SOUTH), ICON_OVERLAY)
if (keyboard)
I.Blend(icon(icon_file, keyboard, SOUTH), ICON_OVERLAY)
assets["design_[initial(D.id)].png"] = I
return ..()

View File

@@ -75,7 +75,8 @@
//Logs all hrefs, except chat pings
if(!(href_list["_src_"] == "chat" && href_list["proc"] == "ping" && LAZYLEN(href_list) == 2))
WRITE_FILE(GLOB.world_href_log, "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>")
WRITE_FILE(GLOB.world_href_log, "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr]\[[COORD(usr)]\])</small> || [hsrc ? "[hsrc] " : ""][href]<br>")
// Admin PM
if(href_list["priv_msg"])
cmd_admin_pm(href_list["priv_msg"],null)
@@ -199,7 +200,9 @@ GLOBAL_LIST(external_rsc_urls)
prefs.parent = src
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
fps = prefs.clientfps
if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps)
vars["fps"] = prefs.clientfps
sethotkeys(1) //set hoykeys from preferences (from_pref = 1)
log_access("Login: [key_name(src)] from [address ? address : "localhost"]-[computer_id] || BYOND v[byond_version]")
var/alert_mob_dupe_login = FALSE

View File

@@ -1282,10 +1282,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
preferred_map = maplist[pickedmap]
if ("clientfps")
var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
var/version_message
if (user.client && user.client.byond_version < 511)
version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low"
if (world.byond_version < 511)
version_message += "\nThis server does not currently support client side fps. You can set now for when it does."
var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
if (!isnull(desiredfps))
clientfps = desiredfps
parent.fps = desiredfps
if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
user.client.vars["fps"] = clientfps
if("ui")
var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork")
if(pickedui)

View File

@@ -206,6 +206,7 @@
sensor_mode = SENSOR_OFF //Hey who's this guy on the Syndicate Shuttle??
random_sensor = FALSE
resistance_flags = NONE
can_adjust = FALSE
armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/datum/action/item_action/chameleon/change/chameleon_action

View File

@@ -41,7 +41,7 @@
/obj/item/clothing/glasses/proc/thermal_overload()
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(!(H.has_disability(BLIND)))
if(!(H.has_disability(DISABILITY_BLIND)))
if(H.glasses == src)
to_chat(H, "<span class='danger'>[src] overloads and blinds you!</span>")
H.flash_act(visual = 1)

View File

@@ -192,7 +192,7 @@
item_state = "wgloves"
item_color = "mime"
/obj/item/clothing/gloves/color/random/New()
/obj/item/clothing/gloves/color/random/Initialize()
..()
var/list/gloves = list(
/obj/item/clothing/gloves/color/orange = 1,
@@ -205,9 +205,5 @@
/obj/item/clothing/gloves/color/brown = 1)
var/obj/item/clothing/gloves/color/selected = pick(gloves)
name = initial(selected.name)
desc = initial(selected.desc)
icon_state = initial(selected.icon_state)
item_state = initial(selected.item_state)
item_color = initial(selected.item_color)
new selected(loc)
return INITIALIZE_HINT_QDEL

View File

@@ -1,49 +1,48 @@
/obj/item/clothing/suit/toggle/labcoat
name = "labcoat"
desc = "A suit that protects against minor chemical spills."
icon_state = "labcoat"
item_state = "labcoat"
blood_overlay_type = "coat"
body_parts_covered = CHEST|ARMS
allowed = list(/obj/item/device/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/device/healthanalyzer, /obj/item/device/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/soap, /obj/item/device/sensor_device, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50)
togglename = "buttons"
species_exception = list(/datum/species/golem)
/obj/item/clothing/suit/toggle/labcoat/cmo
name = "chief medical officer's labcoat"
desc = "Bluer than the standard model."
icon_state = "labcoat_cmo"
item_state = "labcoat_cmo"
/obj/item/clothing/suit/toggle/labcoat/emt
name = "EMT's jacket"
desc = "A dark blue jacket with reflective strips for emergency medical technicians."
icon_state = "labcoat_emt"
item_state = "labcoat_cmo"
/obj/item/clothing/suit/toggle/labcoat/mad
name = "\improper The Mad's labcoat"
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
icon_state = "labgreen"
item_state = "labgreen"
/obj/item/clothing/suit/toggle/labcoat/genetics
name = "geneticist labcoat"
desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder."
icon_state = "labcoat_gen"
/obj/item/clothing/suit/toggle/labcoat/chemist
name = "chemist labcoat"
desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder."
icon_state = "labcoat_chem"
/obj/item/clothing/suit/toggle/labcoat/virologist
name = "virologist labcoat"
desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder."
icon_state = "labcoat_vir"
/obj/item/clothing/suit/toggle/labcoat/science
name = "scientist labcoat"
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
icon_state = "labcoat_tox"
/obj/item/clothing/suit/toggle/labcoat
name = "labcoat"
desc = "A suit that protects against minor chemical spills."
icon_state = "labcoat"
item_state = "labcoat"
blood_overlay_type = "coat"
body_parts_covered = CHEST|ARMS
allowed = list(/obj/item/device/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/device/healthanalyzer, /obj/item/device/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/soap, /obj/item/device/sensor_device, /obj/item/tank/internals/emergency_oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50)
togglename = "buttons"
/obj/item/clothing/suit/toggle/labcoat/cmo
name = "chief medical officer's labcoat"
desc = "Bluer than the standard model."
icon_state = "labcoat_cmo"
item_state = "labcoat_cmo"
/obj/item/clothing/suit/toggle/labcoat/emt
name = "EMT's jacket"
desc = "A dark blue jacket with reflective strips for emergency medical technicians."
icon_state = "labcoat_emt"
item_state = "labcoat_cmo"
/obj/item/clothing/suit/toggle/labcoat/mad
name = "\improper The Mad's labcoat"
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
icon_state = "labgreen"
item_state = "labgreen"
/obj/item/clothing/suit/toggle/labcoat/genetics
name = "geneticist labcoat"
desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder."
icon_state = "labcoat_gen"
/obj/item/clothing/suit/toggle/labcoat/chemist
name = "chemist labcoat"
desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder."
icon_state = "labcoat_chem"
/obj/item/clothing/suit/toggle/labcoat/virologist
name = "virologist labcoat"
desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder."
icon_state = "labcoat_vir"
/obj/item/clothing/suit/toggle/labcoat/science
name = "scientist labcoat"
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
icon_state = "labcoat_tox"

View File

@@ -4,13 +4,11 @@
/obj/item/clothing/under/color/random
icon_state = "random_jumpsuit"
/obj/item/clothing/under/color/random/New()
/obj/item/clothing/under/color/random/Initialize()
..()
var/obj/item/clothing/under/color/C = pick(subtypesof(/obj/item/clothing/under/color) - /obj/item/clothing/under/color/random)
name = initial(C.name)
icon_state = initial(C.icon_state)
item_state = initial(C.item_state)
item_color = initial(C.item_color)
var/obj/item/clothing/under/color/C = pick(subtypesof(/obj/item/clothing/under/color) - /obj/item/clothing/under/color/random - /obj/item/clothing/under/color/grey/glorf - /obj/item/clothing/under/color/black/ghost)
new C(loc)
return INITIALIZE_HINT_QDEL
/obj/item/clothing/under/color/black
name = "black jumpsuit"

View File

@@ -13,7 +13,7 @@
var/max_severity = 3
/datum/round_event/disease_outbreak/announce(fake)
/datum/round_event/disease_outbreak/announce()
priority_announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak7.ogg')
/datum/round_event/disease_outbreak/setup()
@@ -33,7 +33,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(!(T.z in GLOB.station_z_levels))
if(T.z != ZLEVEL_STATION_PRIMARY)
continue
if(!H.client)
continue
@@ -51,7 +51,7 @@
var/datum/disease/D
if(!advanced_virus)
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if(!H.dna || (H.has_disability(BLIND))) //A blindness disease would be the worst.
if(!H.dna || (H.has_disability(DISABILITY_BLIND))) //A blindness disease would be the worst.
continue
D = new virus_type()
var/datum/disease/dnaspread/DS = D

View File

@@ -72,6 +72,9 @@
freeze_projectile(A)
else
return FALSE
into_the_negative_zone(A)
return TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_all()
@@ -106,6 +109,7 @@
return ..()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_projectile(obj/item/projectile/P)
escape_the_negative_zone(P)
frozen_projectiles -= P
P.paused = FALSE
@@ -123,9 +127,18 @@
H.LoseTarget()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
escape_the_negative_zone(L)
L.AdjustStun(-20, 1, 1)
L.anchored = frozen_mobs[L]
frozen_mobs -= L
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L
H.toggle_ai(initial(H.AIStatus))
//you don't look quite right, is something the matter?
/datum/proximity_monitor/advanced/timestop/proc/into_the_negative_zone(atom/A)
A.add_atom_colour(list(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,1, 1,1,1,0), TEMPORARY_COLOUR_PRIORITY)
//let's put some colour back into your cheeks
/datum/proximity_monitor/advanced/timestop/proc/escape_the_negative_zone(atom/A)
A.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)

View File

@@ -27,7 +27,6 @@
list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2)
tastes = list("pie" = 1)
foodtype = GRAIN | DAIRY | SUGAR
var/stunning = TRUE
/obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom)
. = ..()
@@ -47,18 +46,15 @@
creamoverlay.icon_state = "creampie_lizard"
else
creamoverlay.icon_state = "creampie_human"
if(stunning)
H.Knockdown(20) //splat!
H.Knockdown(20) //splat!
H.adjust_blurriness(1)
H.visible_message("<span class='warning'>[H] is creamed by [src]!</span>", "<span class='userdanger'>You've been creamed by [src]!</span>")
playsound(H, "desceration", 50, TRUE)
if(!H.creamed) // one layer at a time
if (!H.creamed) // one layer at a time
H.add_overlay(creamoverlay)
H.creamed = TRUE
qdel(src)
/obj/item/reagent_containers/food/snacks/pie/cream/nostun
stunning = FALSE
/obj/item/reagent_containers/food/snacks/pie/berryclafoutis
name = "berry clafoutis"

View File

@@ -1,3 +1,4 @@
/obj/machinery/gibber
name = "gibber"
desc = "The name isn't descriptive enough?"
@@ -11,10 +12,10 @@
circuit = /obj/item/circuitboard/machine/gibber
var/operating = FALSE //Is it on?
var/dirty = FALSE // Does it need cleaning?
var/dirty = 0 // Does it need cleaning?
var/gibtime = 40 // Time from starting until meat appears
var/meat_produced = 0
var/ignore_clothing = FALSE
var/ignore_clothing = 0
/obj/machinery/gibber/Initialize()
@@ -29,7 +30,7 @@
gib_time -= 5 * M.rating
gibtime = gib_time
if(M.rating >= 2)
ignore_clothing = TRUE
ignore_clothing = 1
/obj/machinery/gibber/update_icon()
cut_overlays()
@@ -60,10 +61,6 @@
to_chat(user, "<span class='danger'>It's locked and running.</span>")
return
if(!anchored)
to_chat(user, "<span class='notice'>[src] cannot be used unless bolted to the ground.</span>")
return
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(!iscarbon(L))
@@ -73,17 +70,12 @@
if(C.buckled ||C.has_buckled_mobs())
to_chat(user, "<span class='warning'>[C] is attached to something!</span>")
return
if(!ignore_clothing)
for(var/obj/item/I in C.held_items + C.get_equipped_items())
if(!(I.flags_1 & NODROP_1))
to_chat(user, "<span class='danger'>Subject may not have abiotic items on.</span>")
return
if(C.abiotic(1) && !ignore_clothing)
to_chat(user, "<span class='danger'>Subject may not have abiotic items on.</span>")
return
user.visible_message("<span class='danger'>[user] starts to put [C] into the gibber!</span>")
add_fingerprint(user)
src.add_fingerprint(user)
if(do_after(user, gibtime, target = src))
if(C && user.pulling == C && !C.buckled && !C.has_buckled_mobs() && !occupant)
user.visible_message("<span class='danger'>[user] stuffs [C] into the gibber!</span>")

View File

@@ -399,9 +399,6 @@ h1.alert, h2.alert {color: #000000;}
.love {color: #FF69Bf;}
.lovebold {color: #FF69Bf; font-weight: bold;}
.monkeyhive {color: #774704;}
.monkeylead {color: #774704; font-size: 2;}
.connectionClosed, .fatalError {background: red; color: white; padding: 5px;}
.connectionClosed.restored {background: green;}

View File

@@ -641,7 +641,11 @@ $(function() {
opts.updatedVolume = newVolume;
sendVolumeUpdate();
internalOutput('<span class="internal boldnshit">Loaded music volume of: '+savedConfig.smusicVolume+'</span>', 'internal');
}
}
else{
$('#adminMusic').prop('volume', opts.defaultMusicVolume / 100);
}
if (savedConfig.smessagecombining) {
if (savedConfig.smessagecombining == 'false') {
opts.messageCombining = false;
@@ -649,9 +653,7 @@ $(function() {
opts.messageCombining = true;
}
}
else {
$('#adminMusic').prop('volume', opts.defaultMusicVolume / 100);
}
(function() {
var dataCookie = getCookie('connData');

View File

@@ -9,8 +9,6 @@
var/begin_weekday = FALSE //If set to a weekday, then this will trigger the holiday on the above week
var/always_celebrate = FALSE // for christmas neverending, or testing.
var/obj/item/drone_hat //If this is defined, drones without a default hat will spawn with this one during the holiday; check drones_as_items.dm to see this used
// This proc gets run before the game starts when the holiday is activated. Do festive shit here.
/datum/holiday/proc/celebrate()
return
@@ -174,13 +172,11 @@
name = "Labor Day"
begin_day = 1
begin_month = MAY
drone_hat = /obj/item/clothing/head/hardhat
/datum/holiday/firefighter
name = "Firefighter's Day"
begin_day = 4
begin_month = MAY
drone_hat = /obj/item/clothing/head/hardhat/red
/datum/holiday/firefighter/getStationPrefix()
return pick("Burning","Blazing","Plasma","Fire")
@@ -194,7 +190,6 @@
name = "Doctor's Day"
begin_day = 1
begin_month = JULY
drone_hat = /obj/item/clothing/head/nursehat
/datum/holiday/UFO
name = "UFO Day"
@@ -226,7 +221,6 @@
name = "Talk-Like-a-Pirate Day"
begin_day = 19
begin_month = SEPTEMBER
drone_hat = /obj/item/clothing/head/pirate
/datum/holiday/pirate/greet()
return "Ye be talkin' like a pirate today or else ye'r walkin' tha plank, matey!"
@@ -327,7 +321,6 @@
begin_week = 4
begin_month = NOVEMBER
begin_weekday = THURSDAY
drone_hat = /obj/item/clothing/head/that //This is the closest we can get to a pilgrim's hat
/datum/holiday/thanksgiving/canada
name = "Thanksgiving in Canada"
@@ -391,14 +384,12 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and
name = "Mayan Doomsday Anniversary"
begin_day = 21
begin_month = DECEMBER
drone_hat = /obj/item/clothing/mask/rat/tribal
/datum/holiday/xmas
name = CHRISTMAS
begin_day = 22
begin_month = DECEMBER
end_day = 27
drone_hat = /obj/item/clothing/head/santa
/datum/holiday/xmas/greet()
return "Have a merry Christmas!"
@@ -419,7 +410,6 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and
begin_day = 1
begin_month = DECEMBER
end_day = 31
drone_hat = /obj/item/clothing/head/santa
/datum/holiday/festive_season/greet()
return "Have a nice festive season!"
@@ -442,7 +432,6 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and
/datum/holiday/easter
name = EASTER
drone_hat = /obj/item/clothing/head/rabbitears
var/const/days_early = 1 //to make editing the holiday easier
var/const/days_extra = 1

View File

@@ -45,7 +45,7 @@
min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low
min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low
for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts)
if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DUMB BOTANY TUTS
if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DISABILITY_DUMB BOTANY TUTS
max_potency = 100
max_yield = 10
min_production = 1

View File

@@ -146,7 +146,7 @@
/obj/item/reagent_containers/food/snacks/grown/on_grind()
var/nutriment = reagents.get_reagent_amount("nutriment")
if(grind_results&&grind_results.len)
if(grind_results.len)
for(var/i in 1 to grind_results.len)
grind_results[grind_results[i]] = nutriment
reagents.del_reagent("nutriment")
@@ -154,7 +154,7 @@
/obj/item/reagent_containers/food/snacks/grown/on_juice()
var/nutriment = reagents.get_reagent_amount("nutriment")
if(juice_results&&juice_results.len)
if(juice_results.len)
for(var/i in 1 to juice_results.len)
juice_results[juice_results[i]] = nutriment
reagents.del_reagent("nutriment")

View File

@@ -15,7 +15,6 @@
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/apple/gold)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
juice_results = list("applejuice" = 0)
/obj/item/reagent_containers/food/snacks/grown/apple
seed = /obj/item/seeds/apple
@@ -25,6 +24,7 @@
filling_color = "#FF4500"
bitesize = 100 // Always eat the apple in one bite
foodtype = FRUIT
juice_results = list("applejuice" = 0)
// Posioned Apple
/obj/item/seeds/apple/poisoned

View File

@@ -13,7 +13,6 @@
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/banana/mime, /obj/item/seeds/banana/bluespace)
reagents_add = list("banana" = 0.1, "potassium" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
juice_results = list("banana" = 0)
/obj/item/reagent_containers/food/snacks/grown/banana
seed = /obj/item/seeds/banana
@@ -25,6 +24,7 @@
filling_color = "#FFFF00"
bitesize = 5
foodtype = FRUIT
juice_results = list("banana" = 0)
/obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is aiming [src] at [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")

View File

@@ -17,7 +17,6 @@
genes = list(/datum/plant_gene/trait/battery)
mutatelist = list(/obj/item/seeds/potato/sweet)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
juice_results = list("potato" = 0)
/obj/item/reagent_containers/food/snacks/grown/potato
seed = /obj/item/seeds/potato
@@ -27,6 +26,7 @@
filling_color = "#E9967A"
bitesize = 100
foodtype = VEGETABLES
juice_results = list("potato" = 0)
/obj/item/reagent_containers/food/snacks/grown/potato/wedges

View File

@@ -20,8 +20,6 @@
var/charge_tick = FALSE
var/charge_delay = 4
var/use_cyborg_cell = TRUE
max_integrity = 50
armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0)
/obj/item/device/electronic_assembly/proc/check_interactivity(mob/user)
return user.canUseTopic(src,be_close = TRUE)
@@ -32,6 +30,8 @@
START_PROCESSING(SScircuit, src)
materials[MAT_METAL] = round((max_complexity + max_components) / 4) * SScircuit.cost_multiplier
/obj/item/device/electronic_assembly/Destroy()
STOP_PROCESSING(SScircuit, src)
return ..()
@@ -273,9 +273,22 @@
/obj/item/device/electronic_assembly/afterattack(atom/target, mob/user, proximity)
for(var/obj/item/integrated_circuit/input/S in assembly_components)
if(S.sense(target,user,proximity))
visible_message("<span class='notice'> [user] waves [src] around [target].</span>")
for(var/obj/item/integrated_circuit/input/sensor/S in assembly_components)
if(!proximity)
if(istype(S,/obj/item/integrated_circuit/input/sensor/ranged)||(!user))
if(user.client)
if(!(target in view(user.client)))
continue
else
if(!(target in view(user)))
continue
else
continue
S.set_pin_data(IC_OUTPUT, 1, WEAKREF(target))
S.check_then_do_work()
S.scan(target)
visible_message("<span class='notice'> [user] waves [src] around [target].</span>")
/obj/item/device/electronic_assembly/screwdriver_act(mob/living/user, obj/item/S)
@@ -313,11 +326,8 @@
interact(user)
return TRUE
else
for(var/obj/item/integrated_circuit/input/S in assembly_components)
S.attackby_react(I,user,user.a_intent)
return ..()
/obj/item/device/electronic_assembly/attack_self(mob/user)
if(!check_interactivity(user))
return
@@ -381,6 +391,7 @@
/obj/item/device/electronic_assembly/proc/get_object()
return src
// Returns the location to be used for dropping items.
// Same as the regular drop_location(), but with checks being run on acting_object if necessary.
/obj/item/integrated_circuit/drop_location()
@@ -395,7 +406,6 @@
/obj/item/device/electronic_assembly/default //The /default electronic_assemblys are to allow the introduction of the new naming scheme without breaking old saves.
name = "type-a electronic assembly"
/obj/item/device/electronic_assembly/calc
name = "type-b electronic assembly"
icon_state = "setup_small_calc"
@@ -497,4 +507,4 @@
/obj/item/device/electronic_assembly/drone/arms
name = "type-b electronic drone"
icon_state = "setup_drone_arms"
desc = "It's a case, for building mobile electronics with. This one is armed and dangerous."
desc = "It's a case, for building mobile electronics with. This one is armed and dangerous."

View File

@@ -56,7 +56,7 @@
data_to_show = A.name
to_chat(user, "<span class='notice'>You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].</span>")
else if(io.io_type == PULSE_CHANNEL)
io.holder.check_then_do_work(io.ord,ignore_power = TRUE)
io.holder.check_then_do_work(ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [io.holder]'s [io].</span>")
io.holder.interact(user) // This is to update the UI.

View File

@@ -15,9 +15,9 @@
io_type_override = io_list_copy[io_entry]
if(io_type_override)
io_list.Add(new io_type_override(src, io_entry, default_data, pin_type,i))
io_list.Add(new io_type_override(src, io_entry, default_data, pin_type))
else
io_list.Add(new io_type(src, io_entry, default_data, pin_type,i))
io_list.Add(new io_type(src, io_entry, default_data, pin_type))
/obj/item/integrated_circuit/proc/set_pin_data(pin_type, pin_number, datum/new_data)

View File

@@ -58,12 +58,6 @@ a creative player the means to solve many problems. Circuits are held inside an
/obj/item/integrated_circuit/proc/any_examine(mob/user)
return
/obj/item/integrated_circuit/proc/attackby_react(var/atom/movable/A,mob/user)
return
/obj/item/integrated_circuit/proc/sense(var/atom/movable/A,mob/user,prox)
return
/obj/item/integrated_circuit/proc/check_interactivity(mob/user)
if(assembly)
return assembly.check_interactivity(user)
@@ -297,18 +291,17 @@ a creative player the means to solve many problems. Circuits are held inside an
return TRUE // Battery has enough.
return FALSE // Not enough power.
/obj/item/integrated_circuit/proc/check_then_do_work(ord,var/ignore_power = FALSE)
/obj/item/integrated_circuit/proc/check_then_do_work(var/ignore_power = FALSE)
if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam.
return FALSE
return
if(power_draw_per_use && !ignore_power)
if(!check_power())
power_fail()
return FALSE
return
next_use = world.time + cooldown_per_use
do_work(ord)
return TRUE
do_work()
/obj/item/integrated_circuit/proc/do_work(ord)
/obj/item/integrated_circuit/proc/do_work()
return
/obj/item/integrated_circuit/proc/disconnect_all()
@@ -376,3 +369,4 @@ a creative player the means to solve many problems. Circuits are held inside an
return TRUE
return FALSE

View File

@@ -25,16 +25,14 @@ D [1]/ ||
var/list/linked = list()
var/io_type = DATA_CHANNEL
var/pin_type // IC_INPUT, IC_OUTPUT, IC_ACTIVATOR - used in saving assembly wiring
var/ord
/datum/integrated_io/New(loc, _name, _data, _pin_type,_ord)
/datum/integrated_io/New(loc, _name, _data, _pin_type)
name = _name
if(_data)
data = _data
if(_pin_type)
pin_type = _pin_type
if(_ord)
ord = _ord
holder = loc
@@ -150,7 +148,7 @@ D [1]/ ||
/datum/integrated_io/activate/push_data()
for(var/k in 1 to linked.len)
var/datum/integrated_io/io = linked[k]
io.holder.check_then_do_work(io.ord)
io.holder.check_then_do_work()
/datum/integrated_io/proc/pull_data()
for(var/k in 1 to linked.len)
@@ -209,7 +207,7 @@ D [1]/ ||
write_data_to_pin(new_data)
/datum/integrated_io/activate/ask_for_pin_data(mob/user) // This just pulses the pin.
holder.check_then_do_work(ord,ignore_power = TRUE)
holder.check_then_do_work(ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [holder]'s [src] pin.</span>")
/datum/integrated_io/activate

View File

@@ -1,4 +1,4 @@
// These pins can only contain integer numbers between 0 and IC_MAX_LIST_LENGTH. Null is allowed.
// These pins can only contain integer numbers between 1 and IC_MAX_LIST_LENGTH. Null is not allowed.
/datum/integrated_io/index
name = "index pin"
data = 1
@@ -11,10 +11,10 @@
/datum/integrated_io/index/write_data_to_pin(new_data)
if(isnull(new_data))
new_data = 0
new_data = 1
if(isnum(new_data))
data = CLAMP(round(new_data), 0, IC_MAX_LIST_LENGTH)
data = CLAMP(round(new_data), 1, IC_MAX_LIST_LENGTH)
holder.on_data_written()
/datum/integrated_io/index/display_pin_type()

View File

@@ -30,9 +30,10 @@
/obj/item/integrated_circuit/arithmetic/addition/do_work()
var/result = 0
for(var/k in 1 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I))
result += I
var/datum/integrated_io/I = inputs[k]
I.pull_data()
if(isnum(I.data))
result = result + I.data
set_pin_data(IC_OUTPUT, 1, result)
push_data()
@@ -55,10 +56,13 @@
return
var/result = A.data
for(var/k in 2 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I))
result -= I
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
if(I == A)
continue
I.pull_data()
if(isnum(I.data))
result = result - I.data
set_pin_data(IC_OUTPUT, 1, result)
push_data()
@@ -81,10 +85,13 @@
if(!isnum(A.data))
return
var/result = A.data
for(var/k in 2 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I))
result *= I
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
if(I == A)
continue
I.pull_data()
if(isnum(I.data))
result = result * I.data
set_pin_data(IC_OUTPUT, 1, result)
push_data()
@@ -107,12 +114,13 @@
return
var/result = A.data
for(var/k in 2 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I) && (I != 0))
result /= I
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
if(I == A)
continue
I.pull_data()
if(isnum(I.data) && I.data != 0) //No runtimes here.
result = result / I.data
set_pin_data(IC_OUTPUT, 1, result)
push_data()
@@ -220,11 +228,12 @@
/obj/item/integrated_circuit/arithmetic/average/do_work()
var/result = 0
var/inputs_used = 0
for(var/k in 2 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I))
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
I.pull_data()
if(isnum(I.data))
inputs_used++
result += I
result = result + I.data
if(inputs_used)
result = result / inputs_used
@@ -279,10 +288,11 @@
/obj/item/integrated_circuit/arithmetic/square_root/do_work()
var/result = 0
for(var/k in 2 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(isnum(I))
result += sqrt(I)
for(var/k in 1 to inputs.len)
var/datum/integrated_io/I = inputs[k]
I.pull_data()
if(isnum(I.data))
result = sqrt(I.data)
set_pin_data(IC_OUTPUT, 1, result)
push_data()

View File

@@ -160,10 +160,10 @@
/obj/item/integrated_circuit/converter/concatenator/do_work()
var/result = null
for(var/k in 1 to inputs.len)
var/I = get_pin_data(IC_INPUT, k)
if(!isnull(I))
result = result + I
for(var/datum/integrated_io/I in inputs)
I.pull_data()
if(!isnull(I.data))
result = result + I.data
set_pin_data(IC_OUTPUT, 1, result)
push_data()

View File

@@ -128,7 +128,7 @@
var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human)
if(!istype(H)) //Invalid input
return
if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range..
if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range..
var/total_health = round(H.health/H.getMaxHealth(), 0.01)*100
var/missing_health = H.getMaxHealth() - H.health
@@ -143,49 +143,6 @@
push_data()
activate_pin(2)
/obj/item/integrated_circuit/input/slime_scanner
name = "slime_scanner"
desc = "A very small version of the xenobio analyser. This allows the machine to know every needed properties of slime."
icon_state = "medscan_adv"
complexity = 12
inputs = list("\<REF\> target")
outputs = list(
"colour" = IC_PINTYPE_STRING,
"adult" = IC_PINTYPE_BOOLEAN,
"nutrition" = IC_PINTYPE_NUMBER,
"charge" = IC_PINTYPE_NUMBER,
"health" = IC_PINTYPE_NUMBER,
"possible mutation" = IC_PINTYPE_LIST,
"genetic destability"= IC_PINTYPE_NUMBER,
"slime core amount" = IC_PINTYPE_NUMBER,
"Growth progress" = IC_PINTYPE_NUMBER,
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 80
/obj/item/integrated_circuit/input/slime_scanner/do_work()
var/mob/living/simple_animal/slime/T = get_pin_data_as_type(IC_INPUT, 1, /mob/living/simple_animal/slime)
if(!isslime(T)) //Invalid input
return
if(T in view(get_turf(src))) // Like medbot's analyzer it can be used in range..
set_pin_data(IC_OUTPUT, 1, T.colour)
set_pin_data(IC_OUTPUT, 2, T.is_adult)
set_pin_data(IC_OUTPUT, 3, T.nutrition/T.get_max_nutrition())
set_pin_data(IC_OUTPUT, 4, T.powerlevel)
set_pin_data(IC_OUTPUT, 5, round(T.health/T.maxHealth,0.01)*100)
set_pin_data(IC_OUTPUT, 6, uniqueList(T.slime_mutation))
set_pin_data(IC_OUTPUT, 7, T.mutation_chance)
set_pin_data(IC_OUTPUT, 8, T.cores)
set_pin_data(IC_OUTPUT, 9, T.amount_grown/SLIME_EVOLUTION_THRESHOLD)
push_data()
activate_pin(2)
/obj/item/integrated_circuit/input/plant_scanner
name = "integrated plant analyzer"
desc = "A very small version of the plant analyser. This allows the machine to know all valuable params of plants in trays. \
@@ -223,7 +180,7 @@
return
for(var/i=1, i<=outputs.len, i++)
set_pin_data(IC_OUTPUT, i, null)
if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range..
if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range..
if(H.myseed)
set_pin_data(IC_OUTPUT, 1, H.myseed.plantname)
set_pin_data(IC_OUTPUT, 2, H.age)
@@ -271,7 +228,7 @@
return
for(var/i=1, i<=outputs.len, i++)
set_pin_data(IC_OUTPUT, i, null)
if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range..
if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range..
if(H.myseed)
for(var/datum/plant_gene/reagent/G in H.myseed.genes)
greagents.Add(G.get_name())
@@ -714,15 +671,12 @@
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 120
/obj/item/integrated_circuit/input/sensor/sense(var/atom/A,mob/user,prox)
if(!prox)
return FALSE
if(!check_then_do_work())
return FALSE
/obj/item/integrated_circuit/input/sensor/proc/scan(var/atom/A)
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
if(istype(A, /obj/item/storage))
return FALSE
set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
push_data()
activate_pin(1)
@@ -740,52 +694,6 @@
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 120
/obj/item/integrated_circuit/input/sensor/ranged/sense(var/atom/A,mob/user)
if(!user)
return FALSE
if(user.client)
if(!(A in view(user.client)))
return FALSE
else
if(!(A in view(user)))
return FALSE
if(!check_then_do_work())
return FALSE
var/ignore_bags = get_pin_data(IC_INPUT, 1)
if(ignore_bags)
if(istype(A, /obj/item/storage))
return FALSE
set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
push_data()
activate_pin(1)
return TRUE
/obj/item/integrated_circuit/input/objscaner
name = "scaner"
desc = "Scans and obtains a reference for any objects you use on assembly."
extended_desc = "If 'put down' pin is set to true, assembly will take scanned object from your hands to it's location.\
useful for interaction with grabber. Scaner works only with help intent."
icon_state = "recorder"
complexity = 4
inputs = list("put down" = IC_PINTYPE_BOOLEAN)
outputs = list("scanned" = IC_PINTYPE_REF)
activators = list("on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 20
/obj/item/integrated_circuit/input/objscaner/attackby_react(var/atom/A,var/mob/user,intent)
if(intent!=INTENT_HELP)
return FALSE
if(!check_then_do_work())
return FALSE
var/pu = get_pin_data(IC_INPUT, 1)
if(pu)
user.transferItemToLoc(A,drop_location())
set_pin_data(IC_OUTPUT, 1, WEAKREF(A))
push_data()
activate_pin(1)
return TRUE
/obj/item/integrated_circuit/input/internalbm
name = "internal battery monitor"
desc = "This monitors the charge level of an internal battery."
@@ -852,38 +760,3 @@
activate_pin(2)
push_data()
return
/obj/item/integrated_circuit/input/ntnetsc
name = "NTnet scaner"
desc = "This can return NTnet id of component insi given object, if there is any."
icon_state = "signalsc"
w_class = WEIGHT_CLASS_TINY
complexity = 2
inputs = list("target" = IC_PINTYPE_REF)
outputs = list(
"id" = IC_PINTYPE_STRING
)
activators = list("read" = IC_PINTYPE_PULSE_IN, "found" = IC_PINTYPE_PULSE_OUT,"not found" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 1
/obj/item/integrated_circuit/input/ntnetsc/do_work()
var/atom/AM = get_pin_data_as_type(IC_INPUT, 1, /atom)
var/list/processing_list = list(AM)
var/datum/component/ntnet_interface/net = null
set_pin_data(IC_OUTPUT, 1, null)
while(processing_list.len && !net)
var/atom/A = processing_list[1]
processing_list.Cut(1, 2)
//Byond does not allow things to be in multiple contents, or double parent-child hierarchies, so only += is needed
//This is also why we don't need to check against assembled as we go along
processing_list += A.contents
net = A.GetComponent(/datum/component/ntnet_interface)
if(net)
set_pin_data(IC_OUTPUT, 1, net.hardware_id)
activate_pin(2)
else
activate_pin(3)
push_data()
return

View File

@@ -2,7 +2,7 @@
name = "logic gate"
desc = "This tiny chip will decide for you!"
extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE."
complexity = 1
complexity = 3
outputs = list("result")
activators = list("compare" = IC_PINTYPE_PULSE_IN)
category_text = "Logic"

View File

@@ -155,11 +155,9 @@
if(isnum(wanted_dir.data))
if(step(assembly, wanted_dir.data))
activate_pin(2)
return
else
activate_pin(3)
return FALSE
return FALSE
/obj/item/integrated_circuit/manipulation/grenade
name = "grenade primer"
@@ -249,14 +247,9 @@
/obj/item/integrated_circuit/manipulation/plant_module/do_work()
..()
var/turf/T = get_turf(src)
var/obj/OM = get_pin_data_as_type(IC_INPUT, 1, /obj)
if(istype(OM,/obj/structure/spacevine) && get_pin_data(IC_INPUT, 2) == 2)
qdel(OM)
activate_pin(2)
return
var/obj/machinery/hydroponics/AM = OM
var/obj/machinery/hydroponics/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/machinery/hydroponics)
if(!istype(AM)) //Invalid input
return FALSE
return
var/mob/living/M = get_turf(AM)
if(!M.Adjacent(T))
return //Can't reach
@@ -283,7 +276,6 @@
qdel(AM.myseed)
AM.myseed = null
AM.weedlevel = 0 //Has a side effect of cleaning up those nasty weeds
AM.dead = 0
AM.update_icon()
else
activate_pin(2)
@@ -292,7 +284,7 @@
/obj/item/integrated_circuit/manipulation/grabber
name = "grabber"
desc = "A circuit with it's own inventory for tiny/small items, used to grab and store things."
desc = "A circuit with it's own inventory for small/medium items, used to grab and store things."
icon_state = "grabber"
extended_desc = "The circuit accepts a reference to thing to be grabbed. It can store up to 10 things. Modes: 1 for grab. 0 for eject the first thing. -1 for eject all."
w_class = WEIGHT_CLASS_SMALL
@@ -315,7 +307,7 @@
var/mode = get_pin_data(IC_INPUT, 2)
if(mode == 1)
if(check_target(AM))
if(check_target(AM, exclude_contents = TRUE))
if((contents.len < max_items) && (!max_w_class || AM.w_class <= max_w_class))
AM.forceMove(src)
if(mode == 0)

View File

@@ -9,11 +9,6 @@
. = ..()
if(volume)
create_reagents(volume)
push_vol()
/obj/item/integrated_circuit/reagent/proc/push_vol()
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
/obj/item/integrated_circuit/reagent/smoke
name = "smoke generator"
@@ -34,8 +29,7 @@
)
activators = list(
"create smoke" = IC_PINTYPE_PULSE_IN,
"on smoked" = IC_PINTYPE_PULSE_OUT,
"push ref" = IC_PINTYPE_PULSE_IN
"on smoked" = IC_PINTYPE_PULSE_OUT
)
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 20
@@ -46,27 +40,24 @@
//reset warning only if we have reagents now
if(changetype == ADD_REAGENT)
notified = FALSE
push_vol()
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
/obj/item/integrated_circuit/reagent/smoke/do_work(ord)
switch(ord)
if(1)
if(!reagents || (reagents.total_volume < IC_SMOKE_REAGENTS_MINIMUM_UNITS))
return
var/location = get_turf(src)
var/datum/effect_system/smoke_spread/chem/S = new
S.attach(location)
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
if(S)
S.set_up(reagents, smoke_radius, location, notified)
if(!notified)
notified = TRUE
S.start()
reagents.clear_reagents()
activate_pin(2)
if(3)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
/obj/item/integrated_circuit/reagent/smoke/do_work()
if(!reagents || (reagents.total_volume < IC_SMOKE_REAGENTS_MINIMUM_UNITS))
return
var/location = get_turf(src)
var/datum/effect_system/smoke_spread/chem/S = new
S.attach(location)
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
if(S)
S.set_up(reagents, smoke_radius, location, notified)
if(!notified)
notified = TRUE
S.start()
reagents.clear_reagents()
activate_pin(2)
/obj/item/integrated_circuit/reagent/injector
name = "integrated hypo-injector"
@@ -94,9 +85,7 @@
activators = list(
"inject" = IC_PINTYPE_PULSE_IN,
"on injected" = IC_PINTYPE_PULSE_OUT,
"on fail" = IC_PINTYPE_PULSE_OUT,
"push ref" = IC_PINTYPE_PULSE_IN
"on fail" = IC_PINTYPE_PULSE_OUT
)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 15
@@ -104,8 +93,15 @@
var/transfer_amount = 10
var/busy = FALSE
/obj/item/integrated_circuit/reagent/injector/interact(mob/user)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
..()
/obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype)
push_vol()
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
/obj/item/integrated_circuit/reagent/injector/on_data_written()
var/new_amount = get_pin_data(IC_INPUT, 2)
@@ -131,15 +127,7 @@
temp_reagents.clear_reagents()
qdel(temp_reagents)
/obj/item/integrated_circuit/reagent/injector/do_work(ord)
switch(ord)
if(1)
inject()
if(4)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
/obj/item/integrated_circuit/reagent/injector/proc/inject()
/obj/item/integrated_circuit/reagent/injector/do_work()
set waitfor = FALSE // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing
var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
var/atom/movable/acting_object = get_object()
@@ -293,15 +281,17 @@
"volume used" = IC_PINTYPE_NUMBER,
"self reference" = IC_PINTYPE_REF
)
activators = list("push ref" = IC_PINTYPE_PULSE_OUT)
activators = list()
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/do_work()
/obj/item/integrated_circuit/reagent/storage/interact(mob/user)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
..()
/obj/item/integrated_circuit/reagent/storage/on_reagent_change(changetype)
push_vol()
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
/obj/item/integrated_circuit/reagent/storage/cryo
name = "cryo reagent storage"
@@ -316,7 +306,6 @@
. = ..()
reagents.set_reacting(FALSE)
/obj/item/integrated_circuit/reagent/storage/big
name = "big reagent storage"
desc = "Stores liquid inside, and away from electrical components. Can store up to 180u."
@@ -328,99 +317,6 @@
complexity = 16
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/grinder
name = "reagent grinder"
desc = "This is reagent grinder.It accepts ref to something and refines it into reagents. Can store up to 100u."
icon_state = "blender"
extended_desc = ""
inputs = list(
"target" = IC_PINTYPE_REF,
)
outputs = list(
"volume used" = IC_PINTYPE_NUMBER,
"self reference" = IC_PINTYPE_REF
)
activators = list(
"grind" = IC_PINTYPE_PULSE_IN,
"on grind" = IC_PINTYPE_PULSE_OUT,
"on fail" = IC_PINTYPE_PULSE_OUT,
"push ref" = IC_PINTYPE_PULSE_IN
)
volume = 100
power_draw_per_use = 150
complexity = 16
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/grinder/do_work(ord)
switch(ord)
if(1)
grind()
if(4)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
/obj/item/integrated_circuit/reagent/storage/grinder/proc/grind()
if(reagents.total_volume >= reagents.maximum_volume)
activate_pin(3)
return FALSE
var/obj/item/I = get_pin_data_as_type(IC_INPUT, 1, /obj/item)
if(istype(I)&&(I.grind_results)&&check_target(I)&&(I.on_grind(src) != -1))
reagents.add_reagent_list(I.grind_results)
if(I.reagents)
I.reagents.trans_to(src, I.reagents.total_volume)
qdel(I)
activate_pin(2)
return TRUE
activate_pin(3)
return FALSE
obj/item/integrated_circuit/reagent/storage/juicer
name = "reagent juicer"
desc = "This is reagent juicer.It accepts ref to something and refines it into reagents. Can store up to 100u."
icon_state = "blender"
extended_desc = ""
inputs = list(
"target" = IC_PINTYPE_REF,
)
outputs = list(
"volume used" = IC_PINTYPE_NUMBER,
"self reference" = IC_PINTYPE_REF
)
activators = list(
"juice" = IC_PINTYPE_PULSE_IN,
"on juice" = IC_PINTYPE_PULSE_OUT,
"on fail" = IC_PINTYPE_PULSE_OUT,
"push ref" = IC_PINTYPE_PULSE_IN
)
volume = 100
power_draw_per_use = 150
complexity = 16
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/juicer/do_work(ord)
switch(ord)
if(1)
juice()
if(4)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
/obj/item/integrated_circuit/reagent/storage/juicer/proc/juice()
if(reagents.total_volume >= reagents.maximum_volume)
activate_pin(3)
return FALSE
var/obj/item/I = get_pin_data_as_type(IC_INPUT, 1, /obj/item)
if(istype(I)&&check_target(I)&&(I.juice_results)&&(I.on_juice() != -1))
reagents.add_reagent_list(I.juice_results)
qdel(I)
activate_pin(2)
return TRUE
activate_pin(3)
return FALSE
/obj/item/integrated_circuit/reagent/storage/scan
name = "reagent scanner"
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. On pulse this beaker will send list of contained reagents."
@@ -434,22 +330,17 @@ obj/item/integrated_circuit/reagent/storage/juicer
"list of reagents" = IC_PINTYPE_LIST
)
activators = list(
"scan" = IC_PINTYPE_PULSE_IN,
"push ref" = IC_PINTYPE_PULSE_IN
"scan" = IC_PINTYPE_PULSE_IN
)
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/scan/do_work(ord)
switch(ord)
if(1)
var/cont[0]
for(var/datum/reagent/RE in reagents.reagent_list)
cont += RE.id
set_pin_data(IC_OUTPUT, 3, cont)
push_data()
if(2)
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
push_data()
/obj/item/integrated_circuit/reagent/storage/scan/do_work()
var/cont[0]
for(var/datum/reagent/RE in reagents.reagent_list)
cont += RE.id
set_pin_data(IC_OUTPUT, 3, cont)
push_data()
/obj/item/integrated_circuit/reagent/filter
name = "reagent filter"
@@ -503,8 +394,7 @@ obj/item/integrated_circuit/reagent/storage/juicer
if(!source.reagents || !target.reagents)
return
// FALSE in those procs makes mobs invalid targets.
if(!source.is_drawable(FALSE) || !target.is_injectable(FALSE))
if(!source.is_drainable() || !target.is_refillable())
return
if(target.reagents.maximum_volume - target.reagents.total_volume <= 0)
@@ -520,45 +410,3 @@ obj/item/integrated_circuit/reagent/storage/juicer
activate_pin(2)
push_data()
/obj/item/integrated_circuit/reagent/storage/heater
name = "chemical heater"
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. Will heat or freeze reagents \
to target temperature, when turned on."
icon_state = "heater"
container_type = OPENCONTAINER
complexity = 8
inputs = list(
"target temperature" = IC_PINTYPE_NUMBER,
"on" = IC_PINTYPE_BOOLEAN
)
inputs_default = list("1" = 300)
outputs = list("volume used" = IC_PINTYPE_NUMBER,"self reference" = IC_PINTYPE_REF,"temperature" = IC_PINTYPE_NUMBER)
spawn_flags = IC_SPAWN_RESEARCH
var/heater_coefficient = 0.1
/obj/item/integrated_circuit/reagent/storage/heater/on_data_written()
if(get_pin_data(IC_INPUT, 2))
power_draw_idle = 30
else
power_draw_idle = 0
/obj/item/integrated_circuit/reagent/storage/heater/Initialize()
.=..()
START_PROCESSING(SScircuit, src)
/obj/item/integrated_circuit/reagent/storage/heater/Destroy()
STOP_PROCESSING(SScircuit, src)
return ..()
/obj/item/integrated_circuit/reagent/storage/heater/process()
if(power_draw_idle)
var/target_temperature = get_pin_data(IC_INPUT, 1)
if(reagents.chem_temp > target_temperature)
reagents.chem_temp += min(-1, (target_temperature - reagents.chem_temp) * heater_coefficient)
if(reagents.chem_temp < target_temperature)
reagents.chem_temp += max(1, (target_temperature - reagents.chem_temp) * heater_coefficient)
reagents.chem_temp = round(reagents.chem_temp)
reagents.handle_reactions()
set_pin_data(IC_OUTPUT, 3, reagents.chem_temp)
push_data()

View File

@@ -27,6 +27,6 @@
push_data()
return // Can't see the target.
set_pin_data(IC_OUTPUT, 1, get_dir(get_turf(src), get_step_towards2(get_turf(src),A)))
set_pin_data(IC_OUTPUT, 1, get_dir(get_turf(src), get_turf(A)))
push_data()
activate_pin(2)

View File

@@ -142,7 +142,7 @@
hidden_message = newmessage
creator_name = user.real_name
creator_key = user.ckey
realdate = world.realtime
realdate = world.timeofday
map = SSmapping.config.map_name
update_icon()

View File

@@ -13,11 +13,15 @@
. = ..()
var/area/thearea = get_area(src)
for(var/turf/T in get_area_turfs(thearea, z))
if(T.baseturf != T.type) //Don't break indestructible walls and the like
T.baseturf = baseturf
if(T.baseturfs != T.type) //Don't break indestructible walls and the like
T.baseturfs = baseturf
return INITIALIZE_HINT_QDEL
/obj/effect/baseturf_helper/space
name = "space baseturf editor"
baseturf = /turf/open/space
/obj/effect/baseturf_helper/asteroid
name = "asteroid baseturf editor"
baseturf = /turf/open/floor/plating/asteroid

View File

@@ -339,7 +339,7 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
if(crds)
if(!no_changeturf && ispath(path, /turf))
. = crds.ChangeTurf(path, FALSE, TRUE)
. = crds.ChangeTurf(path, null, CHANGETURF_DEFER_CHANGE)
else
. = create_atom(path, crds)//first preloader pass

View File

@@ -1,10 +1,9 @@
///Mining Base////
#define ZONE_SET 0
#define BAD_ZLEVEL 1
#define BAD_AREA 2
#define BAD_COORDS 3
#define BAD_TURF 4
#define ZONE_SET 4
/area/shuttle/auxillary_base
name = "Auxillary Base"
@@ -135,31 +134,21 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
/obj/machinery/computer/auxillary_base/proc/set_landing_zone(turf/T, mob/user, var/no_restrictions)
var/obj/docking_port/mobile/auxillary_base/base_dock = locate(/obj/docking_port/mobile/auxillary_base) in SSshuttle.mobile
if(!base_dock) //Not all maps have an Aux base. This object is useless in that case.
to_chat(user, "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>")
return
if(!no_restrictions)
var/static/list/disallowed_turf_types = typecacheof(list(
/turf/open/lava,
/turf/closed/indestructible,
/turf/open/indestructible,
))
if(T.z != ZLEVEL_MINING)
return BAD_ZLEVEL
var/colony_radius = max(base_dock.width, base_dock.height)*0.5
if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx)
return BAD_COORDS //Avoid dropping the base too close to map boundaries, as it results in parts of it being left in space
var/colony_radius = CEILING(max(base_dock.width, base_dock.height)*0.5, 1)
var/list/colony_turfs = block(locate(T.x - colony_radius, T.y - colony_radius, T.z), locate(T.x + colony_radius, T.y + colony_radius, T.z))
for(var/i in 1 to colony_turfs.len)
CHECK_TICK
var/turf/place = colony_turfs[i]
if(!place)
return BAD_COORDS
if(!istype(place.loc, /area/lavaland/surface))
return BAD_AREA
if(disallowed_turf_types[place.type])
return BAD_TURF
var/list/area_counter = get_areas_in_range(colony_radius, T)
if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one
return BAD_AREA
var/area/A = get_area(T)
@@ -219,16 +208,14 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
return
switch(AB.set_landing_zone(T, user, no_restrictions))
if(ZONE_SET)
qdel(src)
if(BAD_ZLEVEL)
to_chat(user, "<span class='warning'>This uplink can only be used in a designed mining zone.</span>")
if(BAD_AREA)
to_chat(user, "<span class='warning'>Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.</span>")
if(BAD_COORDS)
to_chat(user, "<span class='warning'>Location is too close to the edge of the station's scanning range. Move several paces away and try again.</span>")
if(BAD_TURF)
to_chat(user, "<span class='warning'>The landing zone contains turfs unsuitable for a base.</span>")
if(ZONE_SET)
qdel(src)
/obj/item/device/assault_pod/mining/unrestricted
name = "omni-locational landing field designator"
@@ -361,8 +348,7 @@ obj/docking_port/stationary/public_mining_dock
/obj/structure/mining_shuttle_beacon/attack_robot(mob/user)
return attack_hand(user) //So borgies can help
#undef ZONE_SET
#undef BAD_ZLEVEL
#undef BAD_AREA
#undef BAD_COORDS
#undef BAD_TURF
#undef ZONE_SET

View File

@@ -656,7 +656,7 @@
playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
/obj/item/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user)
if(user.has_disability(CLUMSY) && prob(50))
if(user.has_disability(DISABILITY_CLUMSY) && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(10)

View File

@@ -1,27 +1,25 @@
/mob/dead/observer/say(message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (!message)
return
/mob/dead/observer/say(message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (!message)
return
log_talk(src,"Ghost/[src.key] : [message]", LOGSAY)
if(check_emote(message))
return
. = say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
var/atom/movable/to_follow = speaker
if(radio_freq)
var/atom/movable/virtualspeaker/V = speaker
if(isAI(V.source))
var/mob/living/silicon/ai/S = V.source
to_follow = S.eyeobj
else
to_follow = V.source
var/link = FOLLOW_LINK(src, to_follow)
// Recompose the message, because it's scrambled by default
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
to_chat(src, "[link] [message]")
. = src.say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
var/atom/movable/to_follow = speaker
if(radio_freq)
var/atom/movable/virtualspeaker/V = speaker
if(isAI(V.source))
var/mob/living/silicon/ai/S = V.source
to_follow = S.eyeobj
else
to_follow = V.source
var/link = FOLLOW_LINK(src, to_follow)
// Recompose the message, because it's scrambled by default
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
to_chat(src, "[link] [message]")

View File

@@ -16,7 +16,7 @@
/mob/living/carbon/monkey/handle_blood()
if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL)
blood_volume += 0.1 // regenerate blood VERY slowly
@@ -27,8 +27,7 @@
if(NOBLOOD in dna.species.species_traits)
bleed_rate = 0
return
if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL && !(NOHUNGER in dna.species.species_traits))
@@ -201,13 +200,13 @@
return "blood"
/mob/living/carbon/monkey/get_blood_id()
if(!(has_disability(NOCLONE)))
if(!(has_disability(DISABILITY_NOCLONE)))
return "blood"
/mob/living/carbon/human/get_blood_id()
if(dna.species.exotic_blood)
return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (has_disability(NOCLONE)))
else if((NOBLOOD in dna.species.species_traits) || (has_disability(DISABILITY_NOCLONE)))
return
return "blood"

View File

@@ -79,8 +79,8 @@
if(!brainmob.stored_dna)
brainmob.stored_dna = new /datum/dna/stored(brainmob)
C.dna.copy_dna(brainmob.stored_dna)
if(L.has_disability(NOCLONE))
brainmob.disabilities[NOCLONE] = L.disabilities[NOCLONE]
if(L.has_disability(DISABILITY_NOCLONE))
brainmob.disabilities[DISABILITY_NOCLONE] = L.disabilities[DISABILITY_NOCLONE]
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned

View File

@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// EYE_BLIND ////////////////////////////////////

View File

@@ -12,7 +12,7 @@ Doesn't work on other aliens/AI.*/
var/plasma_cost = 0
var/check_turf = FALSE
has_action = TRUE
datum/action/spell_action/alien/action
base_action = /datum/action/spell_action/alien
action_icon = 'icons/mob/actions/actions_xeno.dmi'
action_icon_state = "spell_default"
action_background_icon_state = "bg_alien"

View File

@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// STUN ////////////////////////////////////

View File

@@ -157,7 +157,7 @@
if(!throwable_mob.buckled)
thrown_thing = throwable_mob
stop_pulling()
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(src, "<span class='notice'>You gently let go of [throwable_mob].</span>")
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
@@ -170,7 +170,7 @@
thrown_thing = I
dropItemToGround(I)
if(has_disability(PACIFISM) && I.throwforce)
if(has_disability(DISABILITY_PACIFISM) && I.throwforce)
to_chat(src, "<span class='notice'>You set [I] down gently on the ground.</span>")
return
@@ -365,9 +365,16 @@
to_chat(src, "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>")
if(cuff_break)
. = !((I == handcuffed) || (I == legcuffed))
qdel(I)
return
if(I == handcuffed)
handcuffed = null
update_handcuffed()
return
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed()
return
return TRUE
else
if(I == handcuffed)
@@ -402,7 +409,7 @@
dropItemToGround(I)
var/modifier = 0
if(has_disability(CLUMSY))
if(has_disability(DISABILITY_CLUMSY))
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
switch(rand(1,100)+modifier) //91-100=Nothing special happens
@@ -511,7 +518,7 @@
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
update_stat()
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD )
become_husk("burn")
become_husk()
med_hud_set_health()
/mob/living/carbon/update_sight()
@@ -767,7 +774,7 @@
reagents.addiction_list = list()
cure_all_traumas(TRUE, TRUE)
..()
// heal ears after healing disabilities, since ears check DEAF disability
// heal ears after healing disabilities, since ears check DISABILITY_DEAF disability
// when healing.
restoreEars()

View File

@@ -306,15 +306,11 @@
if(eyes.eye_damage > 20)
if(prob(eyes.eye_damage - 20))
if(!has_disability(NEARSIGHT))
if(!has_disability(DISABILITY_NEARSIGHT))
to_chat(src, "<span class='warning'>Your eyes start to burn badly!</span>")
become_nearsighted(EYE_DAMAGE)
else if(prob(eyes.eye_damage - 25))
if(!has_disability(BLIND))
if(!has_disability(DISABILITY_BLIND))
to_chat(src, "<span class='warning'>You can't see anything!</span>")
become_blind(EYE_DAMAGE)
else
to_chat(src, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
if(has_bane(BANE_LIGHT))

View File

@@ -70,7 +70,7 @@
else
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
if(disabilities & DUMB)
if(has_disability(DISABILITY_DUMB))
msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n"
if(fire_stacks > 0)

View File

@@ -49,6 +49,6 @@
/mob/living/carbon/proc/Drain()
become_husk(CHANGELING_DRAIN)
add_disability(NOCLONE, CHANGELING_DRAIN)
add_disability(DISABILITY_NOCLONE, CHANGELING_DRAIN)
blood_volume = 0
return 1

View File

@@ -273,7 +273,7 @@
msg += "[t_He] look[p_s()] like a drunken mess.\n"
if(91.01 to INFINITY)
msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n"
for (var/I in src.vore_organs)
var/datum/belly/B = vore_organs[I]
msg += B.get_examine_msg()
@@ -285,7 +285,7 @@
if(stat == UNCONSCIOUS)
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n"
else
if(disabilities & DUMB)
if(has_disability(DISABILITY_DUMB))
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(InCritical())
msg += "[t_He] [t_is] barely conscious.\n"
@@ -350,7 +350,7 @@
msg += "<a href='?src=[REF(src)];hud=s;add_comment=1'>\[Add comment\]</a>\n"
if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
to_chat(user, msg)

View File

@@ -847,8 +847,7 @@
return TRUE
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
if(dna && dna.species) //prevents a runtime while a human is being monkeyfied
override = dna.species.override_float
override = dna.species.override_float
..()
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0)

View File

@@ -44,10 +44,7 @@
if(mind.martial_art && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
if(prob(mind.martial_art.deflection_chance))
if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it
if(mind.martial_art.deflection_chance >= 100) //if they can NEVER be hit, lets clue sec in ;)
visible_message("<span class='danger'>[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
else
visible_message("<span class='danger'>[src] deflects the projectile!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
visible_message("<span class='danger'>[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
return 0
@@ -143,7 +140,7 @@
return ..()
/mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(FAT)) && ismonkey(pulling))
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(DISABILITY_FAT)) && ismonkey(pulling))
devour_mob(pulling)
else
..()

View File

@@ -91,8 +91,19 @@
return wear_id.GetID()
/mob/living/carbon/human/abiotic(full_body = 0)
var/abiotic_hands = FALSE
for(var/obj/item/I in held_items)
if(!(I.flags_1 & NODROP_1))
abiotic_hands = TRUE
break
if(full_body && abiotic_hands && ((back && !(back.flags_1&NODROP_1)) || (wear_mask && !(wear_mask.flags_1&NODROP_1)) || (head && !(head.flags_1&NODROP_1)) || (shoes && !(shoes.flags_1&NODROP_1)) || (w_uniform && !(w_uniform.flags_1&NODROP_1)) || (wear_suit && !(wear_suit.flags_1&NODROP_1)) || (glasses && !(glasses.flags_1&NODROP_1)) || (ears && !(ears.flags_1&NODROP_1)) || (gloves && !(gloves.flags_1&NODROP_1)) ) )
return TRUE
return abiotic_hands
/mob/living/carbon/human/IsAdvancedToolUser()
if(has_disability(MONKEYLIKE))
if(has_disability(DISABILITY_MONKEYLIKE))
return FALSE
return TRUE//Humans can use guns and such

View File

@@ -23,7 +23,7 @@
. = 1
/mob/living/carbon/human/mob_negates_gravity()
return ((shoes && shoes.negates_gravity()) || (dna.species.negates_gravity(src)))
return ((shoes && shoes.negates_gravity()) || dna.species.negates_gravity(src))
/mob/living/carbon/human/Move(NewLoc, direct)
. = ..()

View File

@@ -339,7 +339,7 @@
if(TRAITS & TRAIT_SMART)
smartness = 75
else if(TRAITS & TRAIT_DUMB)
add_disability(CLUMSY, GENETIC_MUTATION)
add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
smartness = 25
if(TRAITS & TRAIT_MEAN)

View File

@@ -187,7 +187,7 @@
if(G.tint)
update_tint()
if(G.vision_correction)
if(has_disability(NEARSIGHT))
if(has_disability(DISABILITY_NEARSIGHT))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
adjust_eye_damage(0)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))

View File

@@ -97,18 +97,19 @@
failed_last_breath = 1
var/datum/species/S = dna.species
if(dna && dna.species)
var/datum/species/S = dna.species
if(S.breathid == "o2")
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else if(S.breathid == "tox")
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else if(S.breathid == "co2")
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else if(S.breathid == "n2")
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
if(S.breathid == "o2")
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else if(S.breathid == "tox")
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else if(S.breathid == "co2")
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else if(S.breathid == "n2")
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
return FALSE
return 0
else
if(istype(L, /obj/item/organ/lungs))
var/obj/item/organ/lungs/lun = L
@@ -241,10 +242,10 @@
/mob/living/carbon/human/proc/get_cold_protection(temperature)
if(dna.check_mutation(COLDRES))
return TRUE //Fully protected from the cold.
return 1 //Fully protected from the cold.
if(RESISTCOLD in dna.species.species_traits)
return TRUE
if(dna && (RESISTCOLD in dna.species.species_traits))
return 1
if(istype(loc, /obj/item/device/dogborg/sleeper))
return 1 //freezing to death in sleepers ruins fun.

View File

@@ -125,7 +125,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
randname += " [pick(GLOB.last_names)]"
return randname
//Called when cloning, copies some vars that should be kept
/datum/species/proc/copy_properties_from(datum/species/old_species)
return
@@ -312,7 +312,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!HD) //Decapitated
return
if(H.has_disability(HUSK))
if(H.has_disability(DISABILITY_HUSK))
return
var/datum/sprite_accessory/S
var/list/standing = list()
@@ -452,8 +452,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/list/standing = list()
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
if(HD && !(H.has_disability(HUSK)))
if(HD && !(H.has_disability(DISABILITY_HUSK)))
// lipstick
if(H.lip_style && (LIPS in species_traits))
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
@@ -724,7 +723,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(S.center)
accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y)
if(!(H.has_disability(HUSK)))
if(!(H.has_disability(DISABILITY_HUSK)))
if(!forced_colour)
switch(S.color_src)
if(MUTCOLORS)
@@ -1101,18 +1100,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
////////
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(H.has_disability(FAT))//I share your pain, past coder.
//The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder.
if(H.overeatduration < 100)
to_chat(H, "<span class='notice'>You feel fit again!</span>")
H.remove_disability(FAT, OBESITY)
H.remove_disability(DISABILITY_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
if(H.overeatduration > 500)
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
H.add_disability(FAT, OBESITY)
H.add_disability(DISABILITY_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
@@ -1269,7 +1267,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
. += (health_deficiency / 25)
if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares.
. += hungry / 50
if(H.has_disability(FAT))
if(H.has_disability(DISABILITY_FAT))
. += (1.5 - flight)
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
. += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR
@@ -1315,7 +1313,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.has_disability(PACIFISM))
if(user.has_disability(DISABILITY_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
return FALSE
if(target.check_block())
@@ -1388,7 +1386,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return 1
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
var/randomized_zone = ran_zone(user.zone_selected)

View File

@@ -725,7 +725,7 @@
/obj/structure/cloth_pile/proc/revive()
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
return
if(cloth_golem.suiciding || cloth_golem.has_disability(NOCLONE))
if(cloth_golem.suiciding || cloth_golem.has_disability(DISABILITY_NOCLONE))
QDEL_NULL(cloth_golem)
return

View File

@@ -11,12 +11,12 @@
amount = dna.species.spec_stun(src,amount)
return ..()
/mob/living/carbon/human/cure_husk(list/sources)
/mob/living/carbon/human/cure_husk()
. = ..()
if(.)
update_hair()
/mob/living/carbon/human/become_husk(source)
/mob/living/carbon/human/become_husk()
if(istype(dna.species, /datum/species/skeleton)) //skeletons shouldn't be husks.
cure_husk()
return

View File

@@ -609,7 +609,7 @@ generate/load female uniform sprites matching all previously decided variables
if(BP.dmg_overlay_type)
. += "-[BP.dmg_overlay_type]"
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
. += "-husk"
/mob/living/carbon/human/load_limb_from_cache()

View File

@@ -121,8 +121,10 @@
if(L == src)
return FALSE
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
return FALSE
if(enemies[L])
return TRUE

View File

@@ -11,7 +11,7 @@
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1)
type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/monkey
gib_type = /obj/effect/decal/cleanable/blood/gibs
unique_name = TRUE
unique_name = 1
bodyparts = list(/obj/item/bodypart/chest/monkey, /obj/item/bodypart/head/monkey, /obj/item/bodypart/l_arm/monkey,
/obj/item/bodypart/r_arm/monkey, /obj/item/bodypart/r_leg/monkey, /obj/item/bodypart/l_leg/monkey)
devourable = TRUE
@@ -62,7 +62,7 @@
if (bodytemperature < 283.222)
. += (283.222 - bodytemperature) / 10 * 1.75
var/static/config_monkey_delay
if(isnull(config_monkey_delay))
config_monkey_delay = CONFIG_GET(number/monkey_delay)
@@ -89,15 +89,13 @@
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
if(mind && is_monkey(mind))
return TRUE
return FALSE
return 0
/mob/living/carbon/monkey/reagent_check(datum/reagent/R) //can metabolize all reagents
return FALSE
return 0
/mob/living/carbon/monkey/canBeHandcuffed()
return TRUE
return 1
/mob/living/carbon/monkey/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
if(judgement_criteria & JUDGE_EMAGGED)

View File

@@ -160,13 +160,13 @@
if(!bodyzone_hit || bodyzone_hit == "head")
if(wear_mask)
if(!(wear_mask.resistance_flags & UNACIDABLE))
wear_mask.acid_act(acidpwr, acid_volume)
wear_mask.acid_act(acidpwr)
else
to_chat(src, "<span class='warning'>Your mask protects you from the acid.</span>")
return
if(head)
if(!(head.resistance_flags & UNACIDABLE))
head.acid_act(acidpwr, acid_volume)
head.acid_act(acidpwr)
else
to_chat(src, "<span class='warning'>Your hat protects you from the acid.</span>")
return

View File

@@ -19,7 +19,7 @@
if(!HD) //Decapitated
return
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
return
var/hair_hidden = 0

View File

@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, DISABILITY_NEARSIGHT disability, and DISABILITY_HUSK disability.
/mob/living/carbon/damage_eyes(amount)
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)

View File

@@ -290,7 +290,7 @@
else
. += "-robotic"
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
. += "-husk"

View File

@@ -1,3 +1,18 @@
//The code execution of the emote datum is located at code/datums/emotes.dm
/mob/living/emote(act, m_type = null, message = null)
act = lowertext(act)
var/param = message
var/custom_param = findchar(act, " ")
if(custom_param)
param = copytext(act, custom_param + 1, length(act) + 1)
act = copytext(act, 1, custom_param)
var/datum/emote/E
E = E.emote_list[act]
if(!E)
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
return
E.run_emote(src, param, m_type)
/* EMOTE DATUMS */
/datum/emote/living
@@ -128,6 +143,16 @@
restraint_check = TRUE
wing_time = 10
/datum/emote/living/flip
key = "flip"
key_third_person = "flips"
restraint_check = TRUE
/datum/emote/living/flip/run_emote(mob/user, params)
. = ..()
if(.)
user.SpinAnimation(7,1)
/datum/emote/living/frown
key = "frown"
key_third_person = "frowns"
@@ -457,6 +482,25 @@
message_param = "beeps at %t."
sound = 'sound/machines/twobeep.ogg'
/datum/emote/living/spin
key = "spin"
key_third_person = "spins"
restraint_check = TRUE
/datum/emote/living/spin/run_emote(mob/user)
. = ..()
if(.)
user.spin(20, 1)
if(iscyborg(user) && user.has_buckled_mobs())
var/mob/living/silicon/robot/R = user
GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R)
if(riding_datum)
for(var/mob/M in R.buckled_mobs)
riding_datum.force_dismount(M)
else
R.unbuckle_all_mobs()
/datum/emote/living/circle
key = "circle"
key_third_person = "circles"

View File

@@ -54,7 +54,7 @@
handle_environment(environment)
handle_fire()
// Vore code for belly processes
handle_internal_contents()
@@ -126,7 +126,7 @@
/mob/living/proc/handle_disabilities()
//Eyes
if(eye_blind) //blindness, heals slowly over time
if(!stat && !(has_disability(BLIND)))
if(!stat && !(has_disability(DISABILITY_BLIND)))
eye_blind = max(eye_blind-1,0)
if(client && !eye_blind)
clear_alert("blind")
@@ -137,7 +137,7 @@
eye_blurry = max(eye_blurry-1, 0)
if(client && !eye_blurry)
clear_fullscreen("blurry")
if(has_disability(PACIFISM) && a_intent == INTENT_HARM)
if(has_disability(DISABILITY_PACIFISM) && a_intent == INTENT_HARM)
to_chat(src, "<span class='notice'>You don't feel like harming anybody.</span>")
a_intent_change(INTENT_HELP)

View File

@@ -413,6 +413,7 @@
cure_nearsighted()
cure_blind()
cure_husk()
disabilities = 0
hallucination = 0
heal_overall_damage(100000, 100000, 0, 0, 1) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
ExtinguishMob()
@@ -818,7 +819,7 @@
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(src, "<span class='notice'>You don't want to risk harming anyone!</span>")
return FALSE
return TRUE

View File

@@ -135,9 +135,11 @@
if(!(status_flags & CANPUSH))
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
return FALSE
if(user.has_disability(PACIFISM))
if(user.has_disability(DISABILITY_PACIFISM))
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
return FALSE
grippedby(user)
//proc to upgrade a simple pull into a more aggressive grab.
@@ -191,9 +193,10 @@
M.Feedstop()
return // can't attack while eating!
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if (stat != DEAD)
add_logs(M, src, "attacked")
M.do_attack_animation(src)
@@ -207,9 +210,10 @@
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
return FALSE
else
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.do_attack_animation(src)
@@ -225,9 +229,10 @@
return FALSE
if (M.a_intent == INTENT_HARM)
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
return FALSE
@@ -250,9 +255,10 @@
return FALSE
else
if(L.has_disability(PACIFISM))
if(L.has_disability(DISABILITY_PACIFISM))
to_chat(L, "<span class='notice'>You don't want to hurt anyone!</span>")
return
L.do_attack_animation(src)
if(prob(90))
add_logs(L, src, "attacked")
@@ -274,7 +280,7 @@
grabbedby(M)
return FALSE
if("harm")
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
M.do_attack_animation(src)
@@ -364,7 +370,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(BLIND))))
if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(DISABILITY_BLIND))))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return 1

View File

@@ -26,8 +26,6 @@
var/incorporeal_move = FALSE //FALSE is off, INCORPOREAL_MOVE_BASIC is normal, INCORPOREAL_MOVE_SHADOW is for ninjas
//and INCORPOREAL_MOVE_JAUNT is blocked by holy water/salt
var/list/disabilities = list()
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
var/now_pushing = null //used by living/Collide() and living/PushAM() to prevent potential infinite loop.

View File

@@ -20,11 +20,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
"t" = "Syndicate",
"y" = "CentCom",
// Species
"b" = "binary",
"g" = "changeling",
"a" = "alientalk",
// Admin
"p" = "admin",
"d" = "deadmin",
@@ -55,11 +50,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
"å" = "Syndicate",
"í" = "CentCom",
// Species
"è" = "binary",
"ï" = "changeling",
"ô" = "alientalk",
// Admin
"ç" = "admin",
"â" = "deadmin",
@@ -72,7 +62,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE)
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
var/key = get_key(message)
var/talk_key = get_key(message)
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE)
@@ -81,13 +71,14 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(!message || message == "")
return
var/datum/saymode/saymode = SSradio.saymodes[talk_key]
var/message_mode = get_message_mode(message)
var/original_message = message
var/in_critical = InCritical()
if(one_character_prefix[message_mode])
message = copytext(message, 2)
else if(message_mode)
else if(message_mode || saymode)
message = copytext(message, 3)
if(findtext(message, " ", 1, 2))
message = copytext(message, 2)
@@ -135,11 +126,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
// AIs use inherent channels for the holopad. Most inherent channels
// ignore the language argument however.
var/datum/saymode/SM = SSradio.saymodes[key]
if(key && SM)
if(!SM.handle_message(src, message, language) && !message_mode)
return
if(saymode && !saymode.handle_message(src, message, language))
return
if(!can_speak_vocal(message))
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
@@ -285,7 +273,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return 1
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
if(has_disability(MUTE))
if(has_disability(DISABILITY_MUTE))
return 0
if(is_muzzled())
@@ -296,6 +284,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return 1
/mob/living/proc/check_emote(message)
if(copytext(message, 1, 2) == "*")
emote(copytext(message, 2))
return 1
/mob/living/proc/get_message_mode(message)
var/key = copytext(message, 1, 2)
if(key == "#")
@@ -338,6 +331,15 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return message
/mob/living/proc/radio(message, message_mode, list/spans, language)
var/obj/item/implant/radio/imp = locate() in src
if(imp && imp.radio.on)
if(message_mode == MODE_HEADSET)
imp.radio.talk_into(src, message, , spans, language)
return ITALICS | REDUCE_RANGE
if(message_mode == MODE_DEPARTMENT || message_mode in GLOB.radiochannels)
imp.radio.talk_into(src, message, message_mode, spans, language)
return ITALICS | REDUCE_RANGE
switch(message_mode)
if(MODE_WHISPER)
return ITALICS
@@ -359,6 +361,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(MODE_BINARY)
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
return 0
/mob/living/say_mod(input, message_mode)

View File

@@ -430,20 +430,17 @@
/mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C)
if(QDELETED(C))
return FALSE
if(!tracking)
cameraFollow = null
if (!C)
return FALSE
if(!src.eyeobj)
if(QDELETED(eyeobj))
view_core()
return
// ok, we're alive, camera is good and in our network...
eyeobj.setLoc(get_turf(C))
//machine = src
return TRUE
/mob/living/silicon/ai/proc/botcall()

View File

@@ -80,8 +80,7 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
// Removes a camera from a chunk.
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
if(c.can_use())
majorChunkChange(c, 0)
majorChunkChange(c, 0)
// Add a camera to a chunk.

View File

@@ -16,6 +16,7 @@
// It will also stream the chunk that the new loc is in.
/mob/camera/aiEye/proc/setLoc(T)
if(ai)
if(!isturf(ai.loc))
return
@@ -33,8 +34,6 @@
if(istype(ai.current, /obj/machinery/holopad))
var/obj/machinery/holopad/H = ai.current
H.move_hologram(ai, T)
if(ai.camera_light_on)
ai.light_cameras()
/mob/camera/aiEye/Move()
return 0
@@ -86,6 +85,11 @@
if(!user.tracking)
user.cameraFollow = null
//user.unset_machine() //Uncomment this if it causes problems.
//user.lightNearbyCamera()
if(user.camera_light_on)
user.light_cameras()
// Return to the Core.
/mob/living/silicon/ai/proc/view_core()

View File

@@ -812,9 +812,6 @@
/mob/living/silicon/robot/modules/security
set_module = /obj/item/robot_module/security
/mob/living/silicon/robot/modules/clown
set_module = /obj/item/robot_module/clown
/mob/living/silicon/robot/modules/peacekeeper
set_module = /obj/item/robot_module/peacekeeper
@@ -1018,9 +1015,9 @@
status_flags &= ~CANPUSH
if(module.clean_on_move)
AddComponent(/datum/component/cleaning)
flags_1 |= CLEAN_ON_MOVE_1
else
qdel(GetComponent(/datum/component/cleaning))
flags_1 &= ~CLEAN_ON_MOVE_1
hat_offset = module.hat_offset

View File

@@ -435,37 +435,6 @@
if(CL)
CL.reagents.add_reagent("lube", 2 * coeff)
/obj/item/robot_module/clown
name = "Clown"
basic_modules = list(
/obj/item/device/assembly/flash/cyborg,
/obj/item/toy/crayon/rainbow,
/obj/item/device/instrument/bikehorn,
/obj/item/stamp/clown,
/obj/item/bikehorn,
/obj/item/bikehorn/airhorn,
/obj/item/paint/anycolor,
/obj/item/soap/nanotrasen,
/obj/item/pneumatic_cannon/pie/selfcharge/cyborg,
/obj/item/razor, //killbait material
/obj/item/lipstick/purple,
/obj/item/reagent_containers/spray/waterflower/cyborg,
/obj/item/borg/cyborghug/peacekeeper,
/obj/item/borg/lollipop/clown,
/obj/item/picket_sign/cyborg,
/obj/item/reagent_containers/borghypo/clown,
/obj/item/extinguisher/mini)
emag_modules = list(
/obj/item/reagent_containers/borghypo/clown/hacked,
/obj/item/reagent_containers/spray/waterflower/cyborg/hacked)
ratvar_modules = list(
/obj/item/clockwork/slab/cyborg,
/obj/item/clockwork/weapon/ratvarian_spear,
/obj/item/clockwork/replica_fabricator/cyborg)
moduleselect_icon = "service"
cyborg_base_icon = "clown"
hat_offset = -2
/obj/item/robot_module/butler
name = "Service"
basic_modules = list(

View File

@@ -125,7 +125,7 @@
if(!target) //Search for decals then.
target = scan(/obj/effect/decal/cleanable)
if(!target) //Checks for remains
target = scan(/obj/effect/decal/remains)
@@ -242,7 +242,7 @@
say(phrase)
victim.emote("scream")
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
victim.acid_act(5, 100)
victim.acid_act(5, 2, 100)
else if(A == src) // Wets floors and spawns foam randomly
if(prob(75))
var/turf/open/T = loc

View File

@@ -321,9 +321,9 @@
sleep(50)
if(mode == BOT_REPAIRING && src.loc == target_turf)
if(autotile) //Build the floor and include a tile.
target_turf.ChangeTurf(/turf/open/floor/plasteel)
target_turf.PlaceOnTop(/turf/open/floor/plasteel)
else //Build a hull plating without a floor tile.
target_turf.ChangeTurf(/turf/open/floor/plating)
target_turf.PlaceOnTop(/turf/open/floor/plating)
else
var/turf/open/floor/F = target_turf

View File

@@ -12,8 +12,6 @@
icon = 'icons/mob/drone.dmi'
icon_state = "drone_maint_hat"//yes reuse the _hat state.
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
var/seasonal_hats = TRUE //If TRUE, and there are no default hats, different holidays will grant different hats
var/static/list/possible_seasonal_hats //This is built automatically in build_seasonal_hats() but can also be edited by admins!
/obj/item/drone_shell/New()
..()
@@ -21,17 +19,6 @@
if(A)
notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
GLOB.poi_list |= src
if(isnull(possible_seasonal_hats))
build_seasonal_hats()
/obj/item/drone_shell/proc/build_seasonal_hats()
possible_seasonal_hats = list()
if(!SSevents.holidays.len)
return //no holidays, no hats; we'll keep the empty list so we never call this proc again
for(var/V in SSevents.holidays)
var/datum/holiday/holiday = SSevents.holidays[V]
if(holiday.drone_hat)
possible_seasonal_hats += holiday.drone_hat
/obj/item/drone_shell/Destroy()
GLOB.poi_list -= src
@@ -53,10 +40,6 @@
if(be_drone == "No" || QDELETED(src) || !isobserver(user))
return
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
if(!D.default_hatmask && seasonal_hats && possible_seasonal_hats.len)
var/hat_type = pick(possible_seasonal_hats)
var/obj/item/new_hat = new hat_type(D)
D.equip_to_slot_or_del(new_hat, slot_head)
D.admin_spawned = admin_spawned
D.key = user.key
qdel(src)

View File

@@ -235,7 +235,8 @@
LoseTarget()
return 0
if(target in possible_targets)
if(target.z != z)
var/turf/T = get_turf(src)
if(target.z != T.z)
LoseTarget()
return 0
var/target_distance = get_dist(targets_from,target)
@@ -417,7 +418,7 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
if(buckled)
buckled.attack_animal(src)
if(!isturf(targets_from.loc) && targets_from.loc != null)//Did someone put us in something?
var/atom/A = get_turf(targets_from)
var/atom/A = targets_from.loc
A.attack_animal(src)//Bang on it till we get out

View File

@@ -558,7 +558,7 @@ Difficulty: Very Hard
H.regenerate_limbs()
H.regenerate_organs()
H.revive(1,0)
H.add_disability(NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal
H.add_disability(DISABILITY_NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE)
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
@@ -719,7 +719,7 @@ Difficulty: Very Hard
if(isliving(A) && holder_animal)
var/mob/living/L = A
L.notransform = 1
L.add_disability(MUTE, STASIS_MUTE)
L.add_disability(DISABILITY_MUTE, STASIS_MUTE)
L.status_flags |= GODMODE
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
@@ -729,7 +729,7 @@ Difficulty: Very Hard
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
L.remove_disability(MUTE, STASIS_MUTE)
L.remove_disability(DISABILITY_MUTE, STASIS_MUTE)
L.status_flags &= ~GODMODE
L.notransform = 0
if(holder_animal)

View File

@@ -39,7 +39,7 @@
for(var/F in RANGE_TURFS(1, src))
if(ismineralturf(F))
var/turf/closed/mineral/M = F
M.ChangeTurf(M.turf_type,FALSE,FALSE,TRUE)
M.ChangeTurf(M.turf_type, null, CHANGETURF_IGNORE_AIR)
gps = new /obj/item/device/gps/internal(src)
/mob/living/simple_animal/hostile/spawner/lavaland/Destroy()

View File

@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
////////////////////////////// STUN ////////////////////////////////////
@@ -150,6 +150,9 @@
if(!disabilities[disability])
return
if(!islist(sources))
sources = list(sources)
if(LAZYLEN(sources))
for(var/S in sources)
if(S in disabilities[disability])
@@ -180,33 +183,33 @@
/////////////////////////////////// DISABILITY PROCS ////////////////////////////////////
/mob/living/proc/cure_blind(list/sources)
remove_disability(BLIND, sources)
if(!has_disability(BLIND))
remove_disability(DISABILITY_BLIND, sources)
if(!has_disability(DISABILITY_BLIND))
adjust_blindness(-1)
/mob/living/proc/become_blind(source)
if(!has_disability(BLIND))
if(!has_disability(DISABILITY_BLIND))
blind_eyes(1)
add_disability(BLIND, source)
add_disability(DISABILITY_BLIND, source)
/mob/living/proc/cure_nearsighted(list/sources)
remove_disability(NEARSIGHT, sources)
if(!has_disability(NEARSIGHT))
remove_disability(DISABILITY_NEARSIGHT, sources)
if(!has_disability(DISABILITY_NEARSIGHT))
clear_fullscreen("nearsighted")
/mob/living/proc/become_nearsighted(source)
if(!has_disability(NEARSIGHT))
if(!has_disability(DISABILITY_NEARSIGHT))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
add_disability(NEARSIGHT, source)
add_disability(DISABILITY_NEARSIGHT, source)
/mob/living/proc/cure_husk(list/sources)
remove_disability(HUSK, sources)
if(!has_disability(HUSK))
remove_disability(DISABILITY_HUSK, sources)
if(!has_disability(DISABILITY_HUSK))
status_flags &= ~DISFIGURED
update_body()
/mob/living/proc/become_husk(source)
if(!has_disability(HUSK))
if(!has_disability(DISABILITY_HUSK))
status_flags |= DISFIGURED //makes them unknown
update_body()
add_disability(HUSK, source)
add_disability(DISABILITY_HUSK, source)

View File

@@ -32,6 +32,7 @@
var/obj/machinery/machine = null
var/other_mobs = null
var/disabilities = 0 //Carbon
var/atom/movable/pulling = null
var/grab_state = 0

View File

@@ -285,6 +285,11 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
firstname.Find(real_name)
return firstname.match
/mob/proc/abiotic(full_body = 0)
for(var/obj/item/I in held_items)
if(!(I.flags_1 & NODROP_1))
return 1
return 0
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
/mob/verb/a_intent_change(input as text)

View File

@@ -1,88 +1,82 @@
//Speech verbs.
/mob/verb/say_verb(message as text)
set name = "Say"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
if(message)
say(message)
/mob/verb/whisper_verb(message as text)
set name = "Whisper"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
whisper(message)
/mob/proc/whisper(message, datum/language/language=null)
say(message, language) //only living mobs actually whisper, everything else just talks
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
usr.emote("me",1,message)
/mob/proc/say_dead(var/message)
var/name = real_name
var/alt_name = ""
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
if(jobban_isbanned(src, "OOC"))
to_chat(src, "<span class='danger'>You have been banned from deadchat.</span>")
return
if (src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
return
var/mob/dead/observer/O = src
if(isobserver(src) && O.deadchat_name)
name = "[O.deadchat_name]"
else
if(mind && mind.name)
name = "[mind.name]"
else
name = real_name
if(name != real_name)
alt_name = " (died as [real_name])"
var/K
if(key)
K = src.key
message = src.say_quote(message, get_spans())
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"
deadchat_broadcast(rendered, follow_target = src, speaker_key = K)
/mob/proc/check_emote(message)
if(copytext(message, 1, 2) == "*")
emote(copytext(message, 2))
return 1
/mob/proc/emote(var/act)
return
/mob/proc/hivecheck()
return 0
/mob/proc/lingcheck()
return LINGHIVE_NONE
//Speech verbs.
/mob/verb/say_verb(message as text)
set name = "Say"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
usr.say(message)
/mob/verb/whisper_verb(message as text)
set name = "Whisper"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
whisper(message)
/mob/proc/whisper(message, datum/language/language=null)
say(message, language) //only living mobs actually whisper, everything else just talks
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
usr.emote("me",1,message)
/mob/proc/say_dead(var/message)
var/name = real_name
var/alt_name = ""
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
if(jobban_isbanned(src, "OOC"))
to_chat(src, "<span class='danger'>You have been banned from deadchat.</span>")
return
if (src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
return
var/mob/dead/observer/O = src
if(isobserver(src) && O.deadchat_name)
name = "[O.deadchat_name]"
else
if(mind && mind.name)
name = "[mind.name]"
else
name = real_name
if(name != real_name)
alt_name = " (died as [real_name])"
var/K
if(key)
K = src.key
message = src.say_quote(message, get_spans())
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"
deadchat_broadcast(rendered, follow_target = src, speaker_key = K)
/mob/proc/emote(var/act)
return
/mob/proc/hivecheck()
return 0
/mob/proc/lingcheck()
return LINGHIVE_NONE

View File

@@ -1,7 +1,7 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// STUN ////////////////////////////////////
@@ -164,7 +164,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_disability(BLIND))
if(L.has_disability(DISABILITY_BLIND))
blind_minimum = 1
eye_blind = max(eye_blind+amount, blind_minimum)
if(!eye_blind)
@@ -185,7 +185,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_disability(BLIND))
if(L.has_disability(DISABILITY_BLIND))
blind_minimum = 1
eye_blind = blind_minimum
if(!eye_blind)

View File

@@ -33,7 +33,9 @@
orbiting = null
return ..()
/datum/orbit/proc/Check(turf/targetloc)
/datum/orbit/proc/Check(turf/targetloc, list/checked_already = list())
//Avoid infinite loops for people who end up orbiting themself through another orbiter
checked_already[src] = TRUE
if (!orbiter)
qdel(src)
return
@@ -51,12 +53,14 @@
return
orbiter.loc = targetloc
orbiter.update_parallax_contents()
orbiter.update_light()
lastloc = orbiter.loc
for(var/other_orbit in orbiter.orbiters)
var/datum/orbit/OO = other_orbit
if(OO == src)
//Skip if checked already
if(checked_already[OO])
continue
OO.Check(targetloc)
OO.Check(targetloc, checked_already)
/atom/movable/var/datum/orbit/orbiting = null
/atom/var/list/orbiters = null
@@ -119,4 +123,4 @@
var/datum/orbit/O = thing
if(O.orbiter && isobserver(O.orbiter))
var/mob/dead/observer/D = O.orbiter
D.ManualFollow(target)
D.ManualFollow(target)

View File

@@ -202,7 +202,7 @@
if(!user.mind.hasSoul)
to_chat(user, "<span class='notice'>You do not possess a soul.</span>")
return 0
if(user.disabilities & DUMB)
if(user.has_disability(DISABILITY_DUMB))
to_chat(user, "<span class='notice'>You quickly scrawl 'your name' on the contract.</span>")
signIncorrectly()
return 0

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