mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Makes fishing less cbt (#19518)
* wow * Update rods.dm * new bvobber * bobber down * Update rods.dm * Update rods.dm * Update rods.dm * ok
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
/datum/component/fishable/proc/get_reward(fishing_power = 0)
|
/datum/component/fishable/proc/get_reward(fishing_power = 0)
|
||||||
var/chance = list(
|
var/chance = list(
|
||||||
FISHING_LOOT_NOTHING = min(max(0,100 - fishing_power),50),
|
|
||||||
FISHING_LOOT_JUNK = min(max(0,50 - fishing_power),25),
|
FISHING_LOOT_JUNK = min(max(0,50 - fishing_power),25),
|
||||||
FISHING_LOOT_COMMON = min(fishing_power / 5,50),
|
FISHING_LOOT_COMMON = min(fishing_power / 5,50),
|
||||||
FISHING_LOOT_UNCOMMON = min(fishing_power / 10,33),
|
FISHING_LOOT_UNCOMMON = min(fishing_power / 10,33),
|
||||||
|
|||||||
@@ -15,9 +15,8 @@
|
|||||||
var/fishing_power = 10
|
var/fishing_power = 10
|
||||||
var/obj/item/reagent_containers/food/snacks/bait/bait = null //what bait is attached to the rod
|
var/obj/item/reagent_containers/food/snacks/bait/bait = null //what bait is attached to the rod
|
||||||
var/fishing = FALSE
|
var/fishing = FALSE
|
||||||
var/bobber_image = 'yogstation/icons/obj/fishing/fishing.dmi'
|
|
||||||
var/bobber_icon_state = "bobber"
|
|
||||||
var/static/mutable_appearance/bobber = mutable_appearance('yogstation/icons/obj/fishing/fishing.dmi',"bobber")
|
var/static/mutable_appearance/bobber = mutable_appearance('yogstation/icons/obj/fishing/fishing.dmi',"bobber")
|
||||||
|
var/static/mutable_appearance/bobber_down = mutable_appearance('yogstation/icons/obj/fishing/fishing.dmi',"bobber_down")
|
||||||
var/datum/component/fishable/fishing_component
|
var/datum/component/fishable/fishing_component
|
||||||
var/mob/fisher
|
var/mob/fisher
|
||||||
var/bite = FALSE
|
var/bite = FALSE
|
||||||
@@ -47,6 +46,9 @@
|
|||||||
if(bite)
|
if(bite)
|
||||||
to_chat(fisher, span_warning("Whatever was on the line drifts back into the deep..."))
|
to_chat(fisher, span_warning("Whatever was on the line drifts back into the deep..."))
|
||||||
bite = FALSE
|
bite = FALSE
|
||||||
|
var/turf/fishing_turf = fishing_component?.parent
|
||||||
|
fishing_turf?.cut_overlay(bobber_down)
|
||||||
|
fishing_turf?.add_overlay(bobber)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/power = 0
|
var/power = 0
|
||||||
@@ -56,6 +58,9 @@
|
|||||||
if(prob(fishing_power + power))
|
if(prob(fishing_power + power))
|
||||||
to_chat(fisher, span_boldnotice("Something bites! Reel it in!"))
|
to_chat(fisher, span_boldnotice("Something bites! Reel it in!"))
|
||||||
bite = TRUE
|
bite = TRUE
|
||||||
|
var/turf/fishing_turf = fishing_component?.parent
|
||||||
|
fishing_turf?.cut_overlay(bobber)
|
||||||
|
fishing_turf?.add_overlay(bobber_down)
|
||||||
do_fishing_alert(fisher)
|
do_fishing_alert(fisher)
|
||||||
|
|
||||||
/obj/item/twohanded/fishingrod/Destroy()
|
/obj/item/twohanded/fishingrod/Destroy()
|
||||||
@@ -85,7 +90,7 @@
|
|||||||
var/mob/living/carbon/carbonfisher = fisher
|
var/mob/living/carbon/carbonfisher = fisher
|
||||||
power = carbonfisher.fishing_power
|
power = carbonfisher.fishing_power
|
||||||
spawn_reward(fishing_power + power)
|
spawn_reward(fishing_power + power)
|
||||||
if(bait && prob(max(50 - bait.fishing_power,0))) //50 - bait.fishing_power% chance to lose your bait
|
if(bait && prob(max(1/(2 + (bait.fishing_power/6)), 0))) //goodbye bait
|
||||||
to_chat(fisher, span_notice("Your [bait] is lost!"))
|
to_chat(fisher, span_notice("Your [bait] is lost!"))
|
||||||
cut_overlays()
|
cut_overlays()
|
||||||
QDEL_NULL(bait)
|
QDEL_NULL(bait)
|
||||||
@@ -104,7 +109,8 @@
|
|||||||
fisher = null
|
fisher = null
|
||||||
STOP_PROCESSING(SSobj,src)
|
STOP_PROCESSING(SSobj,src)
|
||||||
var/turf/fishing_turf = fishing_component.parent
|
var/turf/fishing_turf = fishing_component.parent
|
||||||
fishing_turf.cut_overlay(bobber)
|
fishing_turf?.cut_overlay(bobber)
|
||||||
|
fishing_turf?.cut_overlay(bobber_down)
|
||||||
fishing_component = null
|
fishing_component = null
|
||||||
bite = FALSE //just to be safe
|
bite = FALSE //just to be safe
|
||||||
|
|
||||||
@@ -120,8 +126,8 @@
|
|||||||
|
|
||||||
/obj/item/twohanded/fishingrod/proc/spawn_reward(fishing_power = 0)
|
/obj/item/twohanded/fishingrod/proc/spawn_reward(fishing_power = 0)
|
||||||
var/picked_reward = fishing_component.get_reward(fishing_power)
|
var/picked_reward = fishing_component.get_reward(fishing_power)
|
||||||
if(!picked_reward || picked_reward == FISHING_LOOT_NOTHING) //nothing or something messed up
|
if(prob(14.29) || !picked_reward || picked_reward == FISHING_LOOT_NOTHING) //14.29% to always fail, sorry, also handles failures.
|
||||||
fisher.visible_message(span_notice("[fisher] reels in ... nothing!"), span_notice("You reel in... nothing! Better luck next time!"))
|
fisher.visible_message(span_notice("[fisher] tugs on the rod and the line snaps!"), span_notice("Your line snaps! Whatever was on it sinks back into the deep."))
|
||||||
return
|
return
|
||||||
var/obj/reward_item = new picked_reward(fishing_component.parent)
|
var/obj/reward_item = new picked_reward(fishing_component.parent)
|
||||||
reward_item.alpha = 0
|
reward_item.alpha = 0
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.4 KiB |
Reference in New Issue
Block a user