Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Loafing #391

Merged
merged 15 commits into from
Oct 16, 2023
7 changes: 6 additions & 1 deletion _maps/map_files/Deltastation/DeltaStation2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -84361,6 +84361,11 @@
},
/turf/open/floor/iron,
/area/station/commons/dorms)
"uCq" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/spawner/random/loafer,
/turf/open/floor/plating,
/area/station/maintenance/department/security)
"uCt" = (
/obj/effect/spawner/random/structure/chair_maintenance{
dir = 1
Expand Down Expand Up @@ -151776,7 +151781,7 @@ adM
uHP
dth
fws
vHY
uCq
rYA
vHY
hie
Expand Down
9 changes: 8 additions & 1 deletion _maps/map_files/IceBoxStation/IceBoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -30106,6 +30106,13 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/iron,
/area/mine/production)
"jLk" = (
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/effect/spawner/random/loafer,
/turf/open/floor/plating,
/area/station/security/prison/safe)
"jLl" = (
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden,
/obj/effect/turf_decal/siding/yellow{
Expand Down Expand Up @@ -170915,7 +170922,7 @@ wRa
vVH
nRO
ulz
ulz
jLk
ulz
pNm
eOz
Expand Down
6 changes: 5 additions & 1 deletion _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -39676,6 +39676,10 @@
/obj/machinery/duct,
/turf/open/floor/plating,
/area/station/maintenance/port/aft)
"omE" = (
/obj/effect/spawner/random/loafer,
/turf/open/floor/plating,
/area/station/maintenance/port/fore)
"omF" = (
/obj/machinery/teleport/station,
/obj/machinery/status_display/evac/directional/north,
Expand Down Expand Up @@ -90451,7 +90455,7 @@ aaa
bxr
jXu
rOz
sHu
omE
siY
jXu
aaa
Expand Down
1 change: 1 addition & 0 deletions _maps/map_files/tramstation/tramstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -61887,6 +61887,7 @@
/turf/open/floor/iron/white,
/area/station/medical/storage)
"sQY" = (
/obj/effect/spawner/random/loafer,
/turf/open/floor/iron/smooth,
/area/station/maintenance/department/eva)
"sQZ" = (
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
/// Yes I know this is a stupid flag, no you can't take him from me
#define DECAL_INIT_UPDATE_EXPERIENCED_1 (1<<20)

/// Used for items that cannot be used directly to harm people with, ex. loafs
#define CANNOT_ATTACK_WITH (1<<21)

// Update flags for [/atom/proc/update_appearance]
/// Update the atom's name
#define UPDATE_NAME (1<<0)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/throwing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ SUBSYSTEM_DEF(throwing)
if (callback)
callback.Invoke()

if(!thrownthing.currently_z_moving) // I don't think you can zfall while thrown but hey, just in case.
if(!thrownthing?.currently_z_moving) // I don't think you can zfall while thrown but hey, just in case.
var/turf/T = get_turf(thrownthing)
T?.zFall(thrownthing)

Expand Down
7 changes: 6 additions & 1 deletion code/datums/components/food/edible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ Behavior that's still missing from this component that original food items had t

var/atom/owner = parent

if((feeder.istate & ISTATE_HARM))
var/obj/item/food/foodstuff

if(istype(owner, /obj/item/food))
foodstuff = owner

if((feeder.istate & ISTATE_HARM) && !(foodstuff?.force_feed_on_aggression)) //monkestation edit - add loafing
return

. = COMPONENT_CANCEL_ATTACK_CHAIN //Point of no return I suppose
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/food/_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
var/decomp_req_handle = FALSE
///Used to set custom decomposition times for food. Set to 0 to have it automatically set via the food's flags.
var/decomposition_time = 0

///If we want to still force feed food even on combat mode or harm intent - monkestation edit
var/force_feed_on_aggression = FALSE
///The food buffs the food has
var/food_buffs = STATUS_EFFECT_FOOD_STAM_MEDIUM

Expand Down
41 changes: 41 additions & 0 deletions monkestation/code/modules/loafing/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Title: <!--Title of your addition-->

<!-- uppercase, underscore_connected name of your module, that you use to mark files-->
MODULE ID: LOAFING

### Description:

This module adds a loafing mechanic.

<!-- Here, try to describe what your PR does, what features it provides and any other directly useful information -->

### TG Proc/File Changes:

changed /datum/component/edible/proc/TryToEat(mob/living/eater, mob/living/feeder) in edible.dm
changed _food.dm


<!-- If you had to edit, or append to any core procs in the process of making this PR, list them here. APPEND: Also, please include any files that you've changed. .DM files that is. -->

### Defines:

<!-- If you needed to add any defines, mention the files you added those defines in -->


### Master file additions

- N/A
<!-- Any master file changes you've made to existing master files or if you've added a new master file. Please mark either as #NEW or #CHANGE -->

### Included files that are not contained in this module:

- N/A
<!-- Likewise, be it a non-modular file or a modular one that's not contained within the folder belonging to this specific module, it should be mentioned here -->

### Credits:

<!-- Here go the credits to you, dear coder, and in case of collaborative work or ports, credits to the original source of the code -->
<!-- Orignal Coders -->
Code and sprites done by Lmenvs. Concept from Goon.
<!-- Orignal Coders -->

Loading
Loading