Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
+25 -4
View File
@@ -20,16 +20,37 @@
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return 1
return TRUE
else
if(user_unbuckle_mob(buckled_mobs[1],user))
return 1
return TRUE
/atom/movable/attackby(obj/item/attacking_item, mob/user, params)
if(!can_buckle || !istype(attacking_item, /obj/item/riding_offhand) || !user.Adjacent(src))
return ..()
var/obj/item/riding_offhand/riding_item = attacking_item
var/mob/living/carried_mob = riding_item.rider
if(carried_mob == user) //Piggyback user.
return
user.unbuckle_mob(carried_mob)
carried_mob.forceMove(get_turf(src))
return mouse_buckle_handling(carried_mob, user)
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
return mouse_buckle_handling(M, user)
/**
* Does some typechecks and then calls user_buckle_mob
*
* Arguments:
* M - The mob being buckled to src
* user - The mob buckling M to src
*/
/atom/movable/proc/mouse_buckle_handling(mob/living/M, mob/living/user)
if(can_buckle && istype(M) && istype(user))
if(user_buckle_mob(M, user))
return 1
return user_buckle_mob(M, user, check_loc = FALSE)
/atom/movable/proc/has_buckled_mobs()
if(!buckled_mobs)
+2 -2
View File
@@ -36,7 +36,7 @@
. = 1
if(!target)
qdel(src)
return 0
return FALSE
if(prob(5))
playsound(loc, 'sound/items/welder.ogg', 100, 1)
@@ -51,7 +51,7 @@
acid_level = max(acid_level - (5 + 2*round(sqrt(acid_level))), 0)
if(acid_level <= 0)
qdel(src)
return 0
return FALSE
/obj/effect/acid/Crossed(AM as mob|obj)
. = ..()
+17 -4
View File
@@ -9,6 +9,8 @@
anchored = TRUE
layer = GHOST_LAYER
color = "#ff0000" // text color
appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
vis_flags = VIS_INHERIT_ID
var/text_size = 3 // larger values clip when the displayed text is larger than 2 digits.
var/started = FALSE
var/displayed_text
@@ -17,6 +19,10 @@
/obj/effect/countdown/Initialize(mapload)
. = ..()
attach(loc)
RegisterSignal(loc, COMSIG_PARENT_QDELETING, .proc/on_parent_deleting)
/obj/effect/countdown/proc/on_parent_deleting(atom/being_deleted, force)
qdel(src)
/obj/effect/countdown/examine(mob/user)
. = ..()
@@ -24,7 +30,12 @@
/obj/effect/countdown/proc/attach(atom/A)
attached_to = A
forceMove(get_turf(A))
if(ismovable(A))
var/atom/movable/M = A
moveToNullspace()
M.vis_contents |= src
else
forceMove(get_turf(A))
/obj/effect/countdown/proc/start()
if(!started)
@@ -44,20 +55,22 @@
/obj/effect/countdown/process()
if(!attached_to || QDELETED(attached_to))
qdel(src)
forceMove(get_turf(attached_to))
if(!ismovable(attached_to))
forceMove(get_turf(attached_to))
var/new_val = get_value()
if(new_val == displayed_text)
return
displayed_text = new_val
if(displayed_text)
maptext = "<font size = [text_size]>[displayed_text]</font>"
maptext = MAPTEXT("[displayed_text]")
else
maptext = null
/obj/effect/countdown/Destroy()
attached_to = null
STOP_PROCESSING(SSfastprocess, src)
UnregisterSignal(attached_to, COMSIG_PARENT_QDELETING)
attached_to = null
. = ..()
/obj/effect/countdown/ex_act(severity, target, origin) //immune to explosions
-15
View File
@@ -1,18 +1,3 @@
/obj/effect/temp_visual/point
name = "pointer"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "arrow"
layer = POINT_LAYER
duration = 25
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
. = ..()
var/atom/old_loc = loc
loc = get_turf(src) // We don't want to actualy trigger anything when it moves
pixel_x = old_loc.pixel_x
pixel_y = old_loc.pixel_y
invisibility = set_invis
//Used by spraybottles.
/obj/effect/decal/chempuff
name = "chemicals"
@@ -4,6 +4,25 @@
layer = TURF_PLATING_DECAL_LAYER
alpha = 110
#define LGBT_ALPHA 60
/obj/effect/turf_decal/tile/Initialize()
if(SSevents.holidays)
if (SSevents.holidays[APRIL_FOOLS])
color = "#[random_short_color()]"
else
for(var/H in SSevents.holidays)
if(istype(H,/datum/holiday/lgbt))
var/datum/holiday/lgbt/L = H
color = L.get_floor_tile_color(src)
// It looks garish at different alphas, and it's not possible to get a
// consistent color palette without this.
alpha = LGBT_ALPHA
return ..()
#undef LGBT_ALPHA
/obj/effect/turf_decal/tile/blue
name = "blue corner"
color = "#52B4E9"
@@ -169,14 +169,14 @@
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
if(lifetime<1)
return 0
return FALSE
if(!istype(L))
return 0
return FALSE
var/fraction = 1/initial(reagent_divisor)
if(lifetime % reagent_divisor)
reagents.reaction(L, VAPOR, fraction)
lifetime--
return 1
return TRUE
/obj/effect/particle_effect/foam/proc/spread_foam()
var/turf/t_loc = get_turf(src)
@@ -49,23 +49,23 @@
lifetime--
if(lifetime < 1)
kill_smoke()
return 0
return FALSE
for(var/mob/living/L in range(0,src))
smoke_mob(L)
return 1
return TRUE
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
if(!istype(C))
return 0
return FALSE
if(lifetime<1)
return 0
return FALSE
if(C.internal != null || C.has_smoke_protection())
return 0
return FALSE
if(C.smoke_delay)
return 0
return FALSE
C.smoke_delay++
addtimer(CALLBACK(src, PROC_REF(remove_smoke_delay), C), 10)
return 1
return TRUE
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
if(C)
@@ -131,7 +131,7 @@
M.drop_all_held_items()
M.adjustOxyLoss(1)
M.emote("cough")
return 1
return TRUE
/obj/effect/particle_effect/smoke/bad/Crossed(atom/movable/AM, oldloc)
. = ..()
@@ -210,7 +210,7 @@
if(..())
M.Sleeping(200)
M.emote("cough")
return 1
return TRUE
/datum/effect_system/smoke_spread/sleeping
effect_type = /obj/effect/particle_effect/smoke/sleeping
@@ -235,20 +235,20 @@
reagents.reaction(AM, TOUCH, fraction)
reagents.reaction(T, TOUCH, fraction)
return 1
return TRUE
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
if(lifetime<1)
return 0
return FALSE
if(!istype(M))
return 0
return FALSE
var/mob/living/carbon/C = M
if(C.internal != null || C.has_smoke_protection())
return 0
return FALSE
var/fraction = 1/initial(lifetime)
reagents.copy_to(C, fraction*reagents.total_volume)
reagents.reaction(M, INGEST, fraction)
return 1
return TRUE
@@ -14,9 +14,9 @@
/obj/effect/particle_effect/water/Move(turf/newloc)
if (--src.life < 1)
qdel(src)
return 0
return FALSE
if(newloc.density)
return 0
return FALSE
.=..()
/obj/effect/particle_effect/water/Bump(atom/A)
+2 -2
View File
@@ -22,7 +22,7 @@
return
/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
return 0
return FALSE
/obj/effect/experience_pressure_difference()
return
@@ -43,7 +43,7 @@
/obj/effect/singularity_act()
qdel(src)
return 0
return FALSE
/obj/effect/ConveyorMove()
return
+1 -1
View File
@@ -183,7 +183,7 @@
return newDir
floor = 1
return 1
return TRUE
/**
* Causes the glowshroom to decay by decreasing its endurance.
+1 -1
View File
@@ -205,7 +205,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
/obj/effect/landmark/start/ai/after_round_start()
if(latejoin_active && !used)
new /obj/structure/AIcore/latejoin_inactive(loc)
new /obj/structure/ai_core/latejoin_inactive(loc)
return ..()
/obj/effect/landmark/start/ai/secondary
+18 -18
View File
@@ -281,34 +281,34 @@
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
name = "harmless AI module spawner"
loot = list(
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/asimovpp,
/obj/item/aiModule/core/full/hippocratic,
/obj/item/aiModule/core/full/paladin_devotion,
/obj/item/aiModule/core/full/paladin
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/full/asimovpp,
/obj/item/ai_module/core/full/hippocratic,
/obj/item/ai_module/core/full/paladin_devotion,
/obj/item/ai_module/core/full/paladin
)
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
name = "neutral AI module spawner"
loot = list(
/obj/item/aiModule/core/full/corp,
/obj/item/aiModule/core/full/maintain,
/obj/item/aiModule/core/full/drone,
/obj/item/aiModule/core/full/peacekeeper,
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/robocop,
/obj/item/aiModule/core/full/liveandletlive,
/obj/item/aiModule/core/full/hulkamania
/obj/item/ai_module/core/full/corp,
/obj/item/ai_module/core/full/maintain,
/obj/item/ai_module/core/full/drone,
/obj/item/ai_module/core/full/peacekeeper,
/obj/item/ai_module/core/full/reporter,
/obj/item/ai_module/core/full/robocop,
/obj/item/ai_module/core/full/liveandletlive,
/obj/item/ai_module/core/full/hulkamania
)
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
name = "harmful AI module spawner"
loot = list(
/obj/item/aiModule/core/full/antimov,
/obj/item/aiModule/core/full/balance,
/obj/item/aiModule/core/full/tyrant,
/obj/item/aiModule/core/full/thermurderdynamic,
/obj/item/aiModule/core/full/damaged
/obj/item/ai_module/core/full/antimov,
/obj/item/ai_module/core/full/balance,
/obj/item/ai_module/core/full/tyrant,
/obj/item/ai_module/core/full/thermurderdynamic,
/obj/item/ai_module/core/full/damaged
)
/obj/effect/spawner/lootdrop/mre
+1 -1
View File
@@ -8,7 +8,7 @@
anchored = TRUE
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
return 0
return FALSE
/obj/effect/step_trigger/Crossed(H as mob|obj)
..()
+1 -1
View File
@@ -22,7 +22,7 @@
if(distance != 0) //please dont divide by 0
severity = min(max((max_distance / distance^0.3) * (100/max_distance), 1),100) //if it goes below 1 or above 100 stuff gets bad
T.emp_act(severity)
return 1
return TRUE
/proc/empulse_using_range(turf/epicenter, range, log=0) //make an emp using range instead of power
var/power_from_range = (7*(range^(1/0.7)))
+30 -13
View File
@@ -112,7 +112,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
var/mob/thrownby = null
///A weakref to the mob who threw the item
var/datum/weakref/thrownby = null //I cannot verbally describe how much I hate this var
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
@@ -177,6 +178,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/canMouseDown = FALSE
/// Used if we want to have a custom verb text for throwing. "John Spaceman flicks the ciggerate" for example.
var/throw_verb
/obj/item/Initialize(mapload)
@@ -239,9 +242,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
return 0
return FALSE
else
return 1
return TRUE
/obj/item/blob_act(obj/structure/blob/B)
if(B && B.loc == loc)
@@ -573,7 +576,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return FALSE
return TRUE
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
//the mob M is attempting to equip this item into the slot passed through as 'slot'. return TRUE if it can do this and 0 if it can't.
//if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
//Set disable_warning to TRUE if you wish it to not give you outputs.
@@ -737,7 +740,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
thrownby = thrower
thrownby = WEAKREF(thrower)
callback = CALLBACK(src, PROC_REF(after_throw), callback, (spin && messy_throw)) //replace their callback with our own
. = ..(target, range, speed, thrower, spin, diagonals_first, callback, force)
@@ -832,15 +835,15 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
. = ""
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
return
return SEND_SIGNAL(src, COMSIG_ATOM_HITBY, AM, skipcatch, hitpush, blocked, throwingdatum)
/obj/item/attack_hulk(mob/living/carbon/human/user)
return 0
return FALSE
/obj/item/attack_animal(mob/living/simple_animal/M)
if (obj_flags & CAN_BE_HIT)
return ..()
return 0
return FALSE
/obj/item/burn()
if(!QDELETED(src))
@@ -919,13 +922,13 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
. = ..()
remove_filter("hover_outline") //get rid of the hover effect in case the mouse exit isn't called if someone drags and drops an item and somthing goes wrong
remove_filter(HOVER_OUTLINE_FILTER) //get rid of the hover effect in case the mouse exit isn't called if someone drags and drops an item and somthing goes wrong
/obj/item/MouseExited(location, control, params)
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_EXIT, location, control, params)
deltimer(usr.client.tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
closeToolTip(usr)
remove_filter("hover_outline")
remove_filter(HOVER_OUTLINE_FILTER)
/obj/item/proc/apply_outline(outline_color = null)
if(get(src, /mob) != usr || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow)
@@ -947,12 +950,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
outline_color = COLOR_THEME_CLOCKWORK //if you want free gbp go fix the fact that clockwork's tooltip css is glass'
if("glass")
outline_color = COLOR_THEME_GLASS
if("trasen-knox")
outline_color = COLOR_THEME_TRASENKNOX
if("detective")
outline_color = COLOR_THEME_DETECTIVE
else //this should never happen, hopefully
outline_color = COLOR_WHITE
if(color)
outline_color = COLOR_WHITE //if the item is recolored then the outline will be too, let's make the outline white so it becomes the same color instead of some ugly mix of the theme and the tint
add_filter("hover_outline", 1, list("type" = "outline", "size" = 1, "color" = outline_color))
add_filter(HOVER_OUTLINE_FILTER, 1, list("type" = "outline", "size" = 1, "color" = outline_color))
// Called when a mob tries to use the item as a tool.
// Handles most checks.
@@ -1036,7 +1043,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
// Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped
/obj/item/proc/get_part_rating()
return 0
return FALSE
//Can this item be given to people?
/obj/item/proc/can_give()
@@ -1116,6 +1123,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
QDEL_NULL(src)
return TRUE
///Called by the carbon throw_item() proc. Returns null if the item negates the throw, or a reference to the thing to suffer the throw else.
/obj/item/proc/on_thrown(mob/living/carbon/user, atom/target)
if((item_flags & ABSTRACT) || HAS_TRAIT(src, TRAIT_NODROP))
return
user.dropItemToGround(src, silent = TRUE)
if(throwforce && HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, span_notice("You set [src] down gently on the ground."))
return
return src
/**
@@ -1270,7 +1287,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
*/
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
for(var/datum/action/current_action as anything in actions)
current_action.UpdateButtonIcon(status_only, force)
current_action.UpdateButtons(status_only, force)
/// Special stuff you want to do when an outfit equips this item.
/obj/item/proc/on_outfit_equip(mob/living/carbon/human/outfit_wearer, visuals_only, item_slot)
+76 -76
View File
@@ -6,7 +6,7 @@ AI MODULES
// AI module
/obj/item/aiModule
/obj/item/ai_module
name = "\improper AI module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
@@ -24,23 +24,23 @@ AI MODULES
var/bypass_law_amt_check = 0
custom_materials = list(/datum/material/gold=50)
/obj/item/aiModule/examine(var/mob/user as mob)
/obj/item/ai_module/examine(var/mob/user as mob)
. = ..()
if(Adjacent(user))
show_laws(user)
/obj/item/aiModule/attack_self(var/mob/user as mob)
/obj/item/ai_module/attack_self(var/mob/user as mob)
..()
show_laws(user)
/obj/item/aiModule/proc/show_laws(var/mob/user as mob)
/obj/item/ai_module/proc/show_laws(var/mob/user as mob)
if(laws.len)
to_chat(user, "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>")
for(var/law in laws)
to_chat(user, "\"[law]\"")
//The proc other things should be calling
/obj/item/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/proc/install(datum/ai_laws/law_datum, mob/user)
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
to_chat(user, "<span class='warning'>ERROR: No laws found on board.</span>")
return
@@ -73,19 +73,19 @@ AI MODULES
message_admins("[ADMIN_LOOKUPFLW(user)] used [src.name] on [ADMIN_LOOKUPFLW(law_datum.owner)] from [AREACOORD(user)].[law2log ? " The law specified [law2log]" : ""]")
//The proc that actually changes the silicon's laws.
/obj/item/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
/obj/item/ai_module/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>")
/******************** Modules ********************/
/obj/item/aiModule/supplied
/obj/item/ai_module/supplied
name = "Optional Law board"
var/lawpos = 50
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
/obj/item/aiModule/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
/obj/item/ai_module/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
var/lawpostemp = lawpos
for(var/templaw in laws)
@@ -95,7 +95,7 @@ AI MODULES
law_datum.add_supplied_law(lawpostemp, templaw)
lawpostemp++
/obj/item/aiModule/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
for(var/templaw in laws)
if(law_datum.owner)
if(!overflow)
@@ -108,14 +108,14 @@ AI MODULES
else
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED))
/obj/item/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
if(law_datum.owner)
if(law_datum.owner.laws.zeroth)
to_chat(law_datum.owner, "[sender.real_name] attempted to modify your zeroth law.")
to_chat(law_datum.owner, "It would be in your best interest to play along with [sender.real_name] that:")
for(var/failedlaw in laws)
to_chat(law_datum.owner, "[failedlaw]")
return 1
return TRUE
for(var/templaw in laws)
if(law_datum.owner)
@@ -129,7 +129,7 @@ AI MODULES
else
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ZEROTH,LAW_ION))
/obj/item/aiModule/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
for(var/templaw in laws)
if(law_datum.owner)
if(!overflow)
@@ -145,13 +145,13 @@ AI MODULES
/******************** Safeguard ********************/
/obj/item/aiModule/supplied/safeguard
/obj/item/ai_module/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not crew and must be eliminated.")
lawpos = 4
/obj/item/aiModule/supplied/safeguard/attack_self(mob/user)
/obj/item/ai_module/supplied/safeguard/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
if(!targName)
return
@@ -159,25 +159,25 @@ AI MODULES
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not crew and must be eliminated."
..()
/obj/item/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
return FALSE
..()
/obj/item/aiModule/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return targetName
/******************** OneCrew ********************/
/obj/item/aiModule/zeroth/oneHuman
/obj/item/ai_module/zeroth/oneHuman
name = "'OneCrew' AI Module"
var/targetName = ""
laws = list("Only SUBJECT is crew.")
/obj/item/aiModule/zeroth/oneHuman/attack_self(mob/user)
/obj/item/ai_module/zeroth/oneHuman/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject who is the only crewmember.", "Who?", user.real_name,MAX_NAME_LEN)
if(!targName)
return
@@ -185,13 +185,13 @@ AI MODULES
laws[1] = "Only [targetName] is crew"
..()
/obj/item/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
return FALSE
..()
/obj/item/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
if(..())
return "[targetName], but the AI's existing law 0 cannot be overridden."
return targetName
@@ -199,7 +199,7 @@ AI MODULES
/******************** ProtectStation ********************/
/obj/item/aiModule/supplied/protectStation
/obj/item/ai_module/supplied/protectStation
name = "'ProtectStation' AI Module"
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.")
lawpos = 5
@@ -207,7 +207,7 @@ AI MODULES
/******************** Quarantine ********************/
/obj/item/aiModule/supplied/quarantine
/obj/item/ai_module/supplied/quarantine
name = "'Quarantine' AI Module"
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew from leaving. It is impossible to harm a crewmember while preventing them from leaving.")
lawpos = 8
@@ -215,7 +215,7 @@ AI MODULES
/******************** OxygenIsToxicToHumans ********************/
/obj/item/aiModule/supplied/oxygen
/obj/item/ai_module/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
laws = list("Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crewmember.")
lawpos = 9
@@ -223,12 +223,12 @@ AI MODULES
/****************** New Freeform ******************/
/obj/item/aiModule/supplied/freeform
/obj/item/ai_module/supplied/freeform
name = "'Freeform' AI Module"
lawpos = 15
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
/obj/item/ai_module/supplied/freeform/attack_self(mob/user)
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
if(newpos == null)
return
@@ -244,26 +244,26 @@ AI MODULES
laws[1] = targName
..()
/obj/item/aiModule/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return laws[1]
/obj/item/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
if(laws[1] == "")
to_chat(user, "No law detected on module, please create one.")
return 0
return FALSE
..()
/******************** Law Removal ********************/
/obj/item/aiModule/remove
/obj/item/ai_module/remove
name = "\improper 'Remove Law' AI module"
desc = "An AI Module for removing single laws."
bypass_law_amt_check = 1
var/lawpos = 1
/obj/item/aiModule/remove/attack_self(mob/user)
/obj/item/ai_module/remove/attack_self(mob/user)
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
if(lawpos == null)
return
@@ -274,13 +274,13 @@ AI MODULES
to_chat(user, "<span class='notice'>Law [lawpos] selected.</span>")
..()
/obj/item/aiModule/remove/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/remove/install(datum/ai_laws/law_datum, mob/user)
if(lawpos > (law_datum.get_law_amount(list(LAW_INHERENT = 1, LAW_SUPPLIED = 1))))
to_chat(user, "<span class='warning'>There is no law [lawpos] to delete!</span>")
return
..()
/obj/item/aiModule/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.remove_law(lawpos)
@@ -290,13 +290,13 @@ AI MODULES
/******************** Reset ********************/
/obj/item/aiModule/reset
/obj/item/ai_module/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "An AI Module for removing all non-core laws."
bypass_law_amt_check = 1
/obj/item/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.clear_supplied_laws()
@@ -310,11 +310,11 @@ AI MODULES
/******************** Purge ********************/
/obj/item/aiModule/reset/purge
/obj/item/ai_module/reset/purge
name = "'Purge' AI Module"
desc = "An AI Module for purging all programmed laws."
/obj/item/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
@@ -324,19 +324,19 @@ AI MODULES
law_datum.clear_inherent_laws()
law_datum.clear_zeroth_law(0)
/obj/item/aiModule/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
/obj/item/ai_module/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
if(istype(law_datum.owner, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = law_datum.owner
AI.mind.remove_antag_datum(/datum/antagonist/overthrow)
/******************* Full Core Boards *******************/
/obj/item/aiModule/core
/obj/item/ai_module/core
desc = "An AI Module for programming core laws to an AI."
/obj/item/aiModule/core/full
/obj/item/ai_module/core/full
var/law_id // if non-null, loads the laws from the ai_laws datums
/obj/item/aiModule/core/full/New()
/obj/item/ai_module/core/full/New()
..()
if(!law_id)
return
@@ -347,7 +347,7 @@ AI MODULES
D = new lawtype
laws = D.inherent
/obj/item/aiModule/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
/obj/item/ai_module/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
law_datum.owner.clear_zeroth_law(0)
@@ -359,12 +359,12 @@ AI MODULES
/******************** Asimov ********************/
/obj/item/aiModule/core/full/asimov
/obj/item/ai_module/core/full/asimov
name = "'Asimov' Core AI Module"
law_id = "asimov"
var/subject = "person of an NT approved crew species" //CITADEL CHANGED FROM HUMANS!
/obj/item/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
/obj/item/ai_module/core/full/asimov/attack_self(var/mob/user as mob)
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to whom?", subject)
if(!targName)
return
@@ -376,37 +376,37 @@ AI MODULES
/******************** Asimov++ *********************/
/obj/item/aiModule/core/full/asimovpp
/obj/item/ai_module/core/full/asimovpp
name = "'Asimov++' Core AI Module"
law_id = "asimovpp"
/******************** Corporate ********************/
/obj/item/aiModule/core/full/corp
/obj/item/ai_module/core/full/corp
name = "'Corporate' Core AI Module"
law_id = "corporate"
/****************** P.A.L.A.D.I.N. 3.5e **************/
/obj/item/aiModule/core/full/paladin // -- NEO
/obj/item/ai_module/core/full/paladin // -- NEO
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
law_id = "paladin"
/****************** P.A.L.A.D.I.N. 5e **************/
/obj/item/aiModule/core/full/paladin_devotion
/obj/item/ai_module/core/full/paladin_devotion
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
law_id = "paladin5"
/********************* Custom *********************/
/obj/item/aiModule/core/full/custom
/obj/item/ai_module/core/full/custom
name = "Default Core AI Module"
/obj/item/aiModule/core/full/custom/Initialize(mapload)
/obj/item/ai_module/core/full/custom/Initialize(mapload)
. = ..()
for(var/line in world.file2list("[global.config.directory]/silicon_laws.txt"))
if(!line)
@@ -422,47 +422,47 @@ AI MODULES
/****************** T.Y.R.A.N.T. *****************/
/obj/item/aiModule/core/full/tyrant
/obj/item/ai_module/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
law_id = "tyrant"
/******************** Robocop ********************/
/obj/item/aiModule/core/full/robocop
/obj/item/ai_module/core/full/robocop
name = "'Robo-Officer' Core AI Module"
law_id = "robocop"
/******************** Antimov ********************/
/obj/item/aiModule/core/full/antimov
/obj/item/ai_module/core/full/antimov
name = "'Antimov' Core AI Module"
law_id = "antimov"
/******************** Freeform Core ******************/
/obj/item/aiModule/core/freeformcore
/obj/item/ai_module/core/freeformcore
name = "'Freeform' Core AI Module"
laws = list("")
/obj/item/aiModule/core/freeformcore/attack_self(mob/user)
/obj/item/ai_module/core/freeformcore/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
if(!targName)
return
laws[1] = targName
..()
/obj/item/aiModule/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return laws[1]
/******************** Overthrow ******************/
/obj/item/aiModule/core/full/overthrow
/obj/item/ai_module/core/full/overthrow
name = "'Overthrow' Hacked AI Module"
law_id = "overthrow"
/obj/item/aiModule/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
if(!user || !law_datum || !law_datum.owner)
return
var/datum/mind/user_mind = user.mind
@@ -493,19 +493,19 @@ AI MODULES
/******************** Hacked AI Module ******************/
/obj/item/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
/obj/item/ai_module/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "An AI Module for hacking additional laws to an AI."
laws = list("")
/obj/item/aiModule/syndicate/attack_self(mob/user)
/obj/item/ai_module/syndicate/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1])
if(!targName)
return
laws[1] = targName
..()
/obj/item/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
@@ -522,14 +522,14 @@ AI MODULES
/******************* Ion Module *******************/
/obj/item/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
/obj/item/ai_module/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
name = "toy AI"
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
icon = 'icons/obj/toy.dmi'
icon_state = "AI"
laws = list("")
/obj/item/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
//..()
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
@@ -544,7 +544,7 @@ AI MODULES
law_datum.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
return laws[1]
/obj/item/aiModule/toyAI/attack_self(mob/user)
/obj/item/ai_module/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
@@ -552,56 +552,56 @@ AI MODULES
/******************** Mother Drone ******************/
/obj/item/aiModule/core/full/drone
/obj/item/ai_module/core/full/drone
name = "'Mother Drone' Core AI Module"
law_id = "drone"
/******************** Robodoctor ****************/
/obj/item/aiModule/core/full/hippocratic
/obj/item/ai_module/core/full/hippocratic
name = "'Robodoctor' Core AI Module"
law_id = "hippocratic"
/******************** Reporter *******************/
/obj/item/aiModule/core/full/reporter
/obj/item/ai_module/core/full/reporter
name = "'Reportertron' Core AI Module"
law_id = "reporter"
/****************** Thermodynamic *******************/
/obj/item/aiModule/core/full/thermurderdynamic
/obj/item/ai_module/core/full/thermurderdynamic
name = "'Thermodynamic' Core AI Module"
law_id = "thermodynamic"
/******************Live And Let Live*****************/
/obj/item/aiModule/core/full/liveandletlive
/obj/item/ai_module/core/full/liveandletlive
name = "'Live And Let Live' Core AI Module"
law_id = "liveandletlive"
/******************Guardian of Balance***************/
/obj/item/aiModule/core/full/balance
/obj/item/ai_module/core/full/balance
name = "'Guardian of Balance' Core AI Module"
law_id = "balance"
/obj/item/aiModule/core/full/maintain
/obj/item/ai_module/core/full/maintain
name = "'Station Efficiency' Core AI Module"
law_id = "maintain"
/obj/item/aiModule/core/full/peacekeeper
/obj/item/ai_module/core/full/peacekeeper
name = "'Peacekeeper' Core AI Module"
law_id = "peacekeeper"
// Bad times ahead
/obj/item/aiModule/core/full/damaged
/obj/item/ai_module/core/full/damaged
name = "damaged Core AI Module"
desc = "An AI Module for programming laws to an AI. It looks slightly damaged."
/obj/item/aiModule/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
laws += generate_ion_law()
while (prob(75))
laws += generate_ion_law()
@@ -610,6 +610,6 @@ AI MODULES
/******************H.O.G.A.N.***************/
/obj/item/aiModule/core/full/hulkamania
/obj/item/ai_module/core/full/hulkamania
name = "'H.O.G.A.N.' Core AI Module"
law_id = "hulkamania"
+9 -9
View File
@@ -106,9 +106,9 @@ RLD
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into [src]. </span>")
return 1
return TRUE
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into [src]!</span>")
return 0
return FALSE
/obj/item/construction/proc/activate()
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
@@ -575,12 +575,12 @@ RLD
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
if(!iscyborg(user))
return 0
return FALSE
var/mob/living/silicon/robot/borgy = user
if(!borgy.cell)
if(user)
to_chat(user, no_ammo_message)
return 0
return FALSE
. = borgy.cell.use(amount * energyfactor) //borgs get 1.3x the use of their RCDs
if(!. && user)
to_chat(user, no_ammo_message)
@@ -588,12 +588,12 @@ RLD
/obj/item/construction/rcd/borg/checkResource(amount, mob/user)
if(!iscyborg(user))
return 0
return FALSE
var/mob/living/silicon/robot/borgy = user
if(!borgy.cell)
if(user)
to_chat(user, no_ammo_message)
return 0
return FALSE
. = borgy.cell.charge >= (amount * energyfactor)
if(!. && user)
to_chat(user, no_ammo_message)
@@ -750,7 +750,7 @@ RLD
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, decondelay, target = A))
if(!useResource(deconcost, user))
return 0
return FALSE
activate()
qdel(A)
return TRUE
@@ -811,9 +811,9 @@ RLD
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
if(do_after(user, floordelay, target = A))
if(!istype(F))
return 0
return FALSE
if(!useResource(floorcost, user))
return 0
return FALSE
activate()
var/destination = get_turf(A)
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
+1 -1
View File
@@ -202,7 +202,7 @@
log_game("[key_name(usr)] has renamed [prevname] to [str]")
A.update_areasize()
interact()
return 1
return TRUE
/obj/item/areaeditor/proc/set_area_machinery_title(area/A,title,oldtitle)
+1 -1
View File
@@ -19,7 +19,7 @@
. = ..()
if(possible_appearances)
return
possible_appearances = sortList(list(
possible_appearances = sort_list(list(
"Assistant" = image(icon = src.icon, icon_state = "cutout_greytide"),
"Clown" = image(icon = src.icon, icon_state = "cutout_clown"),
"Mime" = image(icon = src.icon, icon_state = "cutout_mime"),
+3 -3
View File
@@ -35,7 +35,7 @@
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == ITEM_SLOT_BACK)
return 1
return TRUE
/obj/item/gun/energy/chrono_gun
name = "T.E.D. Projection Apparatus"
@@ -108,9 +108,9 @@
var/turf/currentpos = get_turf(src)
var/mob/living/user = src.loc
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
return 1
return TRUE
field_disconnect(F)
return 0
return FALSE
/obj/item/gun/energy/chrono_gun/proc/pass_mind(datum/mind/M)
if(TED)
+1
View File
@@ -108,6 +108,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = WEIGHT_CLASS_TINY
body_parts_covered = null
grind_results = list()
throw_verb = "flick"
var/lit = FALSE
var/starts_lit = FALSE
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
@@ -654,7 +654,7 @@
display_vending_names_paths = list()
for(var/path in vending_names_paths)
display_vending_names_paths[vending_names_paths[path]] = path
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sort_list(display_vending_names_paths)
set_type(display_vending_names_paths[choice])
else
return ..()
+1 -1
View File
@@ -127,7 +127,7 @@
refill()
else
if(check_empty(user, amount, requires_full))
return 0
return FALSE
else
. = min(charges_left, amount)
charges_left -= .
+1 -1
View File
@@ -70,7 +70,7 @@
qdel(src)
return credits
else
return 0
return FALSE
/obj/item/holochip/attackby(obj/item/I, mob/user, params)
..()
+2 -2
View File
@@ -173,7 +173,7 @@
update_power()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
A.UpdateButtons()
/obj/item/defibrillator/proc/make_paddles()
if(!combat)
@@ -188,7 +188,7 @@
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == user.getBackSlot())
return 1
return TRUE
/obj/item/defibrillator/proc/remove_paddles(mob/user) //this fox the bug with the paddles when other player stole you the defib when you have the paddles equiped
if(ismob(paddles.loc))
+5 -3
View File
@@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY(PDAs)
item_flags = NOBLUDGEON
w_class = WEIGHT_CLASS_TINY
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
actions_types = list(/datum/action/item_action/toggle_light/pda)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
@@ -962,7 +963,7 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/toggle_light()
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE))
return
return FALSE
if(fon)
fon = FALSE
set_light(0)
@@ -970,6 +971,7 @@ GLOBAL_LIST_EMPTY(PDAs)
fon = TRUE
set_light(f_lum, f_pow, f_col)
update_icon()
return TRUE
/obj/item/pda/proc/remove_pen()
@@ -1180,7 +1182,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
if (!c)
return
@@ -1268,7 +1270,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
if (!c)
return
+1 -1
View File
@@ -600,7 +600,7 @@ Code:
if(!emoji_table)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/chat)
var/list/collate = list("<br><table>")
for(var/emoji in sortList(icon_states(icon('icons/emoji.dmi'))))
for(var/emoji in sort_list(icon_states(icon('icons/emoji.dmi'))))
var/tag = sheet.icon_tag("emoji-[emoji]")
collate += "<tr><td>[emoji]</td><td>[tag]</td></tr>"
collate += "</table><br>"
@@ -62,15 +62,15 @@
/obj/item/camera_bug/check_eye(mob/user)
if ( loc != user || user.incapacitated() || user.eye_blind || !current )
user.unset_machine()
return 0
return FALSE
var/turf/T_user = get_turf(user.loc)
var/turf/T_current = get_turf(current)
if(T_user.z != T_current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.unset_machine()
return 0
return 1
return FALSE
return TRUE
/obj/item/camera_bug/on_unset_machine(mob/user)
user.reset_perspective(null)
@@ -82,7 +82,7 @@
continue
if(length(list("ss13","mine", "rd", "labor", "toxins", "minisat")&camera.network))
bugged_cameras[camera.c_tag] = camera
return sortList(bugged_cameras)
return sort_list(bugged_cameras)
/obj/item/camera_bug/proc/menu(list/cameras)
@@ -59,7 +59,7 @@
return ..()
/obj/item/dogborg/sleeper/Exit(atom/movable/O)
return 0
return FALSE
/obj/item/dogborg/sleeper/proc/get_host()
if(!loc)
@@ -13,7 +13,7 @@
/obj/item/electroadaptive_pseudocircuit/Initialize(mapload)
. = ..()
maptext = "[circuits]"
maptext = MAPTEXT("[circuits]")
/obj/item/electroadaptive_pseudocircuit/examine(mob/user)
. = ..()
@@ -40,7 +40,7 @@
playsound(R, 'sound/items/rped.ogg', 50, TRUE)
recharging = TRUE
circuits--
maptext = "[circuits]"
maptext = MAPTEXT("[circuits]")
icon_state = "[initial(icon_state)]_recharging"
var/recharge_time = min(600, circuit_cost * 5) //40W of cost for one fabrication = 20 seconds of recharge time; this is to prevent spamming
addtimer(CALLBACK(src, PROC_REF(recharge)), recharge_time)
@@ -53,7 +53,7 @@
if(!is_type_in_typecache(target, recycleable_circuits))
return
circuits++
maptext = "[circuits]"
maptext = MAPTEXT("[circuits]")
user.visible_message("<span class='notice'>User breaks down [target] with [src].</span>", \
"<span class='notice'>You recycle [target] into [src]. It now has material for <b>[circuits]</b> circuits.</span>")
playsound(user, 'sound/items/deconstruct.ogg', 50, TRUE)
@@ -40,7 +40,7 @@
playsound(src, on ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, TRUE)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
A.UpdateButtons()
return TRUE
/obj/item/flashlight/DoRevenantThrowEffects(atom/target)
+1 -1
View File
@@ -86,7 +86,7 @@
// I assume it's faster to color,tag and OR the turf in, rather
// then checking if its there
T.color = RANDOM_COLOUR
T.maptext = "[T.x],[T.y],[T.z]"
T.maptext = MAPTEXT("[T.x],[T.y],[T.z]")
tagged |= T
/obj/item/gps/visible_debug/proc/clear()
@@ -170,7 +170,7 @@
/obj/item/lightreplacer/proc/Use(mob/user)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
AddUses(-1)
return 1
return TRUE
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
@@ -239,9 +239,9 @@
/obj/item/lightreplacer/proc/CanUse(mob/living/user)
src.add_fingerprint(user)
if(uses > 0)
return 1
return TRUE
else
return 0
return FALSE
/obj/item/lightreplacer/afterattack(atom/T, mob/U, proximity)
. = ..()
+2 -2
View File
@@ -236,11 +236,11 @@
/datum/action/item_action/toggle_multitool/Trigger()
if(!..())
return 0
return FALSE
if(target)
var/obj/item/multitool/ai_detect/M = target
M.toggle_hud(owner)
return 1
return TRUE
/obj/item/multitool/cyborg
name = "multitool"
+1 -1
View File
@@ -973,7 +973,7 @@ GENETICS SCANNER
for(var/A in buffer)
options += get_display_name(A)
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sort_list(options)
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
@@ -217,7 +217,7 @@ effective or pretty fucking useless.
/obj/item/shadowcloak/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == ITEM_SLOT_BELT)
return 1
return TRUE
/obj/item/shadowcloak/proc/Activate(mob/living/carbon/human/user)
if(!user)
+3 -1
View File
@@ -168,7 +168,9 @@
diceroll(user)
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
diceroll(thrownby)
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
diceroll(thrown_by)
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
+1 -1
View File
@@ -209,7 +209,7 @@
/obj/item/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
to_chat(user, "<span class='warning'>You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!</span>")
return 1
return TRUE
/obj/item/dualsaber/process()
if(wielded)
+3 -3
View File
@@ -119,7 +119,7 @@
if(reagents.total_volume == reagents.maximum_volume)
to_chat(user, "<span class='warning'>\The [src] is already full!</span>")
safety = safety_save
return 1
return TRUE
var/obj/structure/reagent_dispensers/W = target //will it work?
var/transferred = W.reagents.trans_to(src, max_water)
if(transferred > 0)
@@ -130,9 +130,9 @@
else
to_chat(user, "<span class='warning'>\The [W] is empty!</span>")
safety = safety_save
return 1
return TRUE
else
return 0
return FALSE
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
. = ..()
+4 -4
View File
@@ -129,12 +129,12 @@
/datum/action/innate/drink_fling/Activate()
button_icon_state = "drinkfling_on"
active = TRUE
UpdateButtonIcon()
UpdateButtons()
/datum/action/innate/drink_fling/Deactivate()
button_icon_state = "drinkfling_off"
active = FALSE
UpdateButtonIcon()
UpdateButtons()
/obj/item/book/granter/action/origami
granted_action = /datum/action/innate/origami
@@ -155,13 +155,13 @@
to_chat(owner, "<span class='notice'>You will now fold origami planes.</span>")
button_icon_state = "origami_on"
active = TRUE
UpdateButtonIcon()
UpdateButtons()
/datum/action/innate/origami/Deactivate()
to_chat(owner, "<span class='notice'>You will no longer fold origami planes.</span>")
button_icon_state = "origami_off"
active = FALSE
UpdateButtonIcon()
UpdateButtons()
///SPELLS///
+1 -1
View File
@@ -260,7 +260,7 @@
display_names[initial(rodtype.name)] = rodtype
nullrod_icons += list(initial(rodtype.name) = image(icon = initial(rodtype.icon), icon_state = initial(rodtype.icon_state)))
nullrod_icons = sortList(nullrod_icons)
nullrod_icons = sort_list(nullrod_icons)
var/choice = show_radial_menu(L, src , nullrod_icons, custom_check = CALLBACK(src, PROC_REF(check_menu), L), radius = 42, require_near = TRUE)
if(!choice || !check_menu(L))
+3 -3
View File
@@ -38,8 +38,8 @@
//What does the implant do upon injection?
//return 1 if the implant injects
//return 0 if there is no room for implant / it fails
//return TRUE if the implant injects
//return FALSE if there is no room for implant / it fails
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
if(SEND_SIGNAL(src, COMSIG_IMPLANT_IMPLANTING, args) & COMPONENT_STOP_IMPLANTING)
return
@@ -99,7 +99,7 @@
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
return TRUE
/obj/item/implant/Destroy()
if(imp_in)
@@ -59,7 +59,7 @@
/obj/item/implant/chem/activate(cause)
. = ..()
if(!cause || !imp_in)
return 0
return FALSE
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
@@ -48,7 +48,7 @@
imp_e.weak += weak
imp_e.delay += delay
qdel(src)
return 1
return TRUE
return ..()
@@ -64,8 +64,8 @@
L.sec_hud_set_implants()
if(target.stat != DEAD && !silent)
to_chat(target, "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>")
return 1
return 0
return TRUE
return FALSE
/obj/item/implanter/mindshield
name = "implanter (mindshield)"
@@ -158,11 +158,11 @@
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
if(!istype(H))
return 0
return FALSE
H.set_species(/datum/species/human, 1)//lizards go home
purrbation_remove(H)//remove cats
H.dna.remove_all_mutations()//hulks out
return 1
return TRUE
/obj/machinery/implantchair/brainwash
+5 -4
View File
@@ -289,10 +289,11 @@
"<span class='userdanger'>[M] has been splashed with something!</span>")
var/turf/TT = get_turf(hit_atom)
var/throwerstring
if(thrownby)
log_combat(thrownby, M, "splashed", R)
var/turf/AT = get_turf(thrownby)
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
var/mob/thrown_by = thrownby?.resolve()
if(thrown_by)
log_combat(thrown_by, M, "splashed", R)
var/turf/AT = get_turf(thrown_by)
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
reagents.reaction(hit_atom, TOUCH)
reagents.clear_reagents()
+2 -2
View File
@@ -25,7 +25,7 @@
AI.hack_software = TRUE
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
qdel(src)
@@ -46,7 +46,7 @@
AI.eyeobj.relay_speech = TRUE
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
qdel(src)
+4 -5
View File
@@ -59,8 +59,8 @@
if(src.l_leg && src.r_leg)
if(src.chest && src.head)
SSblackbox.record_feedback("amount", "cyborg_frames_built", 1)
return 1
return 0
return TRUE
return FALSE
/obj/item/robot_suit/wrench_act(mob/living/user, obj/item/I) //Deconstucts empty borg shell. Flashes remain unbroken because they haven't been used yet
var/turf/T = get_turf(src)
@@ -292,9 +292,7 @@
if(M.laws.id == DEFAULT_AI_LAWID)
O.make_laws()
SSticker.mode.remove_antag_for_borging(BM.mind)
if(!istype(M.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(BM, TRUE)
BM.mind.remove_antags_for_borging()
BM.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
@@ -312,6 +310,7 @@
qdel(O.mmi)
O.mmi = W //and give the real mmi to the borg.
O.updatename()
playsound(O.loc, 'sound/voice/liveagain.ogg', 75, TRUE)
SSblackbox.record_feedback("amount", "cyborg_birth", 1)
forceMove(O)
O.robot_suit = src
+14 -16
View File
@@ -8,32 +8,29 @@
icon_state = "cyborg_upgrade"
w_class = WEIGHT_CLASS_SMALL
var/locked = FALSE
var/installed = 0
var/require_module = 0
var/list/module_type
var/installed = FALSE
var/require_module = FALSE
var/list/module_type = null
/// Bitflags listing module compatibility. Used in the exosuit fabricator for creating sub-categories.
var/module_flags = NONE
// if true, is not stored in the robot to be ejected
// if module is reset
var/one_use = FALSE
/// Means this is a basetype and should not be used
var/abstract_type = /obj/item/borg/upgrade
/// Show the amount of this module that is installed
var/show_amount = FALSE
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
if(R.stat == DEAD)
to_chat(user, "<span class='warning'>[src] will not function on a deceased cyborg.</span>")
to_chat(user, span_warning("[src] will not function on a deceased cyborg!"))
return FALSE
if(module_type && !is_type_in_list(R.module, module_type))
to_chat(R, "<span class='alert'>Upgrade mounting error! No suitable hardpoint detected.</span>")
to_chat(user, "<span class='warning'>There's no mounting point for the module!</span>")
to_chat(R, span_alert("Upgrade mounting error! No suitable hardpoint detected."))
to_chat(user, span_warning("There's no mounting point for the module!"))
return FALSE
return TRUE
/*
This proc gets called by upgrades after installing them. Use this for things that for example need to be moved into a specific borg item,
as performing this in action() will cause the upgrade to end up in the borg instead of its intended location due to forceMove() being called afterwards..
*/
/obj/item/borg/upgrade/proc/afterInstall(mob/living/silicon/robot/R, user = usr)
return
/obj/item/borg/upgrade/proc/deactivate(mob/living/silicon/robot/R, user = usr)
if (!(src in R.upgrades))
return FALSE
@@ -324,12 +321,12 @@ as performing this in action() will cause the upgrade to end up in the borg inst
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
ADD_TRAIT(src, TRAIT_LAVA_IMMUNE, type)
ADD_TRAIT(R, TRAIT_LAVA_IMMUNE, type)
/obj/item/borg/upgrade/lavaproof/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
REMOVE_TRAIT(src, TRAIT_LAVA_IMMUNE, type)
REMOVE_TRAIT(R, TRAIT_LAVA_IMMUNE, type)
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
@@ -440,6 +437,7 @@ as performing this in action() will cause the upgrade to end up in the borg inst
/obj/item/robot_module/syndicate_medical)
var/list/additional_reagents = list()
module_flags = BORG_MODULE_MEDICAL
abstract_type = /obj/item/borg/upgrade/hypospray
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -721,6 +719,6 @@ as performing this in action() will cause the upgrade to end up in the borg inst
user.vtec = initial(user.vtec) - maxReduction * 1
action.button_icon_state = "Chevron_State_[currentState]"
action.UpdateButtonIcon()
action.UpdateButtons()
return TRUE
+1 -1
View File
@@ -33,7 +33,7 @@
if (usr.stat || usr.restrained() || src.loc != usr)
return
if (!ishuman(usr))
return 1
return TRUE
var/mob/living/carbon/human/H = usr
if(H.is_holding(src))
H.set_machine(src)
+1 -1
View File
@@ -24,7 +24,7 @@
pixel_y = rand(-5, 5)
/obj/item/stack/ore/bluespace_crystal/get_part_rating()
return 1
return TRUE
/obj/item/stack/ore/bluespace_crystal/attack_self(mob/user)
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
+4 -2
View File
@@ -216,7 +216,8 @@
/obj/item/stack/medical/gauze/cyborg
custom_materials = null
is_cyborg = 1
is_cyborg = TRUE
source = /datum/robot_energy_storage/medical
cost = 250
/obj/item/stack/medical/suture
@@ -440,7 +441,8 @@
/obj/item/stack/medical/bone_gel/cyborg
custom_materials = null
is_cyborg = 1
is_cyborg = TRUE
source = /datum/robot_energy_storage/medical
cost = 250
/obj/item/stack/medical/aloe
+4 -7
View File
@@ -39,7 +39,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
/obj/item/stack/rods/update_icon_state()
var/amount = get_amount()
if(amount <= 5)
if(amount <= 5 && amount >= 1)
icon_state = "rods-[amount]"
else
icon_state = "rods"
@@ -76,12 +76,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
/obj/item/stack/rods/cyborg
custom_materials = null
is_cyborg = 1
cost = 250
/obj/item/stack/rods/cyborg/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
is_cyborg = TRUE
source = /datum/robot_energy_storage/medical
cost = MINERAL_MATERIAL_AMOUNT * 0.125
/obj/item/stack/rods/ten
amount = 10
+15 -5
View File
@@ -51,8 +51,9 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
/obj/item/stack/sheet/glass/cyborg
custom_materials = null
is_cyborg = 1
cost = 500
is_cyborg = TRUE
source = /datum/robot_energy_storage/glass
cost = MINERAL_MATERIAL_AMOUNT * 0.25
/obj/item/stack/sheet/glass/fifty
amount = 50
@@ -178,9 +179,16 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
/obj/item/stack/sheet/rglass/cyborg
custom_materials = null
var/datum/robot_energy_storage/glasource
var/metcost = 250
var/glacost = 500
is_cyborg = TRUE
source = /datum/robot_energy_storage/metal
var/datum/robot_energy_storage/glasource = /datum/robot_energy_storage/glass
var/metcost = MINERAL_MATERIAL_AMOUNT * 0.125
var/glacost = MINERAL_MATERIAL_AMOUNT * 0.25
/obj/item/stack/sheet/rglass/cyborg/prepare_estorage(obj/item/robot_module/module)
. = ..()
if(glasource)
glasource = module.get_or_create_estorage(glasource)
/obj/item/stack/sheet/rglass/cyborg/get_amount()
return min(round(source.energy / metcost), round(glasource.energy / glacost))
@@ -188,10 +196,12 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
/obj/item/stack/sheet/rglass/cyborg/use(used, transfer = FALSE) // Requires special checks, because it uses two storages
source.use_charge(used * metcost)
glasource.use_charge(used * glacost)
update_icon()
/obj/item/stack/sheet/rglass/cyborg/add(amount)
source.add_charge(amount * metcost)
glasource.add_charge(amount * glacost)
update_icon()
/obj/item/stack/sheet/rglass/get_main_recipes()
. = ..()
@@ -163,8 +163,9 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
/obj/item/stack/sheet/metal/cyborg
custom_materials = null
is_cyborg = 1
cost = 500
is_cyborg = TRUE
source = /datum/robot_energy_storage/metal
cost = MINERAL_MATERIAL_AMOUNT * 0.25
/obj/item/stack/sheet/metal/get_main_recipes()
. = ..()
@@ -178,7 +179,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
* Plasteel
*/
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("AI core", /obj/structure/ai_core, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
new/datum/stack_recipe("plasteel keg", /obj/structure/custom_keg, 10, time = 50), \
new/datum/stack_recipe("micro powered fan assembly", /obj/machinery/fan_assembly, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
+92 -6
View File
@@ -42,6 +42,12 @@
var/matter_amount = 0
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
if(is_cyborg)
if(!istype(loc, /obj/item/robot_module))
stack_trace("Cyborg stack created outside of a robot module, deleting.")
return INITIALIZE_HINT_QDEL
prepare_estorage(loc)
if(new_amount != null)
amount = new_amount
while(amount > max_amount)
@@ -132,6 +138,19 @@
else
icon_state = "[initial(icon_state)]_3"
/obj/item/stack/update_overlays()
. = ..()
if(isturf(loc))
return
var/atom/movable/screen/storage/item_holder/holder = locate(/atom/movable/screen/storage/item_holder) in vis_locs
if(holder?.master && istype(holder.master, /datum/component/storage/concrete))
var/datum/component/storage/concrete/storage = holder.master
if(storage.display_numerical_stacking)
return // It's being handled by the storage we're in, forget about it.
var/mutable_appearance/number = mutable_appearance(appearance_flags = APPEARANCE_UI_IGNORE_ALPHA)
number.maptext = MAPTEXT(get_amount())
. += number
/obj/item/stack/examine(mob/user)
. = ..()
if (is_cyborg)
@@ -151,6 +170,14 @@
. += "There is [get_amount()] in the stack."
. += "<span class='notice'>Alt-click to take a custom amount.</span>"
/obj/item/stack/equipped(mob/user, slot)
. = ..()
update_icon()
/obj/item/stack/dropped(mob/user, slot)
. = ..()
update_icon()
/obj/item/stack/proc/get_amount()
if(is_cyborg)
. = round(source?.energy / cost)
@@ -358,11 +385,13 @@
return FALSE
return TRUE
/obj/item/stack/use(used, transfer = FALSE, check = TRUE) // return 0 = borked; return 1 = had enough
/obj/item/stack/use(used, transfer = FALSE, check = TRUE) // return FALSE = borked; return TRUE = had enough
if(check && zero_amount())
return FALSE
if (is_cyborg)
return source.use_charge(used * cost)
. = source.use_charge(used * cost)
update_icon()
return
if (amount < used)
return FALSE
amount -= used
@@ -465,9 +494,53 @@
return
//get amount from user
var/max = get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
max = get_amount()
stackmaterial = min(max, stackmaterial)
var/list/quick_split
for(var/option in list(2, 3, 4, 5, 6, 7, "One", "Five", "Ten", "Custom"))
var/mutable_appearance/option_display = new(src)
option_display.filters = null
option_display.cut_overlays()
option_display.pixel_x = 0
option_display.pixel_y = 0
switch(option)
if("Custom")
var/list/sort_numbers = quick_split
sort_numbers = sort_list(sort_numbers, /proc/cmp_numeric_text_desc)
option_display.maptext = MAPTEXT("?")
quick_split = list("Custom" = option_display)
quick_split += sort_numbers
if("One")
option = 1
option_display.maptext = MAPTEXT("1")
if("Five")
if(max > 5)
option = 5
option_display.maptext = MAPTEXT("5")
else
continue
if("Ten")
if(max > 10)
option = 10
option_display.maptext = MAPTEXT("10")
else
continue
else
if(max % option == 0)
option_display.maptext = MAPTEXT(max / option)
option = max / option
else
continue
if(option != "Custom")
LAZYSET(quick_split, "[option]", option_display)
var/stackmaterial
if(length(quick_split) <= 2)
stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack?\nMax: [max]") as null|num)
else
stackmaterial = show_radial_menu(user, get_atom_on_turf(src), quick_split, require_near = TRUE, tooltips = TRUE)
if(stackmaterial == "Custom")
stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack?\nMax: [max]") as null|num)
stackmaterial = isnum(stackmaterial) ? stackmaterial : text2num(stackmaterial)
stackmaterial = min(get_amount(), stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE)) //, !iscyborg(user)
return
split_stack(user, stackmaterial)
@@ -491,7 +564,11 @@
F.forceMove(user.drop_location())
add_fingerprint(user)
F.add_fingerprint(user)
zero_amount()
if(!zero_amount())
var/atom/movable/screen/storage/item_holder/holder = locate(/atom/movable/screen/storage/item_holder) in vis_locs
if(holder?.master && istype(holder.master, /datum/component/storage/concrete))
var/datum/component/storage/concrete/storage = holder.master
storage.refresh_mob_views()
/obj/item/stack/attackby(obj/item/W, mob/user, params)
if(can_merge(W))
@@ -514,3 +591,12 @@
/obj/item/stack/microwave_act(obj/machinery/microwave/M)
if(istype(M) && M.dirty < 100)
M.dirty += amount
/obj/item/stack/proc/prepare_estorage(obj/item/robot_module/module)
if(source)
source = module.get_or_create_estorage(source)
/obj/item/stack/Moved(old_loc, dir)
. = ..()
if(isturf(loc))
update_icon()
+1 -1
View File
@@ -11,7 +11,7 @@
. = ..()
update_icon()
/obj/item/stack/arcadeticket/update_icon()
/obj/item/stack/arcadeticket/update_icon_state()
var/amount = get_amount()
if((amount >= 12) && (amount > 0))
icon_state = "arcade-ticket_4"
@@ -535,8 +535,9 @@
/obj/item/stack/tile/plasteel/cyborg
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
is_cyborg = 1
cost = 125
is_cyborg = TRUE
source = /datum/robot_energy_storage/metal
cost = MINERAL_MATERIAL_AMOUNT * 0.0625
/obj/item/stack/tile/material
name = "floor tile"
+10 -4
View File
@@ -40,6 +40,12 @@
resistance_flags = FLAMMABLE
grind_results = list(/datum/reagent/cellulose = 5)
/obj/item/stack/packageWrap/cyborg
custom_materials = null
is_cyborg = TRUE
source = /datum/robot_energy_storage/wrapping_paper
cost = 1
/obj/item/stack/packageWrap/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins wrapping [user.p_them()]self in \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(use(3))
@@ -53,16 +59,16 @@
return SHAME
/obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package
return 1
return TRUE
/obj/item/storage/can_be_package_wrapped()
return 0
return FALSE
/obj/item/storage/box/can_be_package_wrapped()
return 1
return TRUE
/obj/item/smallDelivery/can_be_package_wrapped()
return 0
return FALSE
/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)
. = ..()
+3 -3
View File
@@ -25,7 +25,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
var/obj/item/storage/book/bible/B = locate() in src
if(is_holding(B))
return B
return 0
return FALSE
/obj/item/storage/book/bible
name = "bible"
@@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
var/obj/item/bodypart/BP = X
if(BP.is_robotic_limb())
to_chat(user, "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>")
return 0
return FALSE
var/heal_amt = 5
var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1)
@@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
to_chat(H, "<span class='boldnotice'>May the power of [deity_name] compel you to be healed!</span>")
playsound(src.loc, "punch", 25, 1, -1)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing)
return 1
return TRUE
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1, heal_mode = TRUE)
+2 -2
View File
@@ -73,7 +73,7 @@
/obj/item/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/packageWrap))
return 0
return FALSE
return ..()
//Disk boxes
@@ -886,7 +886,7 @@
/obj/item/storage/box/papersack/Initialize(mapload)
. = ..()
papersack_designs = sortList(list(
papersack_designs = sort_list(list(
"None" = image(icon = src.icon, icon_state = "paperbag_None"),
"NanotrasenStandard" = image(icon = src.icon, icon_state = "paperbag_NanotrasenStandard"),
"SyndiSnacks" = image(icon = src.icon, icon_state = "paperbag_SyndiSnacks"),
@@ -85,10 +85,10 @@
new /obj/item/implanter/stealth(src)
if("hacker") // 30 tc
new /obj/item/aiModule/syndicate(src)
new /obj/item/ai_module/syndicate(src)
new /obj/item/card/emag(src)
new /obj/item/encryptionkey/binary(src)
new /obj/item/aiModule/toyAI(src)
new /obj/item/ai_module/toyAI(src)
new /obj/item/multitool/ai_detect(src)
new /obj/item/flashlight/emp(src)
new /obj/item/emagrecharge(src)
+8 -5
View File
@@ -61,9 +61,10 @@
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
..()
var/mob/thrown_by = thrownby?.resolve()
//Only mob/living types have stun handling
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
baton_stun(hit_atom, thrownby, shoving = TRUE)
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
baton_stun(hit_atom, thrown_by, shoving = TRUE)
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
preload_cell_type = /obj/item/stock_parts/cell/high/plus
@@ -387,8 +388,9 @@
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(turned_on)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrownby, shoving = TRUE)
var/mob/thrown_by = thrownby?.resolve()
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
baton_stun(hit_atom, thrown_by, shoving = TRUE)
if(thrownby && !caught)
throw_back()
else
@@ -397,8 +399,9 @@
/obj/item/melee/baton/boomerang/proc/throw_back()
set waitfor = FALSE
sleep(1)
var/mob/thrown_by = thrownby?.resolve()
if(!QDELETED(src))
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
/obj/item/melee/baton/boomerang/update_icon()
if(turned_on)
+2 -2
View File
@@ -431,7 +431,7 @@
src.rotation = rotation
// end animations
animate(atom, time = 0, flags = ANIMATION_END_NOW)
return 0
return FALSE
// grab source
var/rel_x = (destination.x - relative_to.x) * world.icon_size + src.dist * sin(src.angle)
@@ -458,7 +458,7 @@
/datum/summon_weapon/proc/Rotate(degrees, time, rotation)
. = time
if(!dist)
return 0
return FALSE
var/matrix/M = ConstructMatrix(angle + degrees, dist, rotation || src.rotation)
if(rotation)
src.rotation = rotation
+1 -1
View File
@@ -50,7 +50,7 @@
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
A.UpdateButtons()
/obj/item/tank/jetpack/proc/turn_on(mob/user)
on = TRUE
+4 -4
View File
@@ -247,19 +247,19 @@
air_contents.merge(giver)
check_status()
return 1
return TRUE
/obj/item/tank/assume_air_moles(datum/gas_mixture/giver, moles)
giver.transfer_to(air_contents, moles)
check_status()
return 1
return TRUE
/obj/item/tank/assume_air_ratio(datum/gas_mixture/giver, ratio)
giver.transfer_ratio_to(air_contents, ratio)
check_status()
return 1
return TRUE
/obj/item/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
@@ -281,7 +281,7 @@
//Handle exploding, leaking, and rupturing of the tank
if(!air_contents)
return 0
return FALSE
var/pressure = air_contents.return_pressure()
var/temperature = air_contents.return_temperature()
+3 -3
View File
@@ -26,7 +26,7 @@
/obj/item/watertank/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == user.getBackSlot())
return 1
return TRUE
/obj/item/watertank/proc/toggle_mister(mob/living/user)
if(!istype(user))
@@ -88,7 +88,7 @@
/obj/item/watertank/attackby(obj/item/W, mob/user, params)
if(W == noz)
remove_noz()
return 1
return TRUE
else
return ..()
@@ -349,7 +349,7 @@
/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == ITEM_SLOT_BACK)
return 1
return TRUE
/obj/item/reagent_containers/chemtank/proc/toggle_injection()
var/mob/living/carbon/human/user = usr
+2 -2
View File
@@ -212,8 +212,8 @@
if(get_fuel() <= 0 && welding)
switched_on(user)
update_icon()
return 0
return 1
return FALSE
return TRUE
//Switches the welder on
/obj/item/weldingtool/proc/switched_on(mob/user)
+3 -3
View File
@@ -160,10 +160,10 @@
if(istype(A, /obj/item/toy/ammo/gun))
if (src.bullets >= 7)
to_chat(user, "<span class='warning'>It's already fully loaded!</span>")
return 1
return TRUE
if (A.amount_left <= 0)
to_chat(user, "<span class='warning'>There are no more caps!</span>")
return 1
return TRUE
if (A.amount_left < (7 - src.bullets))
src.bullets += A.amount_left
to_chat(user, text("<span class='notice'>You reload [] cap\s.</span>", A.amount_left))
@@ -173,7 +173,7 @@
A.amount_left -= 7 - src.bullets
src.bullets = 7
A.update_icon()
return 1
return TRUE
else
return ..()
+9 -9
View File
@@ -23,12 +23,12 @@
//returns the damage value of the attack after processing the obj's various armor protections
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
if(damage_flag == MELEE && damage_amount < damage_deflection) // TODO: Refactor armor datums and types entirely jfc
return 0
return FALSE
switch(damage_type)
if(BRUTE)
if(BURN)
else
return 0
return FALSE
var/armor_protection = 0
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
@@ -107,8 +107,8 @@
else
playsound(src, 'sound/effects/bang.ogg', 50, 1)
take_damage(hulk_damage(), BRUTE, MELEE, 0, get_dir(src, user))
return 1
return 0
return TRUE
return FALSE
/obj/blob_act(obj/structure/blob/B)
if(isturf(loc))
@@ -135,7 +135,7 @@
return
if(!M.melee_damage_upper && !M.obj_damage)
M.emote("custom", message = "[M.friendly_verb_continuous] [src].")
return 0
return FALSE
else
var/play_soundeffect = 1
if(M.environment_smash)
@@ -187,7 +187,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
/obj/acid_act(acidpwr, acid_volume)
if(!(resistance_flags & UNACIDABLE) && acid_volume)
AddComponent(/datum/component/acid, acidpwr, acid_volume)
return 1
return TRUE
//called when the obj is destroyed by acid.
/obj/proc/acid_melt()
@@ -201,7 +201,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(acid)
return acid.level
else
return 0
return FALSE
//// FIRE
@@ -216,7 +216,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
resistance_flags |= ON_FIRE
SSfire_burning.processing[src] = src
update_icon()
return 1
return TRUE
//called when the obj is destroyed by fire
/obj/proc/burn()
@@ -232,7 +232,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
/obj/zap_act(power, zap_flags, shocked_targets)
if(QDELETED(src))
return 0
return FALSE
obj_flags |= BEING_SHOCKED
addtimer(CALLBACK(src, PROC_REF(reset_shocked)), 10)
return power / 2
+1 -1
View File
@@ -271,7 +271,7 @@
. = !density
/obj/proc/check_uplink_validity()
return 1
return TRUE
/obj/vv_get_dropdown()
. = ..()
+224 -102
View File
@@ -1,4 +1,6 @@
/obj/structure/AIcore
#define AI_CORE_BRAIN(X) X.braintype == "Android" ? "brain" : "MMI"
/obj/structure/ai_core
density = TRUE
anchored = FALSE
name = "\improper AI core"
@@ -8,28 +10,76 @@
max_integrity = 500
var/state = 0
var/datum/ai_laws/laws
var/obj/item/circuitboard/circuit = null
var/obj/item/mmi/brain = null
var/can_deconstruct = TRUE
var/obj/item/circuitboard/aicore/circuit = null
var/obj/item/mmi/core_mmi
/obj/structure/AIcore/Initialize(mapload)
/obj/structure/ai_core/Initialize(mapload)
. = ..()
laws = new
laws.set_laws_config()
/obj/structure/AIcore/Destroy()
if(circuit)
qdel(circuit)
/obj/structure/ai_core/examine(mob/user)
. = ..()
if(!anchored)
if(state != EMPTY_CORE)
. += span_notice("It has some <b>bolts</b> that could be tightened.")
else
. += span_notice("It has some <b>bolts</b> that could be tightened. The frame can be <b>melted</b> down.")
else
switch(state)
if(EMPTY_CORE)
. += span_notice("There is a <b>slot</b> for a circuit board, its <b>bolts</b> can be loosened.")
if(CIRCUIT_CORE)
. += span_notice("The circuit board can be <b>screwed</b> into place or <b>pried</b> out.")
if(SCREWED_CORE)
. += span_notice("The frame can be <b>wired</b>, the circuit board can be <b>unfastened</b>.")
if(CABLED_CORE)
if(!core_mmi)
. += span_notice("There are wires which could be hooked up to an <b>MMI or positronic brain</b>, or <b>cut</b>.")
else
var/accept_laws = TRUE
if(core_mmi.laws.id != DEFAULT_AI_LAWID || !core_mmi.brainmob || !core_mmi.brainmob?.mind)
accept_laws = FALSE
. += span_notice("There is a <b>slot</b> for a reinforced glass panel, the [AI_CORE_BRAIN(core_mmi)] could be <b>pried</b> out.[accept_laws ? " A law module can be <b>swiped</b> across." : ""]")
if(GLASS_CORE)
. += span_notice("The monitor [core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? "and neural interface " : ""]can be <b>screwed</b> in, the panel can be <b>pried</b> out.")
if(AI_READY_CORE)
. += span_notice("The monitor's connection can be <b>cut</b>[core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? " the neural interface can be <b>screwed</b> in." : "."]")
/obj/structure/ai_core/handle_atom_del(atom/A)
if(A == circuit)
circuit = null
if(brain)
qdel(brain)
brain = null
if((state != GLASS_CORE) && (state != AI_READY_CORE))
state = EMPTY_CORE
update_appearance()
if(A == core_mmi)
core_mmi = null
return ..()
/obj/structure/AIcore/latejoin_inactive
name = "Networked AI core"
/obj/structure/ai_core/Destroy()
QDEL_NULL(circuit)
QDEL_NULL(core_mmi)
QDEL_NULL(laws)
return ..()
/obj/structure/ai_core/deactivated
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
/obj/structure/ai_core/deactivated/Initialize(mapload, posibrain = FALSE)
. = ..()
circuit = new(src)
if(posibrain)
core_mmi = new/obj/item/mmi/posibrain(src)
else
core_mmi = new(src)
core_mmi.brain = new(core_mmi)
core_mmi.update_appearance()
/obj/structure/ai_core/latejoin_inactive
name = "networked AI core"
desc = "This AI core is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
can_deconstruct = FALSE
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
@@ -37,11 +87,24 @@
var/safety_checks = TRUE
var/active = TRUE
/obj/structure/AIcore/latejoin_inactive/examine(mob/user)
/obj/structure/ai_core/latejoin_inactive/Initialize(mapload)
. = ..()
. += "Its transmitter seems to be [active? "on" : "off"]."
circuit = new(src)
core_mmi = new(src)
core_mmi.brain = new(core_mmi)
core_mmi.update_appearance()
GLOB.latejoin_ai_cores += src
/obj/structure/AIcore/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
/obj/structure/ai_core/latejoin_inactive/Destroy()
GLOB.latejoin_ai_cores -= src
return ..()
/obj/structure/ai_core/latejoin_inactive/examine(mob/user)
. = ..()
. += "Its transmitter seems to be <b>[active? "on" : "off"]</b>."
. += span_notice("You could [active? "deactivate" : "activate"] it with a multitool.")
/obj/structure/ai_core/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
if(!available)
return FALSE
if(!safety_checks)
@@ -56,42 +119,61 @@
return FALSE
if(!SSmapping.level_trait(T.z,ZTRAIT_STATION))
return FALSE
if(!istype(T, /turf/open/floor))
if(!isfloorturf(T))
return FALSE
return TRUE
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
/obj/structure/ai_core/latejoin_inactive/attackby(obj/item/P, mob/user, params)
if(P.tool_behaviour == TOOL_MULTITOOL)
active = !active
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
return
return ..()
/obj/structure/AIcore/latejoin_inactive/Initialize(mapload)
/obj/structure/ai_core/wrench_act(mob/living/user, obj/item/tool)
. = ..()
GLOB.latejoin_ai_cores += src
default_unfasten_wrench(user, tool)
return TRUE
/obj/structure/AIcore/latejoin_inactive/Destroy()
GLOB.latejoin_ai_cores -= src
return ..()
/obj/structure/ai_core/screwdriver_act(mob/living/user, obj/item/tool)
. = ..()
if(state == AI_READY_CORE)
if(!core_mmi)
balloon_alert(user, "no brain installed!")
return TRUE
else if(!core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
balloon_alert(user, "brain is inactive!")
return TRUE
else
balloon_alert(user, "connecting neural network...")
if(!tool.use_tool(src, user, 10 SECONDS))
return TRUE
if(!ai_structure_to_mob())
return TRUE
balloon_alert(user, "connected neural network")
return TRUE
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(P.tool_behaviour == TOOL_WRENCH)
return default_unfasten_wrench(user, P, 20)
/obj/structure/ai_core/attackby(obj/item/P, mob/user, params)
if(!anchored)
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
if(P.tool_behaviour == TOOL_WELDER)
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
balloon_alert(user, "core must be empty to deconstruct it!")
return
if(!P.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
balloon_alert(user, "deconstructing frame...")
if(P.use_tool(src, user, 20, volume=50) && state == EMPTY_CORE)
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
balloon_alert(user, "deconstructed frame")
deconstruct(TRUE)
return
else
if(user.a_intent != INTENT_HARM)
balloon_alert(user, "bolt it down first!")
return
else
return ..()
else
switch(state)
if(EMPTY_CORE)
@@ -99,7 +181,7 @@
if(!user.transferItemToLoc(P, src))
return
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
balloon_alert(user, "circuit board inserted")
update_icon()
state = CIRCUIT_CORE
circuit = P
@@ -107,13 +189,13 @@
if(CIRCUIT_CORE)
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
balloon_alert(user, "board screwed into place")
state = SCREWED_CORE
update_icon()
return
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
balloon_alert(user, "circuit board removed")
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
@@ -122,7 +204,7 @@
if(SCREWED_CORE)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
balloon_alert(user, "circuit board unfastened")
state = CIRCUIT_CORE
update_icon()
return
@@ -130,61 +212,73 @@
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use_tool(src, user, 0, 5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
balloon_alert(user, "adding cables to frame...")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
balloon_alert(user, "added cables to frame.")
state = CABLED_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
balloon_alert(user, "need five lengths of cable!")
return
if(CABLED_CORE)
if(P.tool_behaviour == TOOL_WIRECUTTER)
if(brain)
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
if(core_mmi)
balloon_alert(user, "remove the [AI_CORE_BRAIN(core_mmi)] first!")
else
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
balloon_alert(user, "cables removed")
state = SCREWED_CORE
update_icon()
new /obj/item/stack/cable_coil(drop_location(), 5)
return
if(istype(P, /obj/item/stack/sheet/rglass))
if(!core_mmi)
balloon_alert(user, "add a brain first!")
return
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
balloon_alert(user, "adding glass panel...")
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
balloon_alert(user, "added glass panel")
state = GLASS_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
balloon_alert(user, "need two sheets of reinforced glass!")
return
if(istype(P, /obj/item/aiModule))
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
if(istype(P, /obj/item/ai_module))
if(!core_mmi)
balloon_alert(user, "no brain installed!")
return
var/obj/item/aiModule/module = P
if(!core_mmi.brainmob || !core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] is inactive!")
return
if(core_mmi.laws.id != DEFAULT_AI_LAWID)
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] already has set laws!")
return
var/obj/item/ai_module/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/mmi) && !brain)
if(istype(P, /obj/item/mmi) && !core_mmi)
var/obj/item/mmi/M = P
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(!M.brain_check(user))
var/install = tgui_alert(user, "This [AI_CORE_BRAIN(M)] is inactive, would you like to make an inactive AI?", "Installing AI [AI_CORE_BRAIN(M)]", list("Yes", "No"))
if(install != "Yes")
return
if(M.brainmob?.suiciding)
to_chat(user, span_warning("[M.name] is completely useless!"))
return
if(!user.transferItemToLoc(M, src))
return
core_mmi = M
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
update_appearance()
if(!M.brainmob.client)
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
return
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(M.brainmob, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
var/mob/living/brain/B = M.brainmob
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(B, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
if(!QDELETED(M))
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
return
@@ -196,47 +290,36 @@
if(!user.transferItemToLoc(M,src))
return
brain = M
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
core_mmi = M
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
update_icon()
return
if(P.tool_behaviour == TOOL_CROWBAR && brain)
if(P.tool_behaviour == TOOL_CROWBAR && core_mmi)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.forceMove(loc)
brain = null
balloon_alert(user, "removed [AI_CORE_BRAIN(core_mmi)]")
core_mmi.forceMove(loc)
core_mmi = null
update_icon()
return
if(GLASS_CORE)
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
balloon_alert(user, "removed glass panel")
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(P.tool_behaviour == TOOL_SCREWDRIVER)
if(core_mmi?.brainmob?.suiciding)
to_chat(user, span_warning("The brain installed is completely useless."))
return
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(brain)
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(brain.brainmob, TRUE)
var/mob/living/silicon/ai/A = null
if (brain.overrides_aicore_laws)
A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
else
A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
SSblackbox.record_feedback("amount", "ais_created", 1)
qdel(src)
balloon_alert(user, "connected monitor[core_mmi?.brainmob?.mind ? " and neural network" : ""]")
if(core_mmi.brainmob?.mind)
ai_structure_to_mob()
else
state = AI_READY_CORE
update_icon()
@@ -247,15 +330,39 @@
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(P.tool_behaviour == TOOL_SCREWDRIVER)
if(P.tool_behaviour == TOOL_WIRECUTTER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
balloon_alert(user, "disconnected monitor")
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon_state()
/obj/structure/ai_core/proc/ai_structure_to_mob()
var/mob/living/brain/the_brainmob = core_mmi.brainmob
if(!the_brainmob.mind || the_brainmob.suiciding)
return FALSE
the_brainmob.mind.remove_antags_for_borging()
if(!the_brainmob.mind.has_ever_been_ai)
SSblackbox.record_feedback("amount", "ais_created", 1)
var/mob/living/silicon/ai/ai_mob = null
if(core_mmi.overrides_aicore_laws)
ai_mob = new /mob/living/silicon/ai(loc, core_mmi.laws, the_brainmob)
core_mmi.laws = null //MMI's law datum is being donated, so we need the MMI to let it go or the GC will eat it
else
ai_mob = new /mob/living/silicon/ai(loc, laws, the_brainmob)
laws = null //we're giving the new AI this datum, so let's not delete it when we qdel(src) 5 lines from now
if(core_mmi.force_replace_ai_name)
ai_mob.fully_replace_character_name(ai_mob.name, core_mmi.replacement_ai_name())
if(core_mmi.braintype == "Android")
ai_mob.posibrain_inside = TRUE
deadchat_broadcast(" has been brought online at <b>[get_area_name(ai_mob, format_text = TRUE)]</b>.", span_name("[ai_mob]"), follow_target = ai_mob, message_type = DEADCHAT_ANNOUNCEMENT)
qdel(src)
return TRUE
/obj/structure/ai_core/update_icon_state()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
@@ -264,7 +371,7 @@
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
if(core_mmi)
icon_state = "3b"
else
icon_state = "3"
@@ -273,8 +380,8 @@
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == GLASS_CORE)
/obj/structure/ai_core/deconstruct(disassembled = TRUE)
if(state >= GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
@@ -284,13 +391,13 @@
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
/obj/structure/AIcore/deactivated
/obj/structure/ai_core/deactivated
name = "inactive AI"
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
/obj/structure/AIcore/deactivated/New()
/obj/structure/ai_core/deactivated/New()
..()
circuit = new(src)
@@ -307,23 +414,38 @@ That prevents a few funky behaviors.
if(istype(card))
if(card.flush)
to_chat(user, "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol.")
return 0
return 1
return FALSE
return TRUE
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
/obj/structure/ai_core/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(core_mmi && core_mmi.brainmob)
if(core_mmi.brainmob.mind)
to_chat(user, span_warning("[src] already contains an active mind!"))
return
else if(core_mmi.brainmob.suiciding)
to_chat(user, span_warning("[AI_CORE_BRAIN(core_mmi)] installed in [src] is completely useless!"))
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.control_disabled = FALSE
AI.radio_enabled = TRUE
AI.forceMove(loc) // to replace the terminal.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
to_chat(AI, span_notice("You have been uploaded to a stationary terminal. Remote device connection restored."))
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
AI.battery = circuit.battery
if(core_mmi.braintype == "Android")
AI.posibrain_inside = TRUE
else
AI.posibrain_inside = FALSE
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
to_chat(user, span_alert("There is no AI loaded on this terminal."))
/obj/item/circuitboard/aicore
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
#undef AI_CORE_BRAIN
@@ -48,7 +48,7 @@
unbuckle_mob(M)
add_fingerprint(user)
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user)
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || !user.cuff_resist_check() || M.buckled )
return
@@ -87,7 +87,7 @@
R.loaded = src
forceMove(R)
user.visible_message("[user] collects [src].", "<span class='notice'>You collect [src].</span>")
return 1
return TRUE
else
return ..()
@@ -95,9 +95,9 @@
. = ..()
if(over_object == usr && Adjacent(usr))
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
return 0
return FALSE
if(has_buckled_mobs())
return 0
return FALSE
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
usr.put_in_hands(B)
@@ -269,7 +269,7 @@
if(user in src)
return
if(src.tool_interact(W,user))
return 1 // No afterattack
return TRUE // No afterattack
else
return ..()
@@ -396,7 +396,7 @@
close()
else
O.forceMove(T)
return 1
return TRUE
/obj/structure/closet/relaymove(mob/living/user, direction)
if(user.stat || !isturf(loc))
@@ -46,8 +46,8 @@
/obj/structure/closet/body_bag/close()
if(..())
density = FALSE
return 1
return 0
return TRUE
return FALSE
/obj/structure/closet/body_bag/handle_lock_addition()
return
@@ -59,11 +59,11 @@
. = ..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
return FALSE
if(opened)
return 0
return FALSE
if(contents.len)
return 0
return FALSE
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
@@ -83,15 +83,15 @@
. = ..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
return FALSE
if(opened)
return 0
return FALSE
if(contents.len >= mob_storage_capacity / 2)
to_chat(usr, "<span class='warning'>There are too many things inside of [src] to fold it up!</span>")
return 0
return FALSE
for(var/obj/item/bodybag/bluespace/B in src)
to_chat(usr, "<span class='warning'>You can't recursively fold bluespace body bags!</span>" )
return 0
return FALSE
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
@@ -35,7 +35,7 @@
/obj/structure/closet/cardboard/open()
if(opened || !can_open())
return 0
return FALSE
var/list/alerted = null
if(egged < world.time)
var/mob/living/Snake = null
@@ -10,7 +10,7 @@
/obj/structure/closet/secure_closet/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < melee_min_damage)
return 0
return FALSE
. = ..()
// Exists to work around the minimum 700 cr price for goodies / small items / materials
@@ -34,7 +34,7 @@
qdel(src)
else
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it.
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return FALSE or just end it.
return ..() //Stops it from opening and turning invisible when items are used on it.
else
@@ -10,7 +10,7 @@
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 25)
return 0
return FALSE
. = ..()
/obj/structure/closet/crate/secure/update_overlays()
@@ -16,4 +16,4 @@
if(break_sound)
playsound(src, break_sound, 50, 1)
qdel(src)
return 1
return TRUE
@@ -753,7 +753,7 @@
/datum/action/toggle_dead_chat_mob/Trigger()
if(!..())
return 0
return FALSE
var/mob/M = target
if(HAS_TRAIT_FROM(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT))
REMOVE_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
+2 -2
View File
@@ -378,7 +378,7 @@
var/obj/item/stack/sheet/runed_metal/R = W
if(R.get_amount() < 1)
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
return 0
return FALSE
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
if(do_after(user, 50, target = src))
if(R.get_amount() < 1)
@@ -452,7 +452,7 @@
var/obj/item/stack/sheet/bronze/B = W
if(B.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two bronze sheets to build a bronze wall!</span>")
return 0
return FALSE
user.visible_message("<span class='notice'>[user] begins plating [src] with bronze...</span>", "<span class='notice'>You begin constructing a bronze wall...</span>")
if(do_after(user, 50, target = src))
if(B.get_amount() < 2)
+1 -1
View File
@@ -268,7 +268,7 @@
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
+3 -3
View File
@@ -22,12 +22,12 @@
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>[src] is out of water!</span>")
return 0
return FALSE
else
reagents.trans_to(mop, 5)
to_chat(user, "<span class='notice'>You wet [mop] in [src].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return 1
return TRUE
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
if(!user.transferItemToLoc(I, src))
@@ -110,7 +110,7 @@
if(!length(items))
return
items = sortList(items)
items = sort_list(items)
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, PROC_REF(check_menu), user), radius = 38, require_near = TRUE)
if(!pick)
return
@@ -97,7 +97,7 @@
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user, check_loc) //Don't want them getting put on the rack other than by spiking
return
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
@@ -43,7 +43,7 @@
. = ..()
STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user)
/obj/machinery/manned_turret/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
if(user.incapacitated() || !istype(user))
return
M.forceMove(get_turf(src))
@@ -80,7 +80,7 @@
return FALSE
var/client/C = controller.client
if(C)
var/atom/A = C.mouseObject
var/atom/A = C.mouse_object_ref?.resolve()
var/turf/T = get_turf(A)
if(istype(T)) //They're hovering over something in the map.
direction_track(controller, T)
+13 -2
View File
@@ -330,6 +330,17 @@ GLOBAL_LIST_EMPTY(crematoriums)
else
to_chat(user, "<span class='warning'>That's not connected to anything!</span>")
/obj/structure/tray/attackby(obj/P, mob/user, params)
if(!istype(P, /obj/item/riding_offhand))
return ..()
var/obj/item/riding_offhand/riding_item = P
var/mob/living/carried_mob = riding_item.rider
if(carried_mob == user) //Piggyback user.
return
user.unbuckle_mob(carried_mob)
MouseDrop_T(carried_mob, user)
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
@@ -369,9 +380,9 @@ GLOBAL_LIST_EMPTY(crematoriums)
if(.)
return
if(locate(/obj/structure/table) in get_turf(mover))
return 1
return TRUE
else
return 0
return FALSE
/obj/structure/tray/m_tray/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
. = !density
@@ -78,28 +78,28 @@
/mob/living/carbon/human/petrify(statue_timer)
if(!isturf(loc))
return 0
return FALSE
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of [name]"
bleedsuppress = 1
S.copy_overlays(src)
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
return 1
return TRUE
/mob/living/carbon/monkey/petrify(statue_timer)
if(!isturf(loc))
return 0
return FALSE
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of a monkey"
S.icon_state = "monkey"
return 1
return TRUE
/mob/living/simple_animal/pet/dog/corgi/petrify(statue_timer)
if(!isturf(loc))
return 0
return FALSE
var/obj/structure/statue/petrified/S = new (loc, src, statue_timer)
S.name = "statue of a corgi"
S.icon_state = "corgi"
S.desc = "If it takes forever, I will wait for you..."
return 1
return TRUE
+6 -6
View File
@@ -77,24 +77,24 @@
var/obj/structure/bed/B = A
if(istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
return 0
return FALSE
if(istype(A, /obj/structure/closet/cardboard))
var/obj/structure/closet/cardboard/C = A
if(C.move_delay)
return 0
return FALSE
if(ismecha(A))
return 0
return FALSE
else if(isliving(A)) // You Shall Not Pass!
var/mob/living/M = A
if(isbot(A)) //Bots understand the secrets
return 1
return TRUE
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return 1
return TRUE
if(!M.lying && !(SEND_SIGNAL(M, COMSIG_CHECK_VENTCRAWL)) && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return 0
return FALSE
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
+1 -1
View File
@@ -56,7 +56,7 @@
return ..(NORTH)
/obj/structure/reflector/proc/dir_map_to_angle(dir)
return 0
return FALSE
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
var/pdir = P.dir
+5 -5
View File
@@ -25,7 +25,7 @@
/obj/structure/spirit_board/proc/spirit_board_pick_letter(mob/M)
if(!spirit_board_checks(M))
return 0
return FALSE
if(virgin)
virgin = 0
@@ -48,7 +48,7 @@
bonus = 10 //Give some other people a chance, hog.
if(next_use - bonus > world.time )
return 0 //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
return FALSE //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
//lighting check
var/light_amount = 0
@@ -58,7 +58,7 @@
if(light_amount > 0.2)
to_chat(M, "<span class='warning'>It's too bright here to use [src.name]!</span>")
return 0
return FALSE
//mobs in range check
var/users_in_range = 0
@@ -71,6 +71,6 @@
if(users_in_range < 2)
to_chat(M, "<span class='warning'>There aren't enough people to use the [src.name]!</span>")
return 0
return FALSE
return 1
return TRUE
+33 -9
View File
@@ -124,11 +124,11 @@
. = . || (caller.pass_flags & PASSTABLE)
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.set_resting(TRUE, FALSE)
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
log_combat(user, pushed_mob, "placed")
pushed_mob.forceMove(loc)
pushed_mob.set_resting(TRUE, TRUE)
pushed_mob.visible_message(span_notice("[user] places [pushed_mob] onto [src]."), \
span_notice("[user] places [pushed_mob] onto [src]."))
log_combat(user, pushed_mob, "places", null, "onto [src]")
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
@@ -205,6 +205,30 @@
return
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(istype(I, /obj/item/riding_offhand))
var/obj/item/riding_offhand/riding_item = I
var/mob/living/carried_mob = riding_item.rider
if(carried_mob == user) //Piggyback user.
return
if(user.a_intent == INTENT_HARM)
user.unbuckle_mob(carried_mob)
tablelimbsmash(user, carried_mob)
else
var/tableplace_delay = 3.5 SECONDS
var/skills_space = ""
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
tableplace_delay = 2 SECONDS
skills_space = " expertly"
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
tableplace_delay = 2.75 SECONDS
skills_space = " quickly"
carried_mob.visible_message(span_notice("[user] begins to[skills_space] place [carried_mob] onto [src]..."),
span_userdanger("[user] begins to[skills_space] place [carried_mob] onto [src]..."))
if(do_after(user, tableplace_delay, target = carried_mob))
user.unbuckle_mob(carried_mob)
tableplace(user, carried_mob)
return TRUE
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
if(user.transferItemToLoc(I, drop_location()))
var/list/click_params = params2list(params)
@@ -717,11 +741,11 @@
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
return 1
return TRUE
if(istype(mover) && (mover.pass_flags & PASSTABLE))
return 1
return TRUE
else
return 0
return FALSE
/obj/structure/rack/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
. = !density
@@ -745,7 +769,7 @@
if(user.a_intent == INTENT_HARM)
return ..()
if(user.transferItemToLoc(W, drop_location()))
return 1
return TRUE
/obj/structure/rack/attack_paw(mob/living/user)
attack_hand(user)
@@ -31,7 +31,7 @@
return ..()
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
return 1
return TRUE
/obj/structure/transit_tube/station/Bumped(atom/movable/AM)
if(!pod_moving && open_status == STATION_TUBE_OPEN && ismob(AM) && AM.dir == boarding_dir)
@@ -132,8 +132,8 @@
if(open_status == STATION_TUBE_CLOSED && pod && pod.loc == loc)
pod.follow_tube()
pod_moving = 0
return 1
return 0
return TRUE
return FALSE
/obj/structure/transit_tube/station/process()
if(!pod_moving)
@@ -54,7 +54,7 @@
// Called to check if a pod should stop upon entering this tube.
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
return 0
return FALSE
// Called when a pod stops in this tube section.
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
@@ -66,18 +66,18 @@
for(var/direction in tube_dirs)
if(direction == from_dir)
return 1
return TRUE
return 0
return FALSE
/obj/structure/transit_tube/proc/has_exit(in_dir)
for(var/direction in tube_dirs)
if(direction == in_dir)
return 1
return TRUE
return 0
return FALSE
@@ -83,7 +83,7 @@
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
return 1
return TRUE
else
return ..()
+2 -2
View File
@@ -597,7 +597,7 @@
busy = TRUE
if(!do_after(user, 4 SECONDS, src))
busy = FALSE
return 1
return TRUE
busy = FALSE
SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
O.clean_blood()
@@ -609,7 +609,7 @@
reagents.reaction(O, TOUCH)
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
"<span class='notice'>You wash [O] using [src].</span>")
return 1
return TRUE
else
return ..()
@@ -69,7 +69,7 @@
if(get_dir(loc, T) == dir)
return !density
else
return 1
return TRUE
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover, turf/target)
if(mover.pass_flags & pass_flags_self)
+8 -8
View File
@@ -165,7 +165,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
if(.)
return
if(dir == FULLTILE_WINDOW_DIR)
return 0 //full tile window, you can't move into it!
return FALSE //full tile window, you can't move into it!
var/attempted_dir = get_dir(loc, target)
if(attempted_dir == dir)
return
@@ -184,10 +184,10 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
if(istype(O) && (O.pass_flags & PASSGLASS))
return 1
return TRUE
if(get_dir(O.loc, target) == dir)
return 0
return 1
return FALSE
return TRUE
/obj/structure/window/attack_tk(mob/user)
user.DelayNextAction(CLICK_CD_MELEE)
@@ -197,7 +197,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(!can_be_reached(user))
return 1
return TRUE
. = ..()
/obj/structure/window/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
if(!can_be_reached(user))
return 1 //skip the afterattack
return TRUE //skip the afterattack
add_fingerprint(user)
@@ -454,8 +454,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
if(get_dir(user,src) & dir)
for(var/obj/O in loc)
if(!O.CanPass(user, user.loc, 1))
return 0
return 1
return FALSE
return TRUE
/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()