This commit is contained in:
Ravensdale
2015-02-04 07:40:20 -08:00
53 changed files with 1201 additions and 1035 deletions

View File

@@ -1249,7 +1249,7 @@ proc/is_hot(obj/item/W as obj)
return 1000
else
return 0
if(/obj/item/clothing/mask/cigarette)
if(/obj/item/clothing/mask/smokable/cigarette)
if(W:lit)
return 1000
else
@@ -1287,7 +1287,7 @@ proc/is_hot(obj/item/W as obj)
istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/flame/lighter/zippo) || \
istype(W, /obj/item/weapon/flame/match) || \
istype(W, /obj/item/clothing/mask/cigarette) || \
istype(W, /obj/item/clothing/mask/smokable/cigarette) || \
istype(W, /obj/item/weapon/shovel) \
)

View File

@@ -1,17 +1,14 @@
#define TRACKING_POSSIBLE 0
#define TRACKING_NO_COVERAGE 1
#define TRACKING_TERMINATE 2
/mob/living/silicon/ai/var/max_locations = 10
/mob/living/silicon/ai/var/stored_locations[0]
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
if(!T)
return 1
if(T.z == 2)
return 1
if(T.z > 6)
return 1
return 0
/proc/InvalidPlayerTurf(turf/T as turf)
return !(T && T.z in config.player_levels)
/mob/living/silicon/ai/proc/get_camera_list()
if(src.stat == 2)
return
@@ -64,7 +61,7 @@
return
var/L = src.eyeobj.getLoc()
if (InvalidTurf(get_turf(L)))
if (InvalidPlayerTurf(get_turf(L)))
src << "\red Unable to store this location"
return
@@ -107,38 +104,14 @@
var/list/cameras = list()
/mob/living/silicon/ai/proc/trackable_mobs()
if(usr.stat == 2)
return list()
var/datum/trackable/TB = new()
for(var/mob/living/M in mob_list)
// Easy checks first.
// Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
if(InvalidTurf(get_turf(M)))
continue
if(M == usr)
continue
if(M.invisibility)//cloaked
continue
if(M.digitalcamo)
continue
// Human check
var/human = 0
if(istype(M, /mob/living/carbon/human))
human = 1
var/mob/living/carbon/human/H = M
//Cameras can't track people wearing an agent card or a ninja hood.
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
continue
if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
if(helmet.prevent_track())
continue
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
if(!near_camera(M))
if(M.tracking_status() != TRACKING_POSSIBLE)
continue
var/name = M.name
@@ -148,7 +121,7 @@
else
TB.names.Add(name)
TB.namecounts[name] = 1
if(human)
if(istype(M, /mob/living/carbon/human))
TB.humans[name] = M
else
TB.others[name] = M
@@ -177,6 +150,7 @@
return
src << "Follow camera mode [forced ? "terminated" : "ended"]."
cameraFollow.tracking_cancelled()
cameraFollow = null
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob)
@@ -185,33 +159,21 @@
U.cameraFollow = target
U << "Now tracking [target.name] on camera."
target.tracking_initiated()
spawn (0)
while (U.cameraFollow == target)
if (U.cameraFollow == null)
return
if (istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
switch(target.tracking_status())
if(TRACKING_NO_COVERAGE)
U << "Target is not near any active cameras."
sleep(100)
continue
if(TRACKING_TERMINATE)
U.ai_cancel_tracking(1)
return
if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
if(helmet.prevent_track())
U.ai_cancel_tracking(1)
return
if(H.digitalcamo)
U.ai_cancel_tracking(1)
return
if(istype(target.loc,/obj/effect/dummy))
U.ai_cancel_tracking()
return
if (!trackable(target))
U << "Target is not near any active cameras."
sleep(100)
continue
if(U.eyeobj)
U.eyeobj.setLoc(get_turf(target), 0)
@@ -220,24 +182,6 @@
return
sleep(10)
/proc/near_camera(var/mob/living/M)
if (!isturf(M.loc))
return 0
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
return 0
else if(!cameranet.checkCameraVis(M))
return 0
return 1
/proc/trackable(var/mob/living/M)
var/turf/T = get_turf(M)
if(T && (T.z in config.station_levels) && hassensorlevel(M, SUIT_SENSOR_TRACKING))
return 1
return near_camera(M)
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
return
@@ -248,3 +192,87 @@
/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
ai_camera_list()
/proc/camera_sort(list/L)
var/obj/machinery/camera/a
var/obj/machinery/camera/b
for (var/i = L.len, i > 0, i--)
for (var/j = 1 to i - 1)
a = L[j]
b = L[j + 1]
if (a.c_tag_order != b.c_tag_order)
if (a.c_tag_order > b.c_tag_order)
L.Swap(j, j + 1)
else
if (sorttext(a.c_tag, b.c_tag) < 0)
L.Swap(j, j + 1)
return L
mob/living/proc/near_camera()
if (!isturf(loc))
return 0
else if(!cameranet.checkCameraVis(src))
return 0
return 1
/mob/living/proc/tracking_status()
// Easy checks first.
// Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
if(InvalidPlayerTurf(get_turf(src)))
return TRACKING_TERMINATE
if(invisibility >= INVISIBILITY_LEVEL_ONE) //cloaked
return TRACKING_TERMINATE
if(digitalcamo)
return TRACKING_TERMINATE
if(istype(loc,/obj/effect/dummy))
return TRACKING_TERMINATE
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
return near_camera() ? TRACKING_POSSIBLE : TRACKING_NO_COVERAGE
/mob/living/silicon/robot/tracking_status()
. = ..()
if(. == TRACKING_NO_COVERAGE)
return camera && camera.can_use() ? TRACKING_POSSIBLE : TRACKING_NO_COVERAGE
/mob/living/silicon/robot/syndicate/tracking_status()
return TRACKING_TERMINATE
/mob/living/carbon/human/tracking_status()
//Cameras can't track people wearing an agent card or a ninja hood.
if(wear_id && istype(wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
return TRACKING_TERMINATE
if(istype(head, /obj/item/clothing/head/helmet/space/rig))
var/obj/item/clothing/head/helmet/space/rig/helmet = head
if(helmet.prevent_track())
return TRACKING_TERMINATE
. = ..()
if(. == TRACKING_TERMINATE)
return
if(. == TRACKING_NO_COVERAGE)
var/turf/T = get_turf(src)
if(T && (T.z in config.station_levels) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
return TRACKING_POSSIBLE
mob/living/proc/tracking_initiated()
mob/living/silicon/robot/tracking_initiated()
tracking_entities++
if(tracking_entities == 1 && has_zeroth_law())
src << "<span class='warning'>Internal camera is currently being accessed.</span>"
mob/living/proc/tracking_cancelled()
mob/living/silicon/robot/tracking_initiated()
tracking_entities--
if(!tracking_entities && has_zeroth_law())
src << "<span class='notice'>Internal camera is no longer being accessed.</span>"
#undef TRACKING_POSSIBLE
#undef TRACKING_NO_COVERAGE
#undef TRACKING_TERMINATE

View File

@@ -15,7 +15,6 @@
circuit = /obj/item/weapon/circuitboard/security
var/camera_cache = null
attack_ai(var/mob/user as mob)
return attack_hand(user)
@@ -23,7 +22,7 @@
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
return null
if ( !current || !current.can_use() ) //camera doesn't work
current = null
reset_current()
user.reset_view(current)
return 1
@@ -102,7 +101,7 @@
else if(href_list["reset"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
current = null
reset_current()
usr.check_eye(current)
return 1
else
@@ -134,7 +133,7 @@
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
return 0
src.current = C
set_current(C)
check_eye(user)
use_power(50)
return 1
@@ -168,6 +167,27 @@
return
if(can_access_camera(jump_to))
switch_to_camera(user,jump_to)
/obj/machinery/computer/security/proc/set_current(var/obj/machinery/camera/C)
if(current == C)
return
if(current)
reset_current()
src.current = C
if(current)
var/mob/living/L = current.loc
if(istype(L))
L.tracking_initiated()
/obj/machinery/computer/security/proc/reset_current()
if(current)
var/mob/living/L = current.loc
if(istype(L))
L.tracking_cancelled()
current = null
//Camera control: mouse.
/atom/DblClick()
..()

View File

@@ -200,7 +200,7 @@
Reset()
..()
current = null
reset_current()
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
@@ -259,13 +259,13 @@
if("show" in href_list)
var/obj/machinery/camera/C = locate(href_list["show"])
if(istype(C) && C.status)
current = C
set_current(C)
usr.reset_view(C)
interact()
return
if("keyselect" in href_list)
current = null
reset_current()
usr.reset_view(null)
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
camera_list = null
@@ -277,6 +277,26 @@
usr << "The screen turns to static."
return
/datum/file/program/security/proc/set_current(var/obj/machinery/camera/C)
if(current == C)
return
if(current)
reset_current()
src.current = C
if(current)
var/mob/living/L = current.loc
if(istype(L))
L.tracking_initiated()
/datum/file/program/security/proc/reset_current()
if(current)
var/mob/living/L = current.loc
if(istype(L))
L.tracking_cancelled()
current = null
// Atlantis: Required for camnetkeys to work.
/datum/file/program/security/hidden
hidden_file = 1

View File

@@ -16,8 +16,6 @@
var/icon_off = "smartfridge-off"
var/icon_panel = "smartfridge-panel"
var/item_quants = list()
var/ispowered = 1 //starts powered
var/isbroken = 0
var/seconds_electrified = 0;
var/shoot_inventory = 0
var/locked = 0
@@ -26,7 +24,7 @@
var/is_secure = 0
var/datum/wires/smartfridge/wires = null
/obj/machinery/smartfridge/secure/
/obj/machinery/smartfridge/secure
is_secure = 1
/obj/machinery/smartfridge/New()
@@ -121,8 +119,39 @@
if(istype(O,/obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks) || istype(O,/obj/item/weapon/reagent_containers/food/condiment))
return 1
/obj/machinery/smartfridge/drying_rack
name = "\improper Drying Rack"
desc = "A machine for drying plants."
/obj/machinery/smartfridge/drying_rack/accept_check(var/obj/item/O as obj)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/))
var/obj/item/weapon/reagent_containers/food/snacks/S = O
if (S.dried_type)
return 1
return 0
/obj/machinery/smartfridge/drying_rack/process()
..()
if (contents.len)
dry()
/obj/machinery/smartfridge/drying_rack/proc/dry()
for(var/obj/item/weapon/reagent_containers/food/snacks/S in contents)
if(S.dried_type == S.type)
S.dry = 1
item_quants[S.name]--
S.name = "dried [S.name]"
S.loc = loc
else
var/D = S.dried_type
new D(loc)
item_quants[S.name]--
del(S)
return
return
/obj/machinery/smartfridge/process()
if(!src.ispowered)
if(stat & (BROKEN|NOPOWER))
return
if(src.seconds_electrified > 0)
src.seconds_electrified--
@@ -130,16 +159,16 @@
src.throw_item()
/obj/machinery/smartfridge/power_change()
var/old_stat = stat
..()
if( !(stat & NOPOWER) )
src.ispowered = 1
if(!isbroken)
icon_state = icon_on
if(old_stat != stat)
update_icon()
/obj/machinery/smartfridge/update_icon()
if(stat & (BROKEN|NOPOWER))
icon_state = icon_off
else
spawn(rand(0, 15))
src.ispowered = 0
if(!isbroken)
icon_state = icon_off
icon_state = icon_on
/*******************
* Item Adding
@@ -148,7 +177,7 @@
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance panel."
user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
overlays.Cut()
if(panel_open)
overlays += image(icon, icon_panel)
@@ -160,7 +189,7 @@
attack_hand(user)
return
if(!src.ispowered)
if(stat & NOPOWER)
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
return
@@ -175,13 +204,12 @@
item_quants[O.name]++
else
item_quants[O.name] = 1
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", \
"<span class='notice'>You add \the [O] to \the [src].")
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", "<span class='notice'>You add \the [O] to \the [src].")
nanomanager.update_uis(src)
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/P = O
else if(istype(O, /obj/item/weapon/storage/bag))
var/obj/item/weapon/storage/bag/P = O
var/plants_loaded = 0
for(var/obj/G in P.contents)
if(accept_check(G))
@@ -197,9 +225,7 @@
plants_loaded++
if(plants_loaded)
user.visible_message( \
"<span class='notice'>[user] loads \the [src] with \the [P].</span>", \
"<span class='notice'>You load \the [src] with \the [P].</span>")
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [P].</span>", "<span class='notice'>You load \the [src] with \the [P].</span>")
if(P.contents.len > 0)
user << "<span class='notice'>Some items are refused.</span>"
@@ -210,7 +236,7 @@
return 1
/obj/machinery/smartfridge/secure/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/weapon/card/emag))
if(istype(O, /obj/item/weapon/card/emag))
emagged = 1
locked = -1
user << "You short out the product lock on [src]."
@@ -222,7 +248,8 @@
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
if(!ispowered) return
if(stat & (NOPOWER|BROKEN))
return
wires.Interact(user)
ui_interact(user)
@@ -244,32 +271,32 @@
for (var/i=1 to length(item_quants))
var/K = item_quants[i]
var/count = item_quants[K]
if (count > 0)
if(count > 0)
items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
if (items.len > 0)
if(items.len > 0)
data["contents"] = items
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
ui.open()
/obj/machinery/smartfridge/Topic(href, href_list)
if (..()) return 0
if(..()) return 0
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
if (href_list["close"])
if(href_list["close"])
user.unset_machine()
ui.close()
return 0
if (href_list["vend"])
if(href_list["vend"])
var/index = text2num(href_list["vend"])
var/amount = text2num(href_list["amount"])
var/K = item_quants[index]
@@ -281,10 +308,10 @@
var/i = amount
for(var/obj/O in contents)
if (O.name == K)
if(O.name == K)
O.loc = loc
i--
if (i <= 0)
if(i <= 0)
return 1
return 1
@@ -319,9 +346,9 @@
*************************/
/obj/machinery/smartfridge/secure/Topic(href, href_list)
if(!ispowered) return 0
if (usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
if (!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
usr << "\red Access denied."
if(stat & (NOPOWER|BROKEN)) return 0
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
usr << "<span class='warning'>Access denied.</span>"
return 0
return ..()

View File

@@ -250,7 +250,7 @@
if ( istype(W,/obj/item/clothing/mask/gas ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/mask/cigarette ) )
if ( istype(W,/obj/item/clothing/mask/smokable/cigarette ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/head/syndicatefake ) )

View File

@@ -144,7 +144,7 @@
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
del(src)

View File

@@ -17,15 +17,15 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
return
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.u_equip(W)
W.loc = src
if (istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
processing_objects.Remove(cig)
@@ -61,14 +61,14 @@
return
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken

View File

@@ -99,7 +99,7 @@ RSF
product = new /obj/item/weapon/storage/pill_bottle/dice()
used_energy = 200
if(6)
product = new /obj/item/clothing/mask/cigarette()
product = new /obj/item/clothing/mask/smokable/cigarette()
used_energy = 10
user << "Dispensing [product ? product : "product"]..."

View File

@@ -16,6 +16,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame
var/lit = 0
/proc/isflamesource(A)
if(istype(A, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = A
return (WT.isOn())
else if(istype(A, /obj/item/weapon/flame))
var/obj/item/weapon/flame/F = A
return (F.lit)
else if(istype(A, /obj/item/device/assembly/igniter))
return 1
return 0
///////////
//MATCHES//
///////////
@@ -61,85 +72,55 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//////////////////
//FINE SMOKABLES//
//////////////////
/obj/item/clothing/mask/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
/obj/item/clothing/mask/smokable
name = "smokable item"
desc = "You're not sure what this is. You should probably ahelp it."
body_parts_covered = 0
attack_verb = list("burnt", "singed")
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
body_parts_covered = 0
var/icon_on
var/icon_off
var/type_butt = null
var/chem_volume = 0
var/smoketime = 0
var/matchmes = "USER lights NAME with FLAME"
var/lightermes = "USER lights NAME with FLAME"
var/zippomes = "USER lights NAME with FLAME"
var/weldermes = "USER lights NAME with FLAME"
var/ignitermes = "USER lights NAME with FLAME"
/obj/item/clothing/mask/cigarette/New()
/obj/item/clothing/mask/smokable/New()
..()
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
/obj/item/clothing/mask/cigarette/Del()
/obj/item/clothing/mask/smokable/Del()
..()
del(reagents)
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W].</span>")
/obj/item/clothing/mask/smokable/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
die()
return
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
if(istype(C, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C
if(H.species.flags & IS_SYNTHETIC)
return
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
if(L.lit)
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/match))
var/obj/item/weapon/flame/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/melee/energy/sword))
var/obj/item/weapon/melee/energy/sword/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
user.update_inv_r_hand(1)
reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons.
reagents.reaction(C)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity) return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
damtype = "fire"
@@ -159,61 +140,116 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
if(ismob(loc))
var/mob/living/M = loc
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
var/turf/T = get_turf(src)
if (type_butt)
var/obj/item/butt = new type_butt(T)
transfer_fingerprints_to(butt)
if(ismob(loc))
var/mob/living/M = loc
if (!nomessage)
M << "<span class='notice'>Your [name] goes out.</span>"
M.u_equip(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
processing_objects.Remove(src)
del(src)
else
new /obj/effect/decal/cleanable/ash(T)
if(ismob(loc))
var/mob/living/M = loc
if (!nomessage)
M << "<span class='notice'>Your [name] goes out, and you empty the ash.</span>"
lit = 0
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
processing_objects.Remove(src)
/obj/item/clothing/mask/cigarette/process()
if(isliving(loc))
var/mob/living/M = loc
M.IgniteMob()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
die()
return
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
if(H.species.flags & IS_SYNTHETIC)
return
var/mob/living/carbon/C = loc
/obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(isflamesource(W))
var/text = matchmes
if(istype(W, /obj/item/weapon/flame/match))
text = matchmes
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
text = zippomes
else if(istype(W, /obj/item/weapon/flame/lighter))
text = lightermes
else if(istype(W, /obj/item/weapon/weldingtool))
text = weldermes
else if(istype(W, /obj/item/device/assembly/igniter))
text = ignitermes
text = replacetext(text, "USER", "[user]")
text = replacetext(text, "NAME", "[name]")
text = replacetext(text, "FLAME", "[W.name]")
light(text)
/obj/item/clothing/mask/smokable/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
attack_verb = list("burnt", "singed")
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
icon_off = "cigoff"
type_butt = /obj/item/weapon/cigbutt
chem_volume = 15
smoketime = 300
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to light their NAME with FLAME.</span>"
zippomes = "<span class='rose'>With a flick of their wrist, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER casually lights the NAME with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME.</span>"
/obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/melee/energy/sword))
var/obj/item/weapon/melee/energy/sword/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
if(prob(15)) // so it's not an instarape in case of acid
reagents.reaction(C, INGEST)
reagents.trans_to(C, REAGENTS_METABOLISM)
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/smokable/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
..()
if(!proximity)
return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
die()
die(1)
return ..()
/obj/item/clothing/mask/cigarette/proc/die()
var/turf/T = get_turf(src)
var/obj/item/butt = new type_butt(T)
transfer_fingerprints_to(butt)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
M.u_equip(src) //un-equip it so the overlays can update
M.update_inv_wear_mask(0)
processing_objects.Remove(src)
del(src)
////////////
// CIGARS //
////////////
/obj/item/clothing/mask/cigarette/cigar
/obj/item/clothing/mask/smokable/cigarette/cigar
name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigar2off"
@@ -224,15 +260,20 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = "cigaroff"
smoketime = 1500
chem_volume = 20
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to offend their NAME by lighting it with FLAME.</span>"
zippomes = "<span class='rose'>With a flick of their wrist, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER insults NAME by lighting it with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME with the power of science.</span>"
/obj/item/clothing/mask/cigarette/cigar/cohiba
/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
/obj/item/clothing/mask/cigarette/cigar/havana
/obj/item/clothing/mask/smokable/cigarette/cigar/havana
name = "premium Havanian cigar"
desc = "A cigar fit for only the best of the best."
icon_state = "cigar2off"
@@ -260,50 +301,33 @@ CIGARETTE PACKETS ARE IN FANCY.DM
desc = "A manky old cigar butt."
icon_state = "cigarbutt"
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())
light("<span class='notice'>[user] insults [name] by lighting it with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
if(L.lit)
light("<span class='notice'>[user] manages to offend their [name] by lighting it with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/match))
var/obj/item/weapon/flame/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/melee/energy/sword))
var/obj/item/weapon/melee/energy/sword/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name] with the power of science.</span>")
/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
/////////////////
//SMOKING PIPES//
/////////////////
/obj/item/clothing/mask/cigarette/pipe
/obj/item/clothing/mask/smokable/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
icon_state = "pipeoff"
item_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
icon_off = "pipeoff"
smoketime = 100
smoketime = 0
chem_volume = 50
matchmes = "<span class='notice'>USER lights their NAME with their FLAME.</span>"
lightermes = "<span class='notice'>USER manages to light their NAME with FLAME.</span>"
zippomes = "<span class='rose'>With much care, USER lights their NAME with their FLAME.</span>"
weldermes = "<span class='notice'>USER recklessly lights NAME with FLAME.</span>"
ignitermes = "<span class='notice'>USER fiddles with FLAME, and manages to light their NAME with the power of science.</span>"
/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
/obj/item/clothing/mask/smokable/pipe/New()
..()
name = "empty [initial(name)]"
/obj/item/clothing/mask/smokable/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit && src.smoketime)
src.lit = 1
damtype = "fire"
icon_state = icon_on
@@ -311,72 +335,55 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
/obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
new /obj/effect/decal/cleanable/ash(location)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out, and you empty the ash.</span>"
lit = 0
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
M.update_inv_l_hand(0)
M.update_inv_r_hand(1)
/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("<span class='notice'>[user] puts out [src].</span>")
user.visible_message("<span class='notice'>[user] puts out [src].</span>", "<span class='notice'>You put out [src].</span>")
lit = 0
icon_state = icon_off
item_state = icon_off
processing_objects.Remove(src)
else if (smoketime)
var/turf/location = get_turf(user)
user.visible_message("<span class='notice'>[user] empties out [src].</span>", "<span class='notice'>You empty out [src].</span>")
new /obj/effect/decal/cleanable/ash(location)
smoketime = 0
reagents.clear_reagents()
name = "empty [initial(name)]"
/obj/item/clothing/mask/smokable/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/melee/energy/sword))
return
if(smoketime <= 0)
user << "<span class='notice'>You refill the pipe with tobacco.</span>"
smoketime = initial(smoketime)
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//
light("<span class='notice'>[user] recklessly lights [name] with [W].</span>")
..()
else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
var/obj/item/weapon/flame/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With much care, [user] lights their [name] with their [W].</span>")
if (istype(W, /obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = W
if (!G.dry)
user << "<span class='notice'>[G] must be dried before you stuff it into [src].</span>"
return
if (smoketime)
user << "<span class='notice'>[src] is already packed.</span>"
return
smoketime = 1000
if(G.reagents)
G.reagents.trans_to(src, G.reagents.total_volume)
name = "[G.name]-packed [initial(name)]"
del(G)
else if(istype(W, /obj/item/weapon/flame/lighter))
var/obj/item/weapon/flame/lighter/L = W
if(L.lit)
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/flame/match))
var/obj/item/weapon/flame/match/M = W
if(M.lit)
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name] with the power of science.</span>")
/obj/item/clothing/mask/cigarette/pipe/cobpipe
/obj/item/clothing/mask/smokable/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
smoketime = 400
chem_volume = 35
/////////
//ZIPPO//
@@ -452,8 +459,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
M.IgniteMob()
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/smokable/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
else

View File

@@ -141,7 +141,7 @@
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
new /obj/item/clothing/mask/cigarette(src)
new /obj/item/clothing/mask/smokable/cigarette(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
/obj/item/weapon/storage/fancy/cigarettes/Del()
@@ -154,7 +154,7 @@
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/cigarette/C = W
var/obj/item/clothing/mask/smokable/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -164,7 +164,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
@@ -197,7 +197,7 @@
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
new /obj/item/clothing/mask/cigarette/cigar(src)
new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
create_reagents(15 * storage_slots)
/obj/item/weapon/storage/fancy/cigar/Del()
@@ -209,7 +209,7 @@
return
/obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/cigarette/cigar/C = W
var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
if(!istype(C)) return
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -219,7 +219,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/cigar/W = new /obj/item/clothing/mask/cigarette/cigar(user)
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len

View File

@@ -25,6 +25,15 @@
return (new build_path(src.loc))
/obj/random/single
name = "randomly spawned object"
desc = "This item type is used to randomly spawn a given object at round-start"
icon_state = "x3"
var/spawn_object = null
item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/tool
name = "random tool"
desc = "This is a random tool"

View File

@@ -834,7 +834,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(M), slot_r_store)

View File

@@ -223,7 +223,7 @@
corpsesuit = /obj/item/clothing/suit/armor/bulletproof
corpseradio = /obj/item/device/radio/headset/heads/captain
corpseglasses = /obj/item/clothing/glasses/eyepatch
corpsemask = /obj/item/clothing/mask/cigarette/cigar/cohiba
corpsemask = /obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
corpsehelmet = /obj/item/clothing/head/centhat
corpsegloves = /obj/item/clothing/gloves/swat
corpseshoes = /obj/item/clothing/shoes/swat

View File

@@ -10,6 +10,7 @@
heat_protection = HEAD|FACE|EYES
cold_protection = HEAD|FACE|EYES
brightness_on = 4
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/helmet.dmi',"Skrell" = 'icons/mob/species/skrell/helmet.dmi',"Unathi" = 'icons/mob/species/unathi/helmet.dmi')
species_restricted = null
/obj/item/clothing/gloves/rig
@@ -40,6 +41,7 @@
slowdown = 0
breach_threshold = 35
can_breach = 1
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
supporting_limbs = list()
//TODO: move this to modules

View File

@@ -180,6 +180,6 @@
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
del(src)
return

View File

@@ -183,7 +183,8 @@ proc/populate_seed_list()
list("seed-cocoapod", "cocoapod"),
list("seed-cherry", "cherry"),
list("seed-kudzu", "kudzu"),
list("seed-replicapod", "replicapod")
list("seed-replicapod", "replicapod"),
list("seed-tobacco", "tobacco")
))
packet_icon = plant_icons[1]
@@ -1559,6 +1560,22 @@ proc/populate_seed_list()
potency = 10
growth_stages = 5
/datum/seed/tobacco
name = "tobacco"
seed_name = "tobacco"
display_name = "tobacco plant"
packet_icon = "seed-tobacco"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco)
plant_icon = "tobacco"
chems = list("nutriment" = list(1), "nicotine" = list(1,10))
lifespan = 50
maturation = 5
production = 5
yield = 4
potency = 10
growth_stages = 3
/datum/seed/kudzu
name = "kudzu"
seed_name = "kudzu"

View File

@@ -40,12 +40,12 @@
/obj/machinery/seed_storage/garden
name = "Garden seed storage"
scanner = list("stats")
starting_seeds = list(/obj/item/seeds/appleseed = 3, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
starting_seeds = list(/obj/item/seeds/appleseed = 3, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
/obj/machinery/seed_storage/xenobotany
name = "Xenobotany seed storage"
scanner = list("stats", "produce", "soil", "temperature", "light", "mutants")
starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
/obj/machinery/seed_storage/attack_hand(mob/user as mob)
user.set_machine(src)

View File

@@ -229,5 +229,8 @@
/obj/item/seeds/cherryseed
seed_type = "cherry"
/obj/item/seeds/tobaccoseed
seed_type = "tobacco"
/obj/item/seeds/kudzuseed
seed_type = "kudzu"

View File

@@ -404,14 +404,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
/mob/dead/observer/verb/toggle_darkness()
set name = "Toggle Darkness"
/mob/dead/observer/verb/toggle_sight()
set name = "Toggle Sight"
set category = "Ghost"
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
else
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
switch(see_invisible)
if(SEE_INVISIBLE_OBSERVER_AI_EYE)
see_invisible = SEE_INVISIBLE_OBSERVER_NOOBSERVERS
usr << "<span class='notice'>You no longer see other observers or the AI eye.</span>"
if(SEE_INVISIBLE_OBSERVER_NOOBSERVERS)
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
usr << "<span class='notice'>You no longer see darkness.</span>"
else
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
usr << "<span class='notice'>You again see everything.</span>"
/mob/dead/observer/verb/become_mouse()
set name = "Become mouse"

View File

@@ -791,7 +791,7 @@ proc/get_damage_icon_part(damage_state, body_part)
else
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA )
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
bloodsies.color = wear_mask.blood_color
standing.overlays += bloodsies

View File

@@ -33,7 +33,7 @@
var/now_pushing = null
var/cameraFollow = null
var/mob/living/cameraFollow = null
var/tod = null // Time of death
var/update_slimes = 1
@@ -41,3 +41,4 @@
var/mob_size // Used by lockers.
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks

View File

@@ -2,10 +2,18 @@
if (!src.laws)
laws = new base_law_type
/mob/living/silicon/proc/has_zeroth_law()
return laws.zeroth
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg)
laws_sanity_check()
laws.set_zeroth_law(law, law_borg)
/mob/living/silicon/robot/set_zeroth_law(var/law, var/law_borg)
..()
if(tracking_entities)
src << "<span class='warning'>Internal camera is currently being accessed.</span>"
/mob/living/silicon/proc/add_inherent_law(var/law)
laws_sanity_check()
laws.add_inherent_law(law)

View File

@@ -81,6 +81,7 @@ var/list/robot_verbs_default = list(
var/lockcharge //Used when locking down a borg to preserve cell charge
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/tracking_entities = 0 //The number of known entities currently accessing the internal camera
var/braintype = "Cyborg"
/mob/living/silicon/robot/syndicate

View File

@@ -21,7 +21,7 @@
user << "\red [target] is full."
return
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/cigarette)) //You can inject humans and food but you cant remove the shit.
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit.
user << "\red You cannot directly fill this object."
return

View File

@@ -9,6 +9,8 @@
var/trash = null
var/slice_path
var/slices_num
var/dried_type = null
var/dry = 0
center_of_mass = list("x"=15, "y"=15)
w_class = 2

View File

@@ -17,10 +17,14 @@
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
dried_type = -1
/obj/item/weapon/reagent_containers/food/snacks/grown/New()
..()
if (dried_type == -1)
dried_type = src.type
//Handle some post-spawn var stuff.
spawn(1)
// Fill the object up with the appropriate reagents.
@@ -455,6 +459,13 @@
filling_color = "#59691B"
plantname = "kudzu"
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco
name = "tobacco leaf"
desc = "Contains nicotine."
icon_state = "tobacco"
filling_color = "#009900"
plantname = "tobacco"
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
name = "ice-pepper"
desc = "It's a mutant strain of chili"

View File

@@ -194,7 +194,7 @@
if(80 to 90) filling.icon_state = "[icon_state]80"
if(91 to INFINITY) filling.icon_state = "[icon_state]100"
filling.icon += mix_color_from_reagents(reagents.reagent_list)
filling.color = mix_color_from_reagents(reagents.reagent_list)
overlays += filling
if (!is_open_container())

View File

@@ -48,7 +48,7 @@
if(80 to 90) filling.icon_state = "[icon_state]-80"
if(91 to INFINITY) filling.icon_state = "[icon_state]-100"
filling.icon += mix_color_from_reagents(reagents.reagent_list)
filling.color = mix_color_from_reagents(reagents.reagent_list)
overlays += filling
if (!is_open_container())

View File

@@ -130,7 +130,7 @@
if(istype(target, /obj/item/weapon/implantcase/chem))
return
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
user << "\red You cannot directly fill this object."
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
@@ -221,7 +221,7 @@
filling.icon_state = "syringe[rounded_vol]"
filling.icon += mix_color_from_reagents(reagents.reagent_list)
filling.color = mix_color_from_reagents(reagents.reagent_list)
overlays += filling

View File

@@ -113,7 +113,7 @@
/datum/surgery_step/eye/cauterize
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -103,7 +103,7 @@
/datum/surgery_step/face/cauterize
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -239,7 +239,7 @@
/datum/surgery_step/generic/cauterize
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -119,7 +119,7 @@
/datum/surgery_step/head/prepare
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -70,7 +70,7 @@
priority = 2
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -93,7 +93,7 @@
/datum/surgery_step/limb/prepare
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/clothing/mask/smokable/cigarette = 75, \
/obj/item/weapon/flame/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)

View File

@@ -475,6 +475,7 @@
#define SEE_INVISIBLE_OBSERVER_NOLIGHTING 15
#define SEE_INVISIBLE_LEVEL_ONE 35
#define SEE_INVISIBLE_LEVEL_TWO 45
#define SEE_INVISIBLE_OBSERVER_NOOBSERVERS 59
#define SEE_INVISIBLE_OBSERVER 60
#define SEE_INVISIBLE_OBSERVER_AI_EYE 61
@@ -484,7 +485,7 @@
// Object specific defines.
#define CANDLE_LUM 3 // For how bright candles are.
// Some mob defines below.
//Some mob defines below
#define AI_CAMERA_LUMINOSITY 6
#define BORGMESON 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -810,7 +810,7 @@
"pD" = (/obj/structure/table,/obj/machinery/recharger{pixel_y = 4},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom)
"pE" = (/obj/machinery/cell_charger,/obj/structure/table/reinforced{icon_state = "table"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom)
"pF" = (/turf/unsimulated/wall,/area/centcom/living)
"pG" = (/obj/machinery/vending/cigarette{contraband = newlist(); premium = newlist(); prices = list(/obj/item/weapon/storage/fancy/cigarettes = 15, /obj/item/weapon/storage/box/matches = 1, /obj/item/weapon/flame/lighter/zippo = 4, /obj/item/clothing/mask/cigarette/cigar/havana = 20); products = list(/obj/item/weapon/storage/fancy/cigarettes = 10, /obj/item/weapon/storage/box/matches = 10, /obj/item/weapon/flame/lighter/zippo = 4, /obj/item/clothing/mask/cigarette/cigar/havana = 2)},/turf/simulated/shuttle/floor{icon_state = "floor6"},/area/syndicate_station/start)
"pG" = (/obj/machinery/vending/cigarette{contraband = newlist(); premium = newlist(); prices = list(/obj/item/weapon/storage/fancy/cigarettes = 15, /obj/item/weapon/storage/box/matches = 1, /obj/item/weapon/flame/lighter/zippo = 4, /obj/item/clothing/mask/smokable/cigarette/cigar/havana = 20); products = list(/obj/item/weapon/storage/fancy/cigarettes = 10, /obj/item/weapon/storage/box/matches = 10, /obj/item/weapon/flame/lighter/zippo = 4, /obj/item/clothing/mask/smokable/cigarette/cigar/havana = 2)},/turf/simulated/shuttle/floor{icon_state = "floor6"},/area/syndicate_station/start)
"pH" = (/obj/structure/stool/bed/chair{dir = 8},/obj/machinery/flasher_button{id = "syndieflash"; name = "Flasher"; pixel_x = 27; pixel_y = 0; tag = "permflash"},/turf/simulated/shuttle/floor{icon_state = "floor6"},/area/syndicate_station/start)
"pI" = (/obj/machinery/suit_cycler/syndicate{locked = 0},/turf/simulated/shuttle/floor{icon_state = "floor6"},/area/syndicate_station/start)
"pJ" = (/obj/structure/table,/obj/machinery/computer/pod/old/syndicate{id = "smindicate"},/obj/machinery/door/window{dir = 4; name = "Blast Door Control"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor6"},/area/syndicate_station/start)
@@ -1312,7 +1312,7 @@
"zl" = (/obj/structure/table/reinforced,/obj/item/weapon/storage/belt/medical,/obj/item/weapon/storage/belt/medical,/obj/item/weapon/storage/belt/medical,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline,/obj/item/weapon/reagent_containers/hypospray,/obj/item/weapon/reagent_containers/hypospray,/obj/item/weapon/reagent_containers/hypospray,/obj/item/weapon/storage/box/syringes,/turf/unsimulated/floor{icon_state = "vault"; dir = 1},/area/centcom)
"zm" = (/obj/machinery/portable_atmospherics/powered/scrubber,/turf/unsimulated/floor{icon_state = "vault"; dir = 1},/area/centcom)
"zn" = (/obj/machinery/door/airlock/external{frequency = 1380; icon_state = "door_locked"; id_tag = "specops_centcom_dock_door"; locked = 1},/turf/unsimulated/floor{icon_state = "vault"; dir = 5},/area/centcom)
"zo" = (/obj/structure/table/woodentable{dir = 9},/obj/item/weapon/reagent_containers/food/drinks/flask,/obj/item/clothing/mask/cigarette/cigar/havana,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
"zo" = (/obj/structure/table/woodentable{dir = 9},/obj/item/weapon/reagent_containers/food/drinks/flask,/obj/item/clothing/mask/smokable/cigarette/cigar/havana,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
"zp" = (/obj/machinery/computer/security/telescreen{name = "Spec. Ops. Monitor"; network = list("ERT")},/obj/structure/table/woodentable{dir = 5},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
"zq" = (/obj/structure/table/woodentable{dir = 5},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
"zr" = (/obj/machinery/computer/card/centcom,/obj/item/weapon/card/id/centcom,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)