Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TaculoTaculo committed Jan 16, 2024
2 parents dce05a3 + 690ab2a commit 14e5895
Show file tree
Hide file tree
Showing 602 changed files with 476,205 additions and 298,954 deletions.
Binary file modified ModularTegustation/Teguicons/32x32.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/64x48.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/64x64.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/lc13icons.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/status_sprites.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/tegu_effects.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/teguitems.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/tegumobs.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/toolabnormalities.dmi
Binary file not shown.
62 changes: 62 additions & 0 deletions ModularTegustation/fishing/code/fishing_items/fishing_boat.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* Fishing Boats for traversing deep water turf without sinking.
Depends on the fishing deep water turfs code,
riding_vehicle.dm, and lavaboat.dm. */

/datum/crafting_recipe/simple_boat
name = "One Person Boat"
result = /obj/vehicle/ridden/simple_boat
reqs = list(/obj/item/stack/sheet/mineral/wood = 250)
time = 50
category = CAT_MISC
/* Honestly later on if we need boats for a larger amount of people we may have to go
the same method that final fantasy games did and just have several people be able
to sit in a 1 tile 48 or 64 pixel sized boat. -IP */
/obj/vehicle/ridden/simple_boat
name = "dinghy"
desc = "A one person boat for traversing the waters. Can be renamed with a pen. May require an oar to be installed into it for sailing."
icon_state = "goliath_boat"
icon = 'icons/obj/lavaland/dragonboat.dmi'
//Set this and the component keytype to null to make it not require a key.
key_type = /obj/item/boat_oar
can_buckle = TRUE
//People can rename it with a pen when it has this.
obj_flags = UNIQUE_RENAME
/* This variable is apparently used for a typecache on what
types the boat can sail on. So all subtypes of water? -IP */
var/allowed_turf = /turf/open/water

/obj/vehicle/ridden/simple_boat/Initialize()
. = ..()
AddElement(/datum/element/ridable, /datum/component/riding/vehicle/lavaboat/simple_boat)

//Code Stolen from riding_vehicle.dm
/datum/component/riding/vehicle/lavaboat/simple_boat
//Remove keytype from this and the simple boat to make it not require anything to move.
keytype = /obj/item/boat_oar
allowed_turf = /turf/open/water

//Stolen from lavalandboat.dm
/obj/item/boat_oar
name = "dinghy oar"
desc = "Used for sailing one person boats. Can be dissasembled back into wood using a knife."
icon = 'icons/obj/vehicles.dmi'
icon_state = "oar"
inhand_icon_state = "oar"
lefthand_file = 'icons/mob/inhands/misc/lavaland_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/lavaland_righthand.dmi'
force = 12
w_class = WEIGHT_CLASS_NORMAL

/obj/item/boat_oar/attackby(obj/item/attacking_item, mob/user, params)
var/sharpthing = attacking_item.get_sharpness()
if(sharpthing == SHARP_EDGED && attacking_item.force >= 5)
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
return qdel(src)
return ..()

/datum/crafting_recipe/boat_oar
name = "Boat Oar"
result = /obj/item/boat_oar
reqs = list(/obj/item/stack/sheet/mineral/wood = 2)
time = 15
category = CAT_MISC
191 changes: 145 additions & 46 deletions ModularTegustation/fishing/code/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/turf/open/water/deep
name = "water"
desc = "Deep Water."
icon = 'ModularTegustation/Teguicons/32x32.dmi'
icon = 'icons/turf/floors/water.dmi'
icon_state = "water_turf1"
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
//This is mostly for AI. CanAllowThrough still makes it passable.
Expand All @@ -13,94 +13,186 @@
This is a variable because some people may want water to work as
a portal to somewhere.*/
var/turf/target_turf
//If the turf is safe (wont make you sink when you enter it)
var/safe = FALSE
//If the target_turf is randomized.
var/static_target = FALSE
//Sound delay so we dont get splash spam.
var/sound_delay = 0
//Lootlist of things for fishing.
var/list/environment = list(/obj/item/food/grown/harebell = 200)
var/list/static/forbidden_types = typecacheof(list(
//Things that just cant sink. Dont bother trying to sink them.
var/static/list/cant_sink_types = typecacheof(list(
/obj/effect,
/obj/singularity,
/obj/energy_ball,
/obj/narsie,
/obj/docking_port,
/obj/item/jammer/self_activated,
/obj/structure/lattice,
/obj/structure/stone_tile,
/obj/projectile,
/obj/effect/projectile,
/obj/effect/portal,
/obj/effect/abstract,
/obj/effect/hotspot,
/obj/effect/landmark,
/obj/effect/temp_visual,
/obj/effect/light_emitter/tendril,
/obj/effect/collapse,
/obj/effect/particle_effect/ion_trails,
/obj/effect/dummy/phased_mob,
/obj/effect/yinyang_dragon
))

/turf/open/water/deep/Initialize()
. = ..()
WashedOnTheShore()

/* These three procs are stolen from lava.dm. Basically when something enters the turf starts processing
and checking if the thing can have the turfs ability used on it IE melting things. If sink stuff returns
False it stops checking and accepts that the thing is immune to its ability. If it returns true it will
use its ability until that thing is gone.*/
/turf/open/water/deep/Entered(atom/movable/AM)
if(is_type_in_typecache(AM, cant_sink_types))
return
if(SinkStuff(AM))
START_PROCESSING(SSobj, src)

/turf/open/water/deep/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(is_type_in_typecache(AM, cant_sink_types))
return
if(SinkStuff(AM))
START_PROCESSING(SSobj, src)

/turf/open/water/deep/process(delta_time)
if(!SinkStuff(null, delta_time))
STOP_PROCESSING(SSobj, src)

//This is to prevent Mob AI from just walking into it. Works some of the time. -IP
/turf/open/water/deep/CanAllowThrough(atom/movable/AM, turf/target)
. = ..()
return TRUE

//For fishing nets.
/turf/open/water/deep/attackby(obj/item/C, mob/user, params)
if(istype(C, /obj/item/fishing_net) && params)
to_chat(user, "<span class='notice'>You start setting up the [C].</span>")
to_chat(user, span_notice("You start setting up the [C]."))
if(do_after(user, 2 SECONDS, target = user) && C && !locate(/obj/structure/destructible/fishing_net) in src)
new /obj/structure/destructible/fishing_net(get_turf(src))
playsound(get_turf(src), 'sound/misc/box_deploy.ogg', 5, 0, 3)
qdel(C)
return
..()

/turf/open/water/deep/Entered(atom/movable/thing, atom/oldLoc) //Sinking Code
. = ..()
if(safe) // if this turf is in fact safe (currently only used for piscine mermaid)
return
if(!target_turf || is_type_in_typecache(thing, forbidden_types) || (thing.throwing && !istype(thing, /obj/item/food/fish || /obj/item/aquarium_prop )) || (thing.movement_type & (FLOATING|FLYING))) //replace this with a varient of chasm component sometime.
return
if(isliving(thing))
var/mob/living/L = thing
if(L.movement_type & FLYING)
return
//100 brute damage to living mobs. If they are human add 50 oxygen damage to them.
L.adjustBruteLoss(100)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.Paralyze(30)
H.adjustOxyLoss(50)
visible_message("<span class='boldwarning'>[H] sinks into the deep!</span>")
to_chat(H, pick("<span class='userdanger'>Something in the [src] grabs you and pulls you into the darkness. Your eyes burn as the light becomes fainter and the deep darkness begins circle around you.</span>", "<span class='userdanger'>The fluid around you starts crawling into your mouth.</span>", "<span class='userdanger'>You feel a sudden sting, then everything goes numb.</span>"))
//Things that become lost in the deep. Objects like fish can be thrown into the deep. However some objects result in pollution.
else if(isitem(thing) || istype(thing, /obj/effect/decal/cleanable))
if(istype(thing, /obj/item/food/fish/emulsijack) && !istype(src, /turf/open/water/deep/polluted))
//Become polluted.
TerraformTurf(/turf/open/water/deep/polluted)
qdel(thing)
//This IsSafe proc checks if there is a structure in place that will prevent the proc after this from running.
/turf/open/water/deep/proc/IsSafe()
//if anything matching this typecache is found in the lava, we don't burn things
var/static/list/water_safeties_typecache = typecacheof(list(
/obj/vehicle/ridden/lavaboat,
/obj/vehicle/ridden/simple_boat,
/obj/structure/lattice/catwalk,
/obj/structure/stone_tile,
/obj/structure/lattice/lava,
//If anyone asks yes walking on nets is SORT of intended. -IP
/obj/structure/destructible/fishing_net
))
var/list/found_safeties = typecache_filter_list(contents, water_safeties_typecache)
return LAZYLEN(found_safeties)

//If this proc returns TRUE then the turf will continue rerunning the proc until the item is gone or immune.
/turf/open/water/deep/proc/SinkStuff(AM, delta_time = 1)
. = 0

if(IsSafe())
return FALSE
var/thing_to_check = src
if(AM)
thing_to_check = list(AM)
else
return FALSE
for(var/thing in thing_to_check)
//Conditional check for objects.
if(isobj(thing))
var/obj/O = thing
if(O.anchored)
continue
if(O.throwing)
continue
ObjSink(thing)
if(istype(O, /obj/item/food/fish || /obj/item/aquarium_prop))
//Fish exit the game world and enter the water world.
qdel(O)
continue
//Most closets are not watertight.
if(istype(O, /obj/structure/closet))
var/obj/structure/closet/locker = O
visible_message(span_notice("[locker] is not watertight."))
for(var/I in locker.contents)
if(isliving(I))
MobSink(I)
/* This may cause issues later on. Without this people can sit on office chairs
and push themselves into water with no negative effects except being warped.
This appears to just leave people on the shore with the item being teleported. -IP */
if(O.has_buckled_mobs())
O.unbuckle_all_mobs()
visible_message(span_notice("[O] capsizes."))
if(O && O.loc == src)
WarpSunkStuff(O)
return FALSE

else if (isliving(thing))
. = 1
var/mob/living/L = thing
if(L.movement_type & (FLOATING|FLYING))
continue //YOU'RE FLYING OVER IT
if(L.throwing)
continue //You can jump over water
var/buckle_check = L.buckled
//Your stuck to something that isnt sinking
if(isobj(buckle_check))
continue
if(L)
MobSink(L)
WarpSunkStuff(L)
return FALSE

//Overridable Unique Reaction. Currently only used to pollute water.
/turf/open/water/deep/proc/ObjSink(atom/movable/sinkin_thing)
if(istype(sinkin_thing, /obj/item/food/fish/emulsijack))
//Become polluted.
TerraformTurf(/turf/open/water/deep/polluted)
return TRUE

//Overridable Mob Reaction
/turf/open/water/deep/proc/MobSink(mob/living/drowner)
//50 brute damage to living mobs. If they are human add 50 oxygen damage to them. May change this later on.
drowner.adjustBruteLoss(50)
if(ishuman(drowner))
var/mob/living/carbon/human/H = drowner
H.Paralyze(30)
H.adjustOxyLoss(50)

/* Currently water warps things to a random department but for other non Lobotomy Corp maps
It would be more helpful if the items were kept at sea for a few moments before teleporting
to a shore tile. But this also requires the existance of shore tiles and a place to fit
shore tiles. It would be funny to just go to the beach and corpses and items are just
teleported there because they fell into the water. -IP */
/turf/open/water/deep/proc/WarpSunkStuff(atom/movable/thing)
//Randomize department that the water dumps you at, and also delay sound so that several items being placed into the deep dont scream.
if(sound_delay <= world.time)
playsound(get_turf(src), 'sound/abnormalities/piscinemermaid/waterjump.ogg', 20, 0, 3)
sound_delay = world.time + (3 SECONDS)
//Might be redundant to randomize the location every time. -IP
WashedOnTheShore()
thing.forceMove(target_turf)
if(thing && !QDELETED(thing))
if(ishuman(thing))
visible_message(span_boldwarning("[thing] sinks into the deep!"))
to_chat(thing, pick(
span_userdanger("Something in the [src] grabs you and pulls you into the darkness. Your eyes burn as the light becomes fainter and the deep darkness begins circle around you."),
span_userdanger("The fluid around you starts crawling into your mouth."),
span_userdanger("You feel a sudden sting, then everything goes numb.")))
//Redundant check just in the case of extreme error.
if(target_turf)
thing.forceMove(target_turf)
else
qdel(thing)

//Proc to randomize target_turf
//Proc to randomize target_turf
/turf/open/water/deep/proc/WashedOnTheShore()
if(!static_target)
if(GLOB.department_centers.len > 0)
target_turf = pick(GLOB.department_centers)
else
target_turf = get_turf(src)

//How this works is that it returns a list with a divided chance for anything lower than the maximum
//FOR FISHING: How this works is that it returns a list with a divided chance for anything lower than the maximum
/turf/open/water/deep/proc/ReturnChanceList(maximum = FISH_RARITY_BASIC)
var/list/altered_loot_list = environment.Copy()
for(var/atom in altered_loot_list)
Expand Down Expand Up @@ -195,10 +287,17 @@
/mob/living/simple_animal/hostile/shrimp = 100
)

/turf/open/water/deep/polluted/ObjSink(atom/movable/sinkin_thing)
return TRUE

/* Change this later so that it is not a subtype since the variable is in the deep type.
Safe subtype isnt nessesary since it pre sets safe to TRUE when we can just set it to
true individually.-IP*/

/**
* Safe turfs, they wont sink you when you enter them
*/

/turf/open/water/deep/saltwater/safe
safe = TRUE
/turf/open/water/deep/saltwater/safe/IsSafe()
return TRUE

Loading

0 comments on commit 14e5895

Please sign in to comment.