Merge branch 'master' into Fritz-cute

This commit is contained in:
AnalWerewolf
2019-06-10 15:15:41 +10:00
415 changed files with 7410 additions and 6284 deletions
+131 -40
View File
@@ -161,13 +161,18 @@ RLD
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/construction/rcd/verb/toggle_window_type()
set name = "Toggle Window Type"
/obj/item/construction/rcd/verb/toggle_window_type_verb()
set name = "RCD : Toggle Window Type"
set category = "Object"
set src in usr // What does this do?
set src in view(1)
if(!usr.canUseTopic(src, BE_CLOSE))
return
toggle_window_type(usr)
/obj/item/construction/rcd/proc/toggle_window_type(mob/user)
var/window_type_name
if (window_type == /obj/structure/window/fulltile)
window_type = /obj/structure/window/reinforced/fulltile
window_type_name = "reinforced glass"
@@ -175,17 +180,14 @@ RLD
window_type = /obj/structure/window/fulltile
window_type_name = "glass"
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
to_chat(user, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
/obj/item/construction/rcd/verb/change_airlock_access()
set name = "Change Airlock Access"
set category = "Object"
set src in usr
/obj/item/construction/rcd/verb/change_airlock_access(mob/user)
if (!ishuman(usr) && !usr.has_unlimited_silicon_privilege)
return ..(usr)
if (!ishuman(user) && !user.has_unlimited_silicon_privilege)
return
var/t1 = text("")
var/t1 = ""
if(use_one_access)
@@ -216,24 +218,23 @@ RLD
t1 += "<p><a href='?src=[REF(src)];close=1'>Close</a></p>\n"
var/datum/browser/popup = new(usr, "airlock_electronics", "Access Control", 900, 500)
var/datum/browser/popup = new(user, "rcd_access", "Access Control", 900, 500)
popup.set_content(t1)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open()
onclose(usr, "airlock")
onclose(user, "rcd_access")
/obj/item/construction/rcd/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if (href_list["close"])
usr << browse(null, "window=airlock")
usr << browse(null, "window=rcd_access")
return
if (href_list["access"])
toggle_access(href_list["access"])
change_airlock_access()
change_airlock_access(usr)
/obj/item/construction/rcd/proc/toggle_access(acc)
if (acc == "all")
@@ -253,16 +254,77 @@ RLD
if (!conf_access.len)
conf_access = null
/obj/item/construction/rcd/verb/change_airlock_setting()
set name = "Change Airlock Setting"
set category = "Object"
set src in usr
/obj/item/construction/rcd/proc/get_airlock_image(airlock_type)
var/obj/machinery/door/airlock/proto = airlock_type
var/ic = initial(proto.icon)
var/mutable_appearance/MA = mutable_appearance(ic, "closed")
if(!initial(proto.glass))
MA.overlays += "fill_closed"
//Not scaling these down to button size because they look horrible then, instead just bumping up radius.
return MA
var/airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass")
/obj/item/construction/rcd/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
if(user.incapacitated() || !user.Adjacent(src))
return FALSE
return TRUE
/obj/item/construction/rcd/proc/change_airlock_setting(mob/user)
if(!user)
return
var/list/solid_or_glass_choices = list(
"Solid" = get_airlock_image(/obj/machinery/door/airlock),
"Glass" = get_airlock_image(/obj/machinery/door/airlock/glass)
)
var/list/solid_choices = list(
"Standard" = get_airlock_image(/obj/machinery/door/airlock),
"Public" = get_airlock_image(/obj/machinery/door/airlock/public),
"Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering),
"Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos),
"Security" = get_airlock_image(/obj/machinery/door/airlock/security),
"Command" = get_airlock_image(/obj/machinery/door/airlock/command),
"Medical" = get_airlock_image(/obj/machinery/door/airlock/medical),
"Research" = get_airlock_image(/obj/machinery/door/airlock/research),
"Freezer" = get_airlock_image(/obj/machinery/door/airlock/freezer),
"Science" = get_airlock_image(/obj/machinery/door/airlock/science),
"Virology" = get_airlock_image(/obj/machinery/door/airlock/virology),
"Mining" = get_airlock_image(/obj/machinery/door/airlock/mining),
"Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance),
"External" = get_airlock_image(/obj/machinery/door/airlock/external),
"External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external),
"Airtight Hatch" = get_airlock_image(/obj/machinery/door/airlock/hatch),
"Maintenance Hatch" = get_airlock_image(/obj/machinery/door/airlock/maintenance_hatch)
)
var/list/glass_choices = list(
"Standard" = get_airlock_image(/obj/machinery/door/airlock/glass),
"Public" = get_airlock_image(/obj/machinery/door/airlock/public/glass),
"Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering/glass),
"Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos/glass),
"Security" = get_airlock_image(/obj/machinery/door/airlock/security/glass),
"Command" = get_airlock_image(/obj/machinery/door/airlock/command/glass),
"Medical" = get_airlock_image(/obj/machinery/door/airlock/medical/glass),
"Research" = get_airlock_image(/obj/machinery/door/airlock/research/glass),
"Science" = get_airlock_image(/obj/machinery/door/airlock/science/glass),
"Virology" = get_airlock_image(/obj/machinery/door/airlock/virology/glass),
"Mining" = get_airlock_image(/obj/machinery/door/airlock/mining/glass),
"Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/glass),
"External" = get_airlock_image(/obj/machinery/door/airlock/external/glass),
"External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external/glass)
)
var/airlockcat = show_radial_menu(user, src, solid_or_glass_choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
if(!check_menu(user))
return
switch(airlockcat)
if("Solid")
if(advanced_airlock_setting == 1)
var/airlockpaint = input(usr, "Select the type of the airlock.") in list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance", "Airtight Hatch", "Maintenance Hatch")
var/airlockpaint = show_radial_menu(user, src, solid_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
if(!check_menu(user))
return
switch(airlockpaint)
if("Standard")
airlock_type = /obj/machinery/door/airlock
@@ -305,7 +367,9 @@ RLD
if("Glass")
if(advanced_airlock_setting == 1)
var/airlockpaint = input(usr, "Select the type of the airlock.") in list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
var/airlockpaint = show_radial_menu(user, src , glass_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
if(!check_menu(user))
return
switch(airlockpaint)
if("Standard")
airlock_type = /obj/machinery/door/airlock/glass
@@ -356,8 +420,8 @@ RLD
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
/obj/item/construction/rcd/New()
..()
/obj/item/construction/rcd/Initialize()
. = ..()
GLOB.rcd_list += src
/obj/item/construction/rcd/Destroy()
@@ -366,19 +430,46 @@ RLD
/obj/item/construction/rcd/attack_self(mob/user)
..()
switch(mode)
if(1)
mode = 2
to_chat(user, "<span class='notice'>You change RCD's mode to 'Airlock'.</span>")
if(2)
mode = 3
to_chat(user, "<span class='notice'>You change RCD's mode to 'Deconstruct'.</span>")
if(3)
mode = 4
to_chat(user, "<span class='notice'>You change RCD's mode to 'Grilles & Windows'.</span>")
if(4)
mode = 1
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
var/list/choices = list(
"Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"),
"Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"),
"Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"),
"Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor")
)
if(mode == RCD_AIRLOCK)
choices += list(
"Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"),
"Change Airlock Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlocktype")
)
else if(mode == RCD_WINDOWGRILLE)
choices += list(
"Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype")
)
var/choice = show_radial_menu(user,src,choices, custom_check = CALLBACK(src,.proc/check_menu,user))
if(!check_menu(user))
return
switch(choice)
if("Floors & Walls")
mode = RCD_FLOORWALL
if("Airlock")
mode = RCD_AIRLOCK
if("Deconstruct")
mode = RCD_DECONSTRUCT
if("Grilles & Windows")
mode = RCD_WINDOWGRILLE
if("Change Access")
change_airlock_access(user)
return
if("Change Airlock Type")
change_airlock_setting(user)
return
if("Change Window Type")
toggle_window_type(user)
return
else
return
playsound(src, 'sound/effects/pop.ogg', 50, 0)
to_chat(user, "<span class='notice'>You change RCD's mode to '[choice]'.</span>")
/obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
+123 -12
View File
@@ -14,13 +14,14 @@
w_class = WEIGHT_CLASS_NORMAL
var/max_amount = 90
var/active = FALSE
actions_types = list(/datum/action/item_action/rcl)
actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui)
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
var/current_color_index = 1
var/ghetto = FALSE
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
var/datum/component/mobhook
var/datum/radial_menu/persistent/wiring_gui_menu
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
@@ -85,7 +86,8 @@
/obj/item/twohanded/rcl/Destroy()
QDEL_NULL(loaded)
last = null
setActive(FALSE, null) // setactive(FALSE) removes mobhook
QDEL_NULL(mobhook)
QDEL_NULL(wiring_gui_menu)
return ..()
/obj/item/twohanded/rcl/update_icon()
@@ -115,20 +117,28 @@
if(loaded)
QDEL_NULL(loaded)
loaded = null
QDEL_NULL(wiring_gui_menu)
unwield(user)
setActive(wielded, user)
active = wielded
return TRUE
return FALSE
/obj/item/twohanded/rcl/pickup(mob/user)
..()
getMobhook(user)
/obj/item/twohanded/rcl/dropped(mob/wearer)
..()
if(mobhook)
setActive(FALSE, mobhook.parent)
active = FALSE
QDEL_NULL(mobhook)
last = null
/obj/item/twohanded/rcl/attack_self(mob/user)
..()
setActive(wielded, user)
active = wielded
if(!active)
last = null
else if(!last)
@@ -137,17 +147,24 @@
last = C
break
/obj/item/twohanded/rcl/proc/setActive(toggle, mob/user)
active = toggle
if (active && user)
if (mobhook && mobhook.parent != user)
obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
if(to_hook)
if(mobhook && mobhook.parent != to_hook)
QDEL_NULL(mobhook)
if (!mobhook)
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger)))
mobhook = to_hook.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger)))
else
QDEL_NULL(mobhook)
/obj/item/twohanded/rcl/proc/trigger(mob/user)
if(active)
layCable(user)
if(wiring_gui_menu) //update the wire options as you move
wiringGuiUpdate(user)
//previous contents of trigger(), lays cable each time the player moves
/obj/item/twohanded/rcl/proc/layCable(mob/user)
if(!isturf(user.loc))
return
if(is_empty(user, 0))
@@ -156,7 +173,7 @@
if(prob(2) && ghetto) //Give ghetto RCLs a 2% chance to jam, requiring it to be reactviated manually.
to_chat(user, "<span class='warning'>[src]'s wires jam!</span>")
setActive(FALSE, user)
active = FALSE
return
else
if(last)
@@ -179,6 +196,91 @@
is_empty(user) //If we've run out, display message
update_icon()
//searches the current tile for a stub cable of the same colour
/obj/item/twohanded/rcl/proc/findLinkingCable(mob/user)
var/turf/T
if(!isturf(user.loc))
return
T = get_turf(user)
if(T.intact || !T.can_have_cabling())
return
for(var/obj/structure/cable/C in T)
if(!C)
continue
if(C.cable_color != GLOB.cable_colors[colors[current_color_index]])
continue
if(C.d1 == 0)
return C
break
return
/obj/item/twohanded/rcl/proc/wiringGuiGenerateChoices(mob/user)
var/fromdir = 0
var/obj/structure/cable/linkingCable = findLinkingCable(user)
if(linkingCable)
fromdir = linkingCable.d2
var/list/wiredirs = list("1","5","4","6","2","10","8","9")
for(var/icondir in wiredirs)
var/dirnum = text2num(icondir)
var/cablesuffix = "[min(fromdir,dirnum)]-[max(fromdir,dirnum)]"
if(fromdir == dirnum) //cables can't loop back on themselves
cablesuffix = "invalid"
var/image/img = image(icon = 'icons/mob/radial.dmi', icon_state = "cable_[cablesuffix]")
img.color = GLOB.cable_colors[colors[current_color_index]]
wiredirs[icondir] = img
return wiredirs
/obj/item/twohanded/rcl/proc/showWiringGui(mob/user)
var/list/choices = wiringGuiGenerateChoices(user)
wiring_gui_menu = show_radial_menu_persistent(user, src , choices, select_proc = CALLBACK(src, .proc/wiringGuiReact, user), radius = 42)
/obj/item/twohanded/rcl/proc/wiringGuiUpdate(mob/user)
if(!wiring_gui_menu)
return
wiring_gui_menu.entry_animation = FALSE //stop the open anim from playing each time we update
var/list/choices = wiringGuiGenerateChoices(user)
wiring_gui_menu.change_choices(choices,FALSE)
//Callback used to respond to interactions with the wiring menu
/obj/item/twohanded/rcl/proc/wiringGuiReact(mob/living/user,choice)
if(!choice) //close on a null choice (the center button)
QDEL_NULL(wiring_gui_menu)
return
choice = text2num(choice)
if(!isturf(user.loc))
return
if(is_empty(user, 0))
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
return
var/turf/T = get_turf(user)
if(T.intact || !T.can_have_cabling())
return
loaded.item_color = colors[current_color_index]
var/obj/structure/cable/linkingCable = findLinkingCable(user)
if(linkingCable)
if(choice != linkingCable.d2)
loaded.cable_join(linkingCable, user, FALSE, choice)
last = null
else
last = loaded.place_turf(get_turf(src), user, choice)
is_empty(user) //If we've run out, display message
wiringGuiUpdate(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
. = ..()
@@ -192,12 +294,21 @@
update_icon()
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/rcl))
if(istype(action, /datum/action/item_action/rcl_col))
current_color_index++;
if (current_color_index > colors.len)
current_color_index = 1
var/cwname = colors[current_color_index]
to_chat(user, "Color changed to [cwname]!")
if(loaded)
loaded.item_color= colors[current_color_index]
if(wiring_gui_menu)
wiringGuiUpdate(user)
else if(istype(action, /datum/action/item_action/rcl_gui))
if(wiring_gui_menu) //The menu is already open, close it
QDEL_NULL(wiring_gui_menu)
else //open the menu
showWiringGui(user)
/obj/item/twohanded/rcl/ghetto
actions_types = list()
+1 -1
View File
@@ -331,7 +331,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
//make sure what we're clicking is valid for the current category
var/static/list/make_pipe_whitelist
if(!make_pipe_whitelist)
make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe))
make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe, /obj/structure/window, /obj/structure/grille))
var/can_make_pipe = (isturf(A) || is_type_in_typecache(A, make_pipe_whitelist))
. = FALSE
+5 -7
View File
@@ -59,7 +59,7 @@
/obj/item/areaeditor/blueprints/attack_self(mob/user)
. = ..()
if(!legend)
var/area/A = get_area()
var/area/A = get_area(user)
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
. += "<p><a href='?src=[REF(src)];edit_area=1'>Change area name</a></p>"
@@ -140,12 +140,10 @@
legend = FALSE
/obj/item/areaeditor/proc/get_area()
var/turf/T = get_turf(usr)
var/area/A = T.loc
return A
/obj/item/areaeditor/proc/get_area_type(area/A = get_area())
/obj/item/areaeditor/proc/get_area_type(area/A)
if(!A)
A = get_area(usr)
if(A.outdoors)
return AREA_SPACE
var/list/SPECIALS = list(
@@ -183,7 +181,7 @@
return ""
/obj/item/areaeditor/proc/edit_area()
var/area/A = get_area()
var/area/A = get_area(usr)
var/prevname = "[A.name]"
var/str = stripped_input(usr,"New area name:", "Area Creation", "", MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
+2 -2
View File
@@ -16,7 +16,7 @@
/obj/item/organ/body_egg/Insert(var/mob/living/carbon/M, special = 0)
..()
owner.add_trait(TRAIT_XENO_HOST, TRAIT_GENERIC)
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
START_PROCESSING(SSobj, src)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
@@ -24,7 +24,7 @@
/obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0)
STOP_PROCESSING(SSobj, src)
if(owner)
owner.remove_trait(TRAIT_XENO_HOST, TRAIT_GENERIC)
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner)
..()
+2 -3
View File
@@ -248,9 +248,8 @@
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
GM.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
GM.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
GM.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
GM.temperature = T20C
return GM
+6 -10
View File
@@ -102,7 +102,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
container_type = INJECTABLE
w_class = WEIGHT_CLASS_TINY
body_parts_covered = null
grind_results = list()
@@ -123,8 +122,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/Initialize()
. = ..()
create_reagents(chem_volume)
reagents.set_reacting(FALSE) // so it doesn't react until you light it
create_reagents(chem_volume, INJECTABLE | NO_REACT) // so it doesn't react until you light it
if(list_reagents)
reagents.add_reagent_list(list_reagents)
if(starts_lit)
@@ -184,7 +182,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
qdel(src)
return
// allowing reagents to react after being lit
reagents.set_reacting(TRUE)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
@@ -325,7 +323,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
list_reagents = list("space_drugs" = 15, "lipolicide" = 35)
/obj/item/clothing/mask/cigarette/rollie/mindbreaker
list_reagents = list("mindbreaker" = 35, "lipolicide" = 15)
list_reagents = list("mindbreaker" = 35, "lipolicide" = 15)
/obj/item/cigbutt/roach
name = "roach"
@@ -720,8 +718,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/vape/Initialize(mapload, param_color)
. = ..()
create_reagents(chem_volume)
reagents.set_reacting(FALSE) // so it doesn't react until you light it
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.add_reagent("nicotine", 50)
if(!icon_state)
if(!param_color)
@@ -790,13 +787,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(reagents.total_volume > 0)
to_chat(user, "<span class='notice'>You empty [src] of all reagents.</span>")
reagents.clear_reagents()
return
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
if(slot == SLOT_WEAR_MASK)
if(!screw)
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
reagents.set_reacting(TRUE)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
START_PROCESSING(SSobj, src)
else //it will not start if the vape is opened.
to_chat(user, "<span class='warning'>You need to close the cap first!</span>")
@@ -804,7 +800,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/vape/dropped(mob/user)
var/mob/living/carbon/C = user
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
reagents.set_reacting(FALSE)
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error
+1 -1
View File
@@ -254,7 +254,7 @@
cost = 0
if(ishuman(user))
var/mob/living/carbon/human/H = user
if (H.has_trait(TRAIT_TAGGER))
if (HAS_TRAIT(H, TRAIT_TAGGER))
cost *= 0.5
var/charges_used = use_charges(user, cost)
if(!charges_used)
+2 -2
View File
@@ -444,7 +444,7 @@
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H)
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
return (!H.suiciding && !(H.has_trait(TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
return (!H.suiciding && !(HAS_TRAIT(H, TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
if(req_defib)
@@ -585,7 +585,7 @@
shock_touching(30, H)
var/failed
if (H.suiciding || (H.has_trait(TRAIT_NOCLONE)))
if (H.suiciding || (HAS_TRAIT(H, TRAIT_NOCLONE)))
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
else if (H.hellbound)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile.</span>"
+2 -2
View File
@@ -358,9 +358,9 @@ GLOBAL_LIST_EMPTY(PDAs)
if (total_moles)
for(var/id in env_gases)
var/gas_level = env_gases[id][MOLES]/total_moles
var/gas_level = env_gases[id]/total_moles
if(gas_level > 0)
dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100, 0.01)]%<br>"
dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%<br>"
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C<br>"
dat += "<br>"
@@ -52,7 +52,7 @@
add_fingerprint(user)
if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))
if((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
if(!user.IsAdvancedToolUser())
@@ -86,7 +86,7 @@
else
user.visible_message("<span class='warning'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='danger'>You direct [src] to [M]'s eyes.</span>")
if(M.stat == DEAD || (M.has_trait(TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind
if(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind
to_chat(user, "<span class='warning'>[M]'s pupils don't react to the light!</span>")
else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-ray vision
to_chat(user, "<span class='danger'>[M]'s pupils give an eerie glow!</span>")
@@ -54,7 +54,7 @@
/obj/item/instrument/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/musicaltuner))
var/mob/living/carbon/human/H = user
if (H.has_trait(TRAIT_MUSICIAN))
if (HAS_TRAIT(H, TRAIT_MUSICIAN))
if (!tune_time)
H.visible_message("[H] tunes the [src] to perfection!", "<span class='notice'>You tune the [src] to perfection!</span>")
tune_time = 300
@@ -69,7 +69,7 @@
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(user.has_trait(TRAIT_NOGUNS))
if(HAS_TRAIT(user, TRAIT_NOGUNS))
to_chat(user, "<span class='warning'>Your fingers can't press the button!</span>")
return
if(ishuman(user))
+24 -25
View File
@@ -95,7 +95,7 @@ SLIME SCANNER
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
// Clumsiness/brain damage check
if ((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50))
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
var/msg = "<span class='info'>*---------*\nAnalyzing results for The floor:\n\tOverall status: <b>Healthy</b>\n"
@@ -127,7 +127,7 @@ SLIME SCANNER
var/brute_loss = M.getBruteLoss()
var/mob_status = (M.stat == DEAD ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
if(M.has_trait(TRAIT_FAKEDEATH) && !advanced)
if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced)
mob_status = "<span class='alert'><b>Deceased</b></span>"
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
@@ -199,10 +199,10 @@ SLIME SCANNER
msg += "\t<span class='info'><b>==EAR STATUS==</b></span>\n"
if(istype(ears))
var/healthy = TRUE
if(C.has_trait(TRAIT_DEAF, GENETIC_MUTATION))
if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION))
healthy = FALSE
msg += "\t<span class='alert'>Subject is genetically deaf.</span>\n"
else if(C.has_trait(TRAIT_DEAF))
else if(HAS_TRAIT(C, TRAIT_DEAF))
healthy = FALSE
msg += "\t<span class='alert'>Subject is deaf.</span>\n"
else
@@ -220,10 +220,10 @@ SLIME SCANNER
msg += "\t<span class='info'><b>==EYE STATUS==</b></span>\n"
if(istype(eyes))
var/healthy = TRUE
if(C.has_trait(TRAIT_BLIND))
if(HAS_TRAIT(C, TRAIT_BLIND))
msg += "\t<span class='alert'>Subject is blind.</span>\n"
healthy = FALSE
if(C.has_trait(TRAIT_NEARSIGHT))
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
msg += "\t<span class='alert'>Subject is nearsighted.</span>\n"
healthy = FALSE
if(eyes.eye_damage > 30)
@@ -290,7 +290,7 @@ SLIME SCANNER
msg += "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] &deg;C ([round(M.bodytemperature*1.8-459.67,0.1)] &deg;F)</span>\n"
// Time of death
if(M.tod && (M.stat == DEAD || ((M.has_trait(TRAIT_FAKEDEATH)) && !advanced)))
if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced)))
msg += "<span class='info'>Time of Death:</span> [M.tod]\n"
var/tdelta = round(world.time - M.timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
@@ -428,39 +428,38 @@ SLIME SCANNER
if(total_moles)
var/list/env_gases = environment.gases
environment.assert_gases(arglist(GLOB.hardcoded_gases))
var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles
var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles
var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles
var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
if(abs(n2_concentration - N2STANDARD) < 20)
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
else
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
if(abs(o2_concentration - O2STANDARD) < 2)
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
else
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
if(co2_concentration > 0.01)
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
else
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
if(plasma_concentration > 0.005)
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
else
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
environment.garbage_collect()
GAS_GARBAGE_COLLECT(environment.gases)
for(var/id in env_gases)
if(id in GLOB.hardcoded_gases)
continue
var/gas_concentration = env_gases[id][MOLES]/total_moles
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id][MOLES], 0.01)] mol)</span>")
var/gas_concentration = env_gases[id]/total_moles
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C, 0.01)] &deg;C ([round(environment.temperature, 0.01)] K)</span>")
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
@@ -550,8 +549,8 @@ SLIME SCANNER
var/list/cached_gases = air_contents.gases
for(var/id in cached_gases)
var/gas_concentration = cached_gases[id][MOLES]/total_moles
to_chat(user, "<span class='notice'>[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id][MOLES], 0.01)] mol)</span>")
var/gas_concentration = cached_gases[id]/total_moles
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)</span>")
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] &deg;C ([round(temperature, 0.01)] K)</span>")
else
+2 -2
View File
@@ -31,7 +31,7 @@
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
prepare()
if(M.has_dna() && !M.has_trait(TRAIT_RADIMMUNE) && !M.has_trait(TRAIT_NOCLONE))
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_NOCLONE))
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
for(var/datum/mutation/human/HM in remove_mutations)
@@ -313,7 +313,7 @@
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
return FALSE
if(M.has_dna() && !(M.has_trait(TRAIT_NOCLONE)))
if(M.has_dna() && !(HAS_TRAIT(M, TRAIT_NOCLONE)))
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
var/endtime = world.time+duration
+1 -2
View File
@@ -15,7 +15,6 @@
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
dog_fashion = /datum/dog_fashion/back
resistance_flags = FIRE_PROOF
container_type = AMOUNT_VISIBLE
var/max_water = 50
var/last_use = 1
var/chem = "water"
@@ -56,7 +55,7 @@
/obj/item/extinguisher/Initialize()
. = ..()
create_reagents(max_water)
create_reagents(max_water, AMOUNT_VISIBLE)
reagents.add_reagent(chem, max_water)
+1 -1
View File
@@ -205,7 +205,7 @@
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
if(air_transfer.gases[/datum/gas/plasma])
air_transfer.gases[/datum/gas/plasma][MOLES] *= 5
air_transfer.gases[/datum/gas/plasma] *= 5
target.assume_air(air_transfer)
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
+1 -1
View File
@@ -33,7 +33,7 @@
qdel(src)
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
var/clumsy = user.has_trait(TRAIT_CLUMSY)
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE))
if(prob(50))
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
+1 -1
View File
@@ -44,7 +44,7 @@
if(!istype(C))
return
if(iscarbon(user) && (user.has_trait(TRAIT_CLUMSY) && prob(50)))
if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
apply_cuffs(user,user)
return
+4 -1
View File
@@ -546,6 +546,9 @@
/obj/item/nullrod/pride_hammer
icon_state = "pride"
item_state = "pride"
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
name = "Pride-struck Hammer"
desc = "It resonates an aura of Pride."
force = 16
@@ -553,7 +556,7 @@
w_class = 4
slot_flags = ITEM_SLOT_BACK
attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked")
hitsound = 'sound/weapons/blade1.ogg'
hitsound = 'sound/weapons/resonator_blast.ogg'
/obj/item/nullrod/pride_hammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
. = ..()
@@ -2,7 +2,6 @@
name = "chem implant"
desc = "Injects things."
icon_state = "reagents"
container_type = OPENCONTAINER
activated = FALSE
/obj/item/implant/chem/get_data()
@@ -23,7 +22,7 @@
/obj/item/implant/chem/Initialize()
. = ..()
create_reagents(50)
create_reagents(50, OPENCONTAINER)
GLOB.tracked_chem_implants += src
/obj/item/implant/chem/Destroy()
@@ -20,7 +20,7 @@
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE)
if(..())
if(!target.mind)
target.add_trait(TRAIT_MINDSHIELD, "implant")
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
return TRUE
@@ -49,7 +49,7 @@
to_chat(target, "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
else
to_chat(target, "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>")
target.add_trait(TRAIT_MINDSHIELD, "implant")
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
return TRUE
return FALSE
@@ -58,7 +58,7 @@
if(..())
if(isliving(target))
var/mob/living/L = target
L.remove_trait(TRAIT_MINDSHIELD, "implant")
REMOVE_TRAIT(L, TRAIT_MINDSHIELD, "implant")
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>")
@@ -33,24 +33,8 @@
/obj/item/implant/adrenalin/activate()
. = ..()
uses--
imp_in.do_adrenaline(150, TRUE, 0, 0, TRUE, list("inaprovaline" = 3, "synaptizine" = 10, "omnizine" = 10, "stimulants" = 10), "<span class='boldnotice'>You feel a sudden surge of energy!</span>")
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
imp_in.SetSleeping(0)
imp_in.SetStun(0)
imp_in.SetKnockdown(0)
imp_in.SetUnconscious(0)
imp_in.adjustStaminaLoss(-150)
imp_in.stuttering = 0
imp_in.updatehealth()
imp_in.update_stamina()
imp_in.resting = 0
imp_in.lying = 0
imp_in.update_canmove()
imp_in.reagents.add_reagent("inaprovaline", 3) //let's give another chance to dumb fucks who forget to breathe
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
imp_in.reagents.add_reagent("stimulants", 10)
if(!uses)
qdel(src)
@@ -185,7 +185,7 @@
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
message_admins("[ADMIN_LOOKUPFLW(user)] set brainwash machine objective to '[objective]'.")
log_game("[key_name(user)] set brainwash machine objective to '[objective]'.")
if(C.has_trait(TRAIT_MINDSHIELD))
if(HAS_TRAIT(C, TRAIT_MINDSHIELD))
return FALSE
brainwash(C, objective)
message_admins("[ADMIN_LOOKUPFLW(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
+5 -5
View File
@@ -37,7 +37,7 @@
</ol>
<p>
It really is that easy! Good luck!
</body>
</html>
"}
@@ -344,14 +344,14 @@
author = "Sir John Rose"
title = "Barman Recipes: Mixing Drinks and Changing Lives"
page_link = "Guide_to_food_and_drinks"
/obj/item/book/manual/wiki/robotics_cyborgs
name = "Robotics for Dummies"
icon_state = "borgbook"
author = "XISC"
title = "Robotics for Dummies"
page_link = "Guide_to_robotics"
/obj/item/book/manual/wiki/research_and_development
name = "Research and Development 101"
icon_state = "rdbook"
@@ -401,7 +401,7 @@
author = "the City-state of Atmosia"
title = "Lexica Atmosia"
page_link = "Guide_to_Atmospherics"
/obj/item/book/manual/wiki/medicine
name = "Medical Space Compendium, Volume 638"
icon_state = "book8"
@@ -441,7 +441,7 @@
H.dropItemToGround(W)
if(prob(50))
step(W, pick(GLOB.alldirs))
H.add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC)
H.bleed_rate = 5
H.gib_animation()
sleep(3)
+1 -1
View File
@@ -156,7 +156,7 @@
return //CIT CHANGE - ditto
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
user.Knockdown(60 * force)
if(ishuman(user))
@@ -82,6 +82,6 @@
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50))
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(5,5)
+21 -1
View File
@@ -591,10 +591,22 @@
desc = "An adorable stuffed toy that resembles a slime. It is practically just a hacky sack."
icon_state = "plushie_slime"
item_state = "plushie_slime"
attack_verb = list("blorbled", "slimed", "absorbed")
attack_verb = list("blorbled", "slimed", "absorbed", "glomped")
squeak_override = list('sound/effects/blobattack.ogg' = 1)
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
/obj/item/toy/plush/slimeplushie/annie
desc = "An adorable stuffed toy that resembles a slimey crewmember."
icon_state = "annie"
item_state = "annie"
/obj/item/toy/plush/slimeplushie/paxton
desc = "An adorable stuffed toy that resembles a slimey crewmember."
icon_state = "paxton"
item_state = "paxton"
attack_verb = list("CQC'd", "jabroni'd", "powergamed", "robusted", "cakehatted")
gender = MALE
/obj/item/toy/plush/awakenedplushie
name = "awakened plushie"
desc = "An ancient plushie that has grown enlightened to the true nature of reality."
@@ -741,6 +753,10 @@
icon_state = "pavel"
item_state = "pavel"
/obj/item/toy/plush/mammal/mason
icon_state = "mason"
item_state = "mason"
/obj/item/toy/plush/mammal/oten
icon_state = "oten"
item_state = "oten"
@@ -749,6 +765,10 @@
icon_state = "ray"
item_state = "ray"
/obj/item/toy/plush/mammal/redtail
icon_state = "redtail"
item_state = "redtail"
/obj/item/toy/plush/mammal/dawud
icon_state = "dawud"
item_state = "dawud"
+1 -1
View File
@@ -150,7 +150,7 @@
if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting))
to_chat(user, "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>")
return
if(user.has_trait(TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='warning'>[C] loses [C.p_their()] grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
C.dropItemToGround(src, TRUE)
+1 -1
View File
@@ -187,7 +187,7 @@
inspiration_available = FALSE
/obj/item/banner/command/check_inspiration(mob/living/carbon/human/H)
return H.has_trait(TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies.
return HAS_TRAIT(H, TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies.
/datum/crafting_recipe/command_banner
name = "Command Banner"
+1 -1
View File
@@ -91,7 +91,7 @@
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50))
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
user.take_bodypart_damage(5)
active = !active
@@ -281,12 +281,12 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
var/hit_hand = ((user.active_hand_index % 2 == 0) ? "r_" : "l_") + "arm"
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves && !H.has_trait(TRAIT_PIERCEIMMUNE)) // golems, etc
if(!H.gloves && !HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) // golems, etc
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
H.apply_damage(force*0.5, BRUTE, hit_hand)
else if(ismonkey(user))
var/mob/living/carbon/monkey/M = user
if(!M.has_trait(TRAIT_PIERCEIMMUNE))
if(!HAS_TRAIT(M, TRAIT_PIERCEIMMUNE))
to_chat(M, "<span class='warning'>[src] cuts into your hand!</span>")
M.apply_damage(force*0.5, BRUTE, hit_hand)
@@ -312,7 +312,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
/obj/item/shard/Crossed(mob/living/L)
if(istype(L) && has_gravity(loc))
if(L.has_trait(TRAIT_LIGHT_STEP))
if(HAS_TRAIT(L, TRAIT_LIGHT_STEP))
playsound(loc, 'sound/effects/glass_step.ogg', 30, 1)
else
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
@@ -282,9 +282,14 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
*/
GLOBAL_LIST_INIT(cardboard_recipes, list ( \
new/datum/stack_recipe("box", /obj/item/storage/box), \
new/datum/stack_recipe("sec box", /obj/item/storage/box/seclooking), \
new/datum/stack_recipe("light tubes", /obj/item/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/storage/box/lights/bulbs), \
new/datum/stack_recipe("mouse traps", /obj/item/storage/box/mousetraps), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
new/datum/stack_recipe("power cell", /obj/item/storage/box/cells), \
new/datum/stack_recipe("02", /obj/item/storage/box/otwo), \
null, \
new/datum/stack_recipe("lethal ammo box", /obj/item/storage/box/lethalshot), \
new/datum/stack_recipe("rubber shot ammo box", /obj/item/storage/box/rubbershot), \
new/datum/stack_recipe("bean bag ammo box", /obj/item/storage/box/beanbag), \
@@ -292,13 +297,23 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
new/datum/stack_recipe("stun slug ammo box", /obj/item/storage/box/stunslug), \
new/datum/stack_recipe("tech shell ammo box", /obj/item/storage/box/techsslug), \
new/datum/stack_recipe("incendiary ammo box", /obj/item/storage/box/fireshot), \
new/datum/stack_recipe("firing pins", /obj/item/storage/box/firingpins), \
new/datum/stack_recipe("loose ammo", /obj/item/storage/box/ammoshells), \
null, \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
new/datum/stack_recipe("folder", /obj/item/folder), \
new/datum/stack_recipe("large box", /obj/structure/closet/cardboard, 4), \
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5), \
))
null, \
new/datum/stack_recipe("colored brown", /obj/item/storage/box/brown), \
new/datum/stack_recipe("colored green", /obj/item/storage/box/green), \
new/datum/stack_recipe("colored red", /obj/item/storage/box/blue), \
new/datum/stack_recipe("colored blue", /obj/item/storage/box/red), \
new/datum/stack_recipe("colored yellow", /obj/item/storage/box/yellow), \
new/datum/stack_recipe("colored pink", /obj/item/storage/box/pink), \
new/datum/stack_recipe("colored purple", /obj/item/storage/box/purple), \
))
/obj/item/stack/sheet/cardboard //BubbleWrap //it's cardboard you fuck
name = "cardboard"
+16 -1
View File
@@ -28,7 +28,6 @@
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 21
/*
* Backpack Types
*/
@@ -244,6 +243,18 @@
icon_state = "satchel-explorer"
item_state = "securitypack"
/obj/item/storage/backpack/satchel/bone
name = "bone satchel"
desc = "A bone satchel fashend with watcher wings and large bones from goliath. Can be worn on the belt."
icon = 'icons/obj/mining.dmi'
icon_state = "goliath_saddle"
slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_BELT
/obj/item/storage/backpack/satchel/bone/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 10
/obj/item/storage/backpack/satchel/cap
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
@@ -447,6 +458,8 @@
new /obj/item/clothing/suit/straight_jacket(src)
new /obj/item/clothing/mask/muzzle(src)
new /obj/item/mmi/syndie(src)
new /obj/item/implantcase(src)
new /obj/item/implanter(src)
/obj/item/storage/backpack/duffelbag/syndie/surgery_adv
name = "advanced surgery duffel bag"
@@ -464,6 +477,8 @@
new /obj/item/clothing/suit/straight_jacket(src)
new /obj/item/clothing/mask/muzzle(src)
new /obj/item/mmi/syndie(src)
new /obj/item/implantcase(src)
new /obj/item/implanter(src)
/obj/item/storage/backpack/duffelbag/syndie/ammo
name = "ammunition duffel bag"
+1 -1
View File
@@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if (user.has_trait(TRAIT_CLUMSY) && prob(50))
if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
user.take_bodypart_damage(10)
user.Unconscious(400)
+70 -6
View File
@@ -15,9 +15,10 @@
* Handcuff, mousetrap, and pillbottle boxes,
* Snap-pops and matchboxes,
* Replacement light boxes,
* Shotgun Ammo boxes,
* Ammo types,
* Action Figure Boxes,
* Various paper bags.
* Various paper bags,
* Colored boxes
*
* For syndicate call-ins see uplink_kits.dm
*/
@@ -75,7 +76,6 @@
return 0
return ..()
//Disk boxes
/obj/item/storage/box/disks
name = "diskette box"
@@ -142,6 +142,29 @@
..() // we want the regular stuff too
new /obj/item/radio/off(src)
/obj/item/storage/box/seclooking
icon_state = "secbox"
illustration = null
/obj/item/storage/box/cells
name = "box of powercells"
desc = "Contains powercells."
illustration = "power_cell"
/obj/item/storage/box/ammoshells
name = "box of loose ammo"
desc = "Contains loose ammo."
illustration = "loose_ammo"
/obj/item/storage/box/otwo
name = "box of o2 supplies"
desc = "Contains o2 supplies."
illustration = "02"
/obj/item/storage/box/otwo/PopulateContents()
for(var/i in 1 to 7)
new /obj/item/tank/internals/emergency_oxygen/engi(src)
/obj/item/storage/box/gloves
name = "box of latex gloves"
desc = "Contains sterile latex gloves."
@@ -463,7 +486,7 @@
/obj/item/storage/box/firingpins
name = "box of standard firing pins"
desc = "A box full of standard firing pins, to allow newly-developed firearms to operate."
illustration = "id"
illustration = "firing_pins"
/obj/item/storage/box/firingpins/PopulateContents()
for(var/i in 1 to 5)
@@ -472,7 +495,7 @@
/obj/item/storage/box/lasertagpins
name = "box of laser tag firing pins"
desc = "A box full of laser tag firing pins, to allow newly-developed firearms to require wearing brightly coloured plastic armor before being able to be used."
illustration = "id"
illustration = "firing_pins"
/obj/item/storage/box/lasertagpins/PopulateContents()
for(var/i in 1 to 3)
@@ -768,6 +791,19 @@
var/randomFigure = pick(subtypesof(/obj/item/toy/figure))
new randomFigure(src)
/obj/item/storage/box/mechfigures
name = "box of mech figures"
desc = "The latest set of collectable mech figures."
icon_state = "box"
/obj/item/storage/box/mechfigures/PopulateContents()
for(var/i in 1 to 4)
var/randomFigure = pick(subtypesof(/obj/item/toy/prize/))
new randomFigure(src)
#define NODESIGN "None"
#define NANOTRASEN "NanotrasenStandard"
#define SYNDI "SyndiSnacks"
@@ -1003,7 +1039,6 @@
for(var/i in 1 to 7)
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
/obj/item/storage/box/fountainpens
name = "box of fountain pens"
@@ -1062,3 +1097,32 @@
new /obj/item/stock_parts/matter_bin/bluespace(src)
new /obj/item/stock_parts/matter_bin/bluespace(src)
new /obj/item/stock_parts/matter_bin/bluespace(src)
//Colored boxes.
/obj/item/storage/box/green
icon_state = "box_green"
illustration = null
/obj/item/storage/box/blue
icon_state = "box_blue"
illustration = null
/obj/item/storage/box/purple
icon_state = "box_purple"
illustration = null
/obj/item/storage/box/red
icon_state = "box_red"
illustration = null
/obj/item/storage/box/yellow
icon_state = "box_yellow"
illustration = null
/obj/item/storage/box/brown
icon_state = "box_brown"
illustration = null
/obj/item/storage/box/pink
icon_state = "box_pink"
illustration = null
+6 -5
View File
@@ -124,7 +124,7 @@
add_fingerprint(user)
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
if(status && user.has_trait(TRAIT_CLUMSY) && prob(50))
if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
clowning_around(user)
return
@@ -222,14 +222,15 @@
hitcost = 2000
throw_hit_chance = 10
slot_flags = ITEM_SLOT_BACK
var/obj/item/assembly/igniter/sparkler = 0
var/obj/item/assembly/igniter/sparkler
/obj/item/melee/baton/cattleprod/Initialize()
. = ..()
sparkler = new (src)
sparkler.activate_cooldown = 5
/obj/item/melee/baton/cattleprod/baton_stun()
if(sparkler.activate())
..()
sparkler?.activate()
. = ..()
#undef STUNBATON_CHARGE_LENIENCY
#undef STUNBATON_CHARGE_LENIENCY
+1 -2
View File
@@ -17,8 +17,7 @@
/obj/item/tank/jetpack/New()
..()
if(gas_type)
air_contents.assert_gas(gas_type)
air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
air_contents.gases[gas_type] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
ion_trail = new
ion_trail.set_up(src)
+11 -17
View File
@@ -21,8 +21,7 @@
/obj/item/tank/internals/oxygen/New()
..()
air_contents.assert_gas(/datum/gas/oxygen)
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -49,9 +48,8 @@
/obj/item/tank/internals/anesthetic/New()
..()
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -67,9 +65,8 @@
/obj/item/tank/internals/air/New()
..()
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
@@ -87,8 +84,7 @@
/obj/item/tank/internals/plasma/New()
..()
air_contents.assert_gas(/datum/gas/plasma)
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
@@ -106,7 +102,7 @@
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -124,13 +120,12 @@
/obj/item/tank/internals/plasmaman/New()
..()
air_contents.assert_gas(/datum/gas/plasma)
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -144,7 +139,7 @@
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -166,8 +161,7 @@
/obj/item/tank/internals/emergency_oxygen/New()
..()
air_contents.assert_gas(/datum/gas/oxygen)
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/engi
+1 -1
View File
@@ -128,7 +128,7 @@
H.dropItemToGround(W)
if(prob(50))
step(W, pick(GLOB.alldirs))
H.add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC)
H.bleed_rate = 5
H.gib_animation()
sleep(3)
+2 -3
View File
@@ -18,7 +18,7 @@
/obj/item/watertank/Initialize()
. = ..()
create_reagents(volume)
create_reagents(volume, OPENCONTAINER)
noz = make_noz()
/obj/item/watertank/ui_action_click(mob/user)
@@ -113,7 +113,6 @@
possible_transfer_amounts = list(25,50,100)
volume = 500
item_flags = NOBLUDGEON | ABSTRACT // don't put in storage
container_type = OPENCONTAINER
slot_flags = 0
var/obj/item/watertank/tank
@@ -335,7 +334,7 @@
var/usage_ratio = 5 //5 unit added per 1 removed
var/injection_amount = 1
amount_per_transfer_from_this = 5
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
spillable = FALSE
possible_transfer_amounts = list(5,10,15)
+2 -2
View File
@@ -266,10 +266,10 @@
status = !status
if(status)
to_chat(user, "<span class='notice'>You resecure [src] and close the fuel tank.</span>")
container_type = NONE
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
else
to_chat(user, "<span class='notice'>[src] can now be attached, modified, and refuelled.</span>")
container_type = OPENCONTAINER
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
+1 -1
View File
@@ -350,7 +350,7 @@
unwield()
return
..()
if(user.has_trait(TRAIT_CLUMSY) && (wielded) && prob(40))
if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40))
impale(user)
return
if((wielded) && prob(50))
+2 -2
View File
@@ -115,10 +115,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/pickup(mob/living/user)
to_chat(user, "<span class='notice'>The power of Scotland protects you! You are shielded from all stuns and knockdowns.</span>")
user.add_stun_absorption("highlander", INFINITY, 1, " is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!")
user.add_trait(TRAIT_IGNORESLOWDOWN, HIGHLANDER)
user.ignore_slowdown(HIGHLANDER)
/obj/item/claymore/highlander/dropped(mob/living/user)
user.remove_trait(TRAIT_IGNORESLOWDOWN, HIGHLANDER)
user.unignore_slowdown(HIGHLANDER)
if(!QDELETED(src))
qdel(src) //If this ever happens, it's because you lost an arm